	
	// Alert From Flash
	function flashAlert (v) {
		alert(v);	
	}

	//--------------------------------------------
	// Open a browswer windows
	//--------------------------------------------
	
	function openWindowCentered(mypage,myname,w,h,features) {
		if(screen.width) {
			var winl = (screen.width-w)/2;
			var wint = (screen.height-h)/2;
		} else{winl = 0;wint =0;}
		if (winl < 0) winl = 0;
		if (wint < 0) wint = 0;
		var settings = 'height=' + h + ',';
		settings += 'width=' + w + ',';
		settings += 'top=' + wint + ',';
		settings += 'left=' + winl + ',';
		settings += features;
		var win = window.open(mypage,myname,settings);
		//win.window.focus();
	}
	
	function openWindowFull(url,winName) {
		var params  = 'width='+screen.width;
		params 		+= ', height='+screen.height;
		params 		+= ', top=0, left=0'
		params 		+= ', fullscreen=yes';
		//openWindow(url,winName,params);
	}

	//--------------------------------------------
	// Resize DIV Tags
	//--------------------------------------------
	// BY PIXEL
	function setswfWidthPixels(divid, newW){
		document.getElementById(divid).style.width = newW+"px";
		document.getElementById(divid).width = newW+"px";
	}
	function setswfHeightPixels(divid, newH, newTitle){
		document.getElementById(divid).style.height = newH+"px";
		document.getElementById(divid).height = newH+"px";
	}
	function setFlashSizePixels(divid, newW, newH){
		setswfWidth(divid, newW);
		setswfHeight(divid, newH);
	}
	// BY PERCENT
	function setswfWidthPercent(divid, newW){
		document.getElementById(divid).style.width = newW+"%";
		document.getElementById(divid).width = newW+"%";
	}
	function setswfHeightPercent(divid, newH, newTitle){
		document.getElementById(divid).style.height = newH+"%";
		document.getElementById(divid).height = newH+"%";
	}
	function setFlashSizePercent(divid, newW, newH){
		setswfWidth(divid, newW);
		setswfHeight(divid, newH);
	}
	function checkMinFlashSize(divid, minW, minH) {
		// Browser Current Width / Height
		if (self.innerWidth) {
			var currentWidth = self.innerWidth;
			var currentHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientWidth) {
			var currentWidth = document.documentElement.clientWidth;
			var currentHeight = document.documentElement.clientHeight;
		} else if (document.body) {
			var currentWidth = document.body.clientWidth;
			var currentHeight = document.body.clientHeight;
		}
		else return;
		
		// Width
		if (currentWidth < minW) {
			setswfWidthPixels(divid, minW);
		} else {
			setswfWidthPercent(divid, 100);
			//setswfWidthPixels(divid, currentWidth);
		}
		
		// Height
		if (currentHeight  < minH) {
			setswfHeightPixels(divid, minH);
		} else {
			setswfHeightPercent(divid, 100);
			//setswfHeightPixels(divid, currentHeight);
		}
	}	
	
	//--------------------------------------------
	// Set the Browser's hash - IE only
	//--------------------------------------------
	function setHash(newHash) {
		var ua = navigator.userAgent.toLowerCase();
		var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
		if (newHash != "" && isInternetExplorer) {
			parent.document.location.hash = newHash;
		}
	}
	
