﻿/*
	Note: These methods were created to get around the Active Content Update for IE. Ideally SWF Object would be used, but the base param isn't supported in IE (as of ver 1.4.4).
*/

function writeHomePageSwf(navParams,FLASH_QUERYSTRING) {
   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1024" height="632" id="top_nav" align="middle">');
   document.write('<param name="allowScriptAccess" value="sameDomain" />');
   document.write('<param name="base" value="/flash/" />');
   document.write('<param name="movie" value="/flash/home_page.swf?' + navParams + '&' + FLASH_QUERYSTRING + '" />');   
   document.write('<param name="quality" value="high" />');
   document.write('<param name="wmode" value="transparent" />');
   document.write('<param name="bgcolor" value="#ffffff" />');
   document.write('<embed src="/flash/home_page.swf?' + navParams + '&' + FLASH_QUERYSTRING + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="1024" height="632" name="top_nav" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" base="/flash/" />'); 
   document.write('</object>');
}

function writeNavLoginLogoutSwf(navParams,FLASH_QUERYSTRING,swfHeight,enviro) {

   // hack for revenge game standalone frame
   //revengeVariant=document.location.href.match(/games\/revenge/)?true:false;

   /*if (revengeVariant) {
	   page = "/flash/nav_login_logout_revenge.swf?" + navParams + "&" + FLASH_QUERYSTRING;
	   var so = new SWFObject(page, "top_nav", "1024", "583", "9", "#ffffff", "", "", "/noflash.php?destPage="+escape("/games/revenge/?detectflash=false"));
	   so.addParam("wmode", "transparent");
	   so.write('loginContainer');
   } else {*/
   
   var baseurl = "http://" + enviro + "/";
   
   if (swfHeight != "") {
	   page = "/flash/nav_login_logout_revenge.swf?" + navParams + "&" + FLASH_QUERYSTRING;
	   var so = new SWFObject(page, "top_nav", "1024", swfHeight, "9", "#ffffff", "", "", "/noflash.php?destPage="+escape("/games/revenge/?detectflash=false"));
	   so.addParam("wmode", "transparent");
	   so.addVariable("baseurl",baseurl);
	   so.write('loginContainer');
   } else {

	   document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1024" height="307" id="top_nav" align="middle">');
	   document.write('<param name="base" value="/flash/" />');
	   document.write('<param name="allowScriptAccess" value="sameDomain" />');
	   document.write('<param name="movie" value="/flash/nav_login_logout.swf?' + navParams + '&' + FLASH_QUERYSTRING + '" /><param name="quality" value="high" />');
	   document.write('<param name="wmode" value="transparent" />');
	   document.write('<param name="bgcolor" value="#ffffff" />');
	   document.write('<embed src="/flash/nav_login_logout.swf?' + navParams + '&' + FLASH_QUERYSTRING + '" quality="high" wmode="transparent" bgcolor="#ffffff" width="1024" height="307" name="top_nav" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" base="/flash/" />');
	   document.write('</object>');
   }
}

function writeExposedRevealedSlideshowSwf(flashVars,FLASH_QUERYSTRING) {
   document.write('<object type="application/x-shockwave-flash" data="http://www.filemobile.com/static/widgets/slideshow2/slideshow.swf" width="675" height="500" id="slideshow">');
   document.write('<param name="movie" value="http://www.filemobile.com/static/widgets/slideshow2/slideshow.swf" /> ');
   document.write('<param name="wmode" value="transparent" />');
   document.write('<param name="FlashVars" value="' + flashVars + '" />');
   document.write('<embed src="http://www.filemobile.com/static/widgets/slideshow2/slideshow.swf" type="application/x-shockwave-flash" width="675" height="500" flashvars="' + flashVars + '"/>');
   document.write('</object>');
}

function writeGetExposedSlideshowSwf(flashVars,FLASH_QUERYSTRING) {
   document.write('<object type="application/x-shockwave-flash" data="http://www.filemobile.com/static/widgets/slideshow2/slideshow_small.swf" width="365" height="350" id="slideshowSmall">');
   document.write('<param name="movie" value="http://www.filemobile.com/static/widgets/slideshow2/slideshow_small.swf" /> ');
   document.write('<param name="wmode" value="transparent" />');
   document.write('<param name="FlashVars" value="' + flashVars + '" />');
   document.write('<embed src="http://www.filemobile.com/static/widgets/slideshow2/slideshow_small.swf" type="application/x-shockwave-flash" width="365" height="350" flashvars="' + flashVars + '"/>');
   document.write('</object>');
}