// JavaScript Document

var CurrentNum = new String();
var VideoNum = new String();
var VideoHTML = new Array();
var Width = 0;
var Height = 0;


function InitializeWH()
{
	Width = document.documentElement.clientWidth;
	Height = document.documentElement.clientHeight;
}
function DisplayVideo(Input)
{ 	 
	 if( Width == 0|| Height == 0)
	 	InitializeWH();	 
	 document.getElementById("BodyContainer").style.visibility = "hidden";
	 document.getElementById("BodyContainer").style.height = Height + "px";
	 document.getElementById("BodyContainer").style.width = Width + "px";
	 document.getElementById("BodyContainer").style.position = "absolute";
	 document.getElementById("BodyContainer").style.top = 0 + "px";
	 document.getElementById("BodyContainer").style.left = 0 + "px";
	 document.getElementById("BodyContainer").style.overflow = "hidden";
	 
	 document.getElementById("VideoContainer").style.height = Height + "px";
	 document.getElementById("VideoContainer").style.width = Width + "px";	
	  	
	 document.getElementById("BodyContainer").style.visibility = "visible";
	 document.getElementById("VideoContainer").style.visibility = "visible";
	 
	 if (Input > 5)
	 {
		 if (Input == 7)
		 {
			 document.getElementById("Video1").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='491' height='368' id='FLVPlayer'><param name='movie' value='FLVPlayer_Progressive.swf' /><param name='quality' value='high' /><param name='wmode' value='opaque' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='FlashVars' value='&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_3&amp;streamName=Aggregation-low-res&amp;autoPlay=true&amp;autoRewind=false' /><param name='swfversion' value='8,0,0,0' /><!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. --><param name='expressinstall' value='Scripts/expressInstall.swf' /><!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --><!--[if !IE]>--><object type='application/x-shockwave-flash' data='FLVPlayer_Progressive.swf' width='491' height='368'><!--<![endif]--><param name='quality' value='high' /><param name='wmode' value='opaque' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='FlashVars' value='&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_3&amp;streamName=Aggregation-low-res&amp;autoPlay=true&amp;autoRewind=false' /><param name='swfversion' value='8,0,0,0' /><param name='expressinstall' value='Scripts/expressInstall.swf' /><!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --><div><h4>Content on this page requires a newer version of Adobe Flash Player.</h4><p><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a></p></div><!--[if !IE]>--></object><!--<![endif]--></object><script type='text/javascript'>swfobject.registerObject('FLVPlayer');</script>";
			document.getElementById("Video1").style.marginTop = -184 + "px";
			document.getElementById("Video1").style.marginLeft = -245 + "px";
		 }
		 else
		 {
			 document.getElementById("Video1").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='940' height='560' id='FLVPlayer'><param name='movie' value='FLVPlayer_Progressive.swf' /><param name='quality' value='high' /><param name='wmode' value='opaque' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='FlashVars' value='&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_3&amp;streamName=fullscreen&amp;autoPlay=true&amp;autoRewind=false' /><param name='swfversion' value='8,0,0,0' /><!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. --><param name='expressinstall' value='Scripts/expressInstall.swf' /><!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --><!--[if !IE]>--><object type='application/x-shockwave-flash' data='FLVPlayer_Progressive.swf' width='940' height='560'><!--<![endif]--><param name='quality' value='high' /><param name='wmode' value='opaque' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='FlashVars' value='&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_3&amp;streamName=fullscreen&amp;autoPlay=true&amp;autoRewind=false' /><param name='swfversion' value='8,0,0,0' /><param name='expressinstall' value='Scripts/expressInstall.swf' /><!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --><div><h4>Content on this page requires a newer version of Adobe Flash Player.</h4><p><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a></p></div><!--[if !IE]>--></object><!--<![endif]--></object><script type='text/javascript'>swfobject.registerObject('FLVPlayer');</script>";
			 document.getElementById("Video1").style.marginTop = -280 + "px";
			 document.getElementById("Video1").style.marginLeft = -470 + "px";
		 }		 
	 }
	 else
	 {
	 
		 if (Input == 5)
			VideoNum = "Spence"
		 else
			VideoNum = "tag" + Input;
		 
		 document.getElementById("Video1").innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='656' height='480' id='FLVPlayer'><param name='movie' value='FLVPlayer_Progressive.swf' /><param name='quality' value='high' /><param name='wmode' value='opaque' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='FlashVars' value='&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_3&amp;streamName=EnergyAlliancesTV" + VideoNum + "&amp;autoPlay=true&amp;autoRewind=false&amp;' /><param name='swfversion' value='8,0,0,0' /><!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --><param name='expressinstall' value='Scripts/expressInstall.swf' /><!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --><!--[if !IE]>--><object type='application/x-shockwave-flash' data='FLVPlayer_Progressive.swf' width='656' height='480'><!--<![endif]--><param name='quality' value='high' /><param name='wmode' value='opaque' /><param name='scale' value='noscale' /><param name='salign' value='lt' /><param name='FlashVars' value='&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_3&amp;streamName=EnergyAlliancesTV"+ VideoNum + "&amp;autoPlay=true&amp;autoRewind=false' /><param name='swfversion' value='8,0,0,0' /><param name='expressinstall' value='Scripts/expressInstall.swf' /><!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --><div><h4>Content on this page requires a newer version of Adobe Flash Player.</h4><p><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a></p></div><!--[if !IE]>--></object><!--<![endif]--></object><script type='text/javascript'>swfobject.registerObject('FLVPlayer');</script>";
	 }
	 
	 document.getElementById("Video1").style.visibility = "visible";
}

function HideVideo()
{
	 document.getElementById("BodyContainer").style.width = "auto";
	 document.getElementById("BodyContainer").style.height = "auto";
	 document.getElementById("BodyContainer").style.overflow = "visible";
	 
	 document.getElementById("VideoContainer").style.height = 0 + "px";
	 document.getElementById("VideoContainer").style.width = 0 + "px";
	 document.getElementById("VideoContainer").style.visibility = "hidden";
	 //document.getElementById("Video" + VideoNum).innerHTML = "";
	 document.getElementById("Video1").style.visibility = "hidden";
	 document.getElementById("BodyContainer").style.position = "relative";
	 location.reload(true);
}
function Init(Num)
{
	CurrentNum = "BNav" + Num;
	document.getElementById("BNav" + Num).style.textDecoration = "underline";
}
function InitializeVideos()
{
	
	for (x = 1; x < 6; x++)
	{
		VideoHTML[x] = document.getElementById("Video" + x).innerHTML;
		document.getElementById("Video" + x).innerHTML = "";
	}
}
function Hover(Input)
{
	Input.style.textDecoration = "underline";
	document.getElementById(CurrentNum).style.textDecoration = "none";
	CurrentNum = Input.id;
	document.getElementById(CurrentNum).style.textDecoration = "underline";
}  
