/** SW JS FOR SUPERWEBSITES.COM **/

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 gMovie_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call gMovie_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}


window.onresize = function()
{

	doResize();

}

myResHeight = 0;

function setHeight(h)
{

	
	scroll(0,0);
	
	 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;
	  }
	
	myResHeight = h;
	

	if (h < myHeight)
	{
		var setH = myHeight - 1;
	
		//alert ("set maximum height : " + myHeight);
		
	} else {
		
		var setH = h;

	}
	
	//alert ("set height : " + setH);
	
	var groundElement = document.getElementById('flashcontent');
	groundElement.style.height = setH + 'px';

}


function setHeightRes(h2)
{

	
	scroll(0,0);
	
		
	var setH = h2;
		

	
	var groundElement = document.getElementById('flashcontent');
	groundElement.style.height = setH + 'px';

}







function doResize()
{


	//Set variable to new height
	 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;
	  }
		

	if(thisMovie("gMovie")){ //thisMovie function defined in Navigator.js


		thisMovie("gMovie").SetVariable("myStageHeight", myHeight);
		thisMovie("gMovie").SetVariable("myStageWidth", myWidth);

	}
	
	if (myResHeight < myHeight)
	{
		//alert ("set height again : " + myHeight);
		
		setHeightRes(myHeight-1);
	}

}


if (window.location.hash)
{
	var myPage = window.location.hash;

	myPage = myPage.replace("#" , "");
	myPage = myPage.replace("%20" , " ");

} else {

	myPage = "";

}

var newwin;
function launchwin(winurl,winname,winfeatures) {
	newwin = window.open(winurl,winname,winfeatures);
}



function gMovie_DoFSCommand(command, args1) {




	if (command == "deeplinking")
	{


		arr_args = args1.split("#");

		setDeepLink(arr_args[0], arr_args[1]);
		
		window.focus();


	}
	else if ( command == "resizemyflash" )
	{	
		
		
		
		setHeight(args1);
		
		window.focus();

	}

	else if ( command == "setmyfocus" )
	{	
		
		window.focus();

	}
	else if ( command == "setfullscreenpopup" )
	{	

		//screen.availWidth and screen.availHeight
		
		var wid = screen.width;
		var hi = screen.height - 50;		
		
		launchwin(args1,'newwindow','width='+ wid + ',height=' + hi + ',left=0,top=0,directories=0,fullscreen=0,location=0,menubar=0,scrollbars=0,status=0,toolbar=0')
		
	
	}	
	

}



