
//window.onload= function (){
//	document.getElementById('flashContent').sendTextFromHtml('loaded');
//}

var flashHolder = '<div class="FlashFix"></div><div class="FlashContent" style="height:100%;width:100%;"><div id="flashContent" style="height:100%;width:100%;"><p style="position:relative;top:200px;left:400px;font-size:14px;">This site requires you to have Flash player 8 or greater installed.<br />  <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Click here to get the Flash Player.</a></p></div></div>';

// Get height and width (LABEL)
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );


$(document).ready( function() {
	$('.MasterLayoutHome').addClass('HomepageLayout');
	
	$('.MainBody').css('visibility','hidden');
	$('.MainBody').after(flashHolder);
	$('.PageContents').remove();
	$('ul.Nav').height('40px');
	
	var viewportwidth;
	var viewportheight;
	if (typeof window.innerWidth != "undefined") {
		viewportwidth = window.innerWidth;
	} else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		viewportwidth = document.documentElement.clientWidth;
	} else {
		viewportwidth = document.getElementsByTagName("body")[0].clientWidth;
	}	
	viewportheight = Math.round(  viewportwidth*500/1024 ,0);
	
	//$('.FlashFix').height('500px');
	
	flashHeight = myHeight-80;
	flashWidth = myWidth;
	
	$('.FlashFix').height(flashHeight);
	
	//$('#flashContent').wrap('wrap("<div style="width: 1024px; margin: 0px auto;"></div>");');
	//$('#flashContent').wrap('wrap("<div style="width: '+flashWidth+'px; margin: 0px auto;"></div>");');
	
	$('#flashContent').wrap('wrap("<div style="width:100%;height:100%; margin: 0px auto;"></div>");');
	
	
	//Flash Show off

	var flashvars = {
		root_path:'/',
		bottomPadding:'80',
		baseURL:'http://facesofinfluenza.org',
		languagePage:"en"
	};
	
	var params = {
		wmode:'transparent'
	};
	
	var attributes = {

	};


	
	//swfobject.embedSWF('/swf/main.swf', 'flashContent', flashWidth, flashHeight, '9.0.0','http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75',{root_path:'/',w:flashWidth,h:flashHeight},{menu:'false',wmode:'transparent'});
	//swfobject.embedSWF('/swf/main.swf', 'flashContent', '100%', '100%', '8.0.0','http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75',{root_path:'/',bottomPadding:80,baseURL:'http://facesofinfluenza.org'},{scale:'noscale',salign:'lt',menu:'false',wmode:'transparent'});
	swfobject.embedSWF('/swf/main.swf', 'flashContent', '100%', '100%', '8.0.0','http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75',flashvars,params,attributes);
	
	//swfobject.embedSWF('/swf/main.swf', 'flashContent', '100%', '100%', '8.0.0','http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75',{root_path:'/',w:flashWidth,h:flashHeight},{menu:'false',wmode:'transparent'});
	
	
	
	$('.MainBody').css('visibility','visible');
});


            /*<![CDATA[*/
            //Accessible?
/*
            if(!bAccessibleSet) {

                var so = new SWFObject("swf/homepageAnim.swf", "homepageFlash", "915", "429", "9", "#fff");
                so.addParam("menu", "false");
                so.addParam("wmode", "transparent");
                so.addVariable("xmlPath", "swf/xml/links.xml"); 
                so.write("flashContent");

                //Prevents flicker
                if(!$('#flashContent').find('p')[0])  $('#flashContent').addClass('BannerContentBlank');
            }
*/
            /*]]>*/
function refresh() {
		setTimeout("location.reload(true);",1);
}
function loadtest() {
//		alert('Loaded');
}