/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/


var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function flashPhoneNumbers_DoFSCommand(command, args) {
	//var sampleFSCommandObj = isInternetExplorer ? document.all.sampleFSCommand : document.sampleFSCommand;
	//
	// Place your code here.
	//alert("test")
	var strCommand = command + '(' + args + ')';
	eval(strCommand)
	//alert(sampleFSCommandObj)
	//
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub flashPhoneNumbers_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call flashPhoneNumbers_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->

function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
	}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";
	document.getElementById("flashPhoneNumbers").setVariable("resizeComplete",1)
}
function setFlashSize(divid, newW, newH){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
/*
function getSize() {	
var flashHeight = "120"
if(typeof(document.forms[0].flashPhoneNumbers) != "undefined" ){
//alert(typeof(document.forms[0].flashPhoneNumbers.GetVariable("flashSize")))
	if(typeof(document.forms[0].flashPhoneNumbers.GetVariable("flashSize")) != "undefined" ){
		var flashHeight= document.forms[0].flashPhoneNumbers.GetVariable("flashSize");
		clearInterval(getSizeID);
		setFlashHeight("flashid", flashHeight);
		}
	}
} 
//getSizeID = setInterval(getSize,150)
*/

