var myBrowser;
if(navigator.platform){
	myBrowser=new myBrowser((document.getElementById != null),(navigator.platform.indexOf('Win32') != -1),(navigator.appName.indexOf('Microsoft') != -1));
}
function myBrowser(version,platform,type){
	this.version=version;
	this.platform=platform;
	this.type=type;
}


var MM_contentVersion = 6;//Setting to Version 6
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i){
		if (isNaN(parseInt(words[i]))) continue;
		var MM_PluginVersion = words[i]; 
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}


function openFullScr(){

	if(screen.width >= 1024 && screen.height >= 768){

	if(MM_FlashCanPlay){

		var myUrl = "ffs_contents.php";

		if(myBrowser.type){
			if(myBrowser.platform){
				var thisWinWidth=screen.availwidth;
				var thisWinHeight=screen.availHeight;
				newwin=window.open(myUrl,"_blank","fullscreen=1,scrollbars=0,resizable=0,location=0,menubar=0,status=0,left=0,top=0");//no title bar
				newwin.resizeTo(thisWinWidth,thisWinHeight);
			}else{
				var thisWinWidth=screen.width-12;
				var thisWinHeight=screen.availHeight;
				newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
				newwin.resizeTo(thisWinWidth,thisWinHeight);
			}
		}else{
			if( navigator.userAgent.indexOf("Safari") != -1){
				var thisWinWidth=screen.width;
				var thisWinHeight=screen.height-46;
				window_size = "width=" + thisWinWidth + ",height=" + thisWinHeight +",innerWidth=" + thisWinWidth + ",innerHeight=" + thisWinHeight;
				newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no," + window_size);
				newwin.moveTo(0,0);
			}else{//NS
				var thisWinWidth=screen.availWidth-12;
				var thisWinHeight=screen.availHeight-30;
				window_size = "width=" + thisWinWidth + ",height=" + thisWinHeight +",innerWidth=" + thisWinWidth + ",innerHeight=" + thisWinHeight;
			newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no," + window_size);
				newwin.moveTo(0,0);
			}
		}
	}else{
		
		alert("Flash Player is not supported.");
	}
	
	}else{
		alert("Monitor Screen Resolution is not supported.");
	}
}

function writeFlashTags(){
	if(screen.width < 1024 || screen.height < 768){
		//widthNum=1024;
		//heightNum=768;
	}
	//document.write('<table border="0" cellspacing="0" cellpadding="0" width="'+widthNum+'" height="'+heightNum+'" id="basearea"><tr>');
	//document.write('<td width="'+widthNum+'" valign="middle" align="center"> ');
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.write(' WIDTH="'+widthNum+'" HEIGHT="'+heightNum+'" id="branding" ALIGN="">');
	document.write(' <PARAM NAME=movie VALUE="'+swf_file+'.swf">');
	document.write(' <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noscale> <PARAM NAME=bgcolor VALUE=#ffffff> <PARAM NAME=salign VALUE=CM>');
	document.write(' <EMBED src="'+swf_file+'.swf" menu=false quality=high scale=noscale bgcolor=#ffffff salign=CM WIDTH="'+widthNum+'" HEIGHT="'+heightNum+'" NAME="branding" ALIGN=""');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');
	//document.write('</td></tr></table>');
}

function closeWindow(){
	window.close();
}