var activeMedia = "";
var menuSpacing = 50;
	
ActiveArray = new Array("Media","Connection");
ActiveArray["Media"] = new Array("");
ActiveArray["Connection"] = new Array("");
	
VideoArray = new Array("DocVideo","AnimVideo","ProofVideo");
VideoArray["DocVideo"] = new Array("0");
VideoArray["AnimVideo"] = new Array("0");
VideoArray["ProofVideo"] = new Array("0");
			
function CallVideo(band,video)
	{
	var strURL = "";
	if (video == "Doc")
		{
		if (band == "h")
			{
			if (activeMedia == "qt"){strURL = "assets/technology/VIDEO/QT/documentary_256.mov";}
			else if (activeMedia == "rm"){strURL = "assets/technology/VIDEO/RAM/documentary_256.ram";}
			else if (activeMedia == "wm"){strURL = "assets/technology/VIDEO/WMV/documentary_256.wmv";}
			}
		else if (band == "d")
			{
			if (activeMedia == "qt"){strURL = "assets/technology/VIDEO/QT/documentary_28.mov";}
			else if (activeMedia == "rm"){strURL = "assets/technology/VIDEO/RAM/documentary_28.ram";}
			else if (activeMedia == "wm"){strURL = "assets/technology/VIDEO/WMV/documentary_28.wmv";}
			}
		}
	else if (video == "Anim")
		{
		if (band == "h")
			{
			if (activeMedia == "qt"){strURL = "assets/technology/VIDEO/QT/animation_256.mov";}
			else if (activeMedia == "rm"){strURL = "assets/technology/VIDEO/RAM/animation_256.ram";}
			else if (activeMedia == "wm"){strURL = "assets/technology/VIDEO/WMV/animation_256.wmv";}
			}
		else if (band == "d")
			{
			if (activeMedia == "qt"){strURL = "assets/technology/VIDEO/QT/animation_28.mov";}
			else if (activeMedia == "rm"){strURL = "assets/technology/VIDEO/RAM/animation_28.ram";}
			else if (activeMedia == "wm"){strURL = "assets/technology/VIDEO/WMV/animation_28.wmv";}
			}
		}
	else if (video == "Proof")
		{
		if (band == "h")
			{
			if (activeMedia == "qt"){strURL = "assets/technology/VIDEO/QT/proof_256.mov";}
			else if (activeMedia == "rm"){strURL = "assets/technology/VIDEO/RAM/proof_256.ram";}
			else if (activeMedia == "wm"){strURL = "assets/technology/VIDEO/WMV/proof_256.wmv";}
			}
		else if (band == "d")
			{
			if (activeMedia == "qt"){strURL = "assets/technology/VIDEO/QT/proof_28.mov";}
			else if (activeMedia == "rm"){strURL = "assets/technology/VIDEO/RAM/proof_28.ram";}
			else if (activeMedia == "wm"){strURL = "assets/technology/VIDEO/WMV/proof_28.wmv";}
			}
		}
	if (strURL != "")
		{
		if (activeMedia == "qt"){alert("The Quicktime file must be fully download before playing.  This may take a minute or two depending on your Internet connection speed.  Once downloaded, the movie will begin to play in your browser.");}
		document.location.href = z+strURL;
		}
	}
		
function CheckTimer(lyrName)
	{
	if (VideoArray[lyrName] != "0")
		{setTimeout("CallTimer('"+lyrName+"')",250);}
	}
	
function CallTimer(lyrName)
	{
	if (VideoArray[lyrName] == "1")
		{
		setVariable(lyrName,'0','Media');
		var activeLayer = lyrName+"MediaLayer";
		displayElem(activeLayer,'hidden');
		}
	}

function PickMedia(lyrName)
	{
	if (ActiveArray["Connection"]!= "")
		{
		activeMedia = "";
		displayElem(ActiveArray["Connection"]+'ConnectionLayer','hidden');
		setVariable(ActiveArray["Connection"]+'ConnectionLayer','0','Connection');
		}
				
	var activeLayer = lyrName+"MediaLayer";
	var activeImg = lyrName;
	findCoordElem(lyrName);
	moveElem(activeLayer,imgPosX+10,imgPosY);
	displayElem(activeLayer,'visible');
	setVariable(lyrName,'1','Media');
	ActiveArray["Media"] = lyrName;
	}
	
function PickSpeed(lyrName,mediaType)
	{
	activeMedia = mediaType;
	var activeLayer = lyrName+"ConnectionLayer";
	var activeImg = lyrName;
	findCoordElem(lyrName);
	moveElem(activeLayer,imgPosX+10,imgPosY + menuSpacing);
	displayElem(activeLayer,'visible');
	setVariable(lyrName,'3','Connection');
	ActiveArray["Connection"] = lyrName;
	}
		
function setVariable(lyr,val,lyrType)
	{
	if ((lyrType == "Media" && VideoArray[lyr] == 4 && ActiveArray["Connection"] != "") || (ActiveArray["Connection"] != "" && val == 0))
		{
		activeMedia = "";
		displayElem(ActiveArray["Connection"]+'ConnectionLayer','hidden');
		ActiveArray["Connection"] = "";
		}
		
	VideoArray[lyr] = val;
	if (val == "0"){ActiveArray[lyrType] = "";}
	else {ActiveArray[lyrType] = lyr;}
	}

function CheckPointerPosition()
	{
	var blnContinue = false;
	var activeLayerType = "";
	
	if (ActiveArray["Connection"] != "" && VideoArray[ActiveArray["Connection"]] > 3)
		{
		activeLayerType = "Connection";
		blnContinue = true;
		}
	else if (ActiveArray["Media"] != "" && VideoArray[ActiveArray["Media"]] > 1)
		{
		activeLayerType = "Media";
		blnContinue = true;
		}
	else
		{blnContinue = false;}
	
	if (blnContinue)
		{
		findCoordElem(ActiveArray[activeLayerType]+activeLayerType+'Top',ActiveArray[activeLayerType]+activeLayerType+'Layer');
		var tPos = imgPosY;
		var lPos = imgPosX;
		findCoordElem(ActiveArray[activeLayerType]+activeLayerType+'Bottom',ActiveArray[activeLayerType]+activeLayerType+'Layer');
		var bPos = imgPosY;
		var rPos = imgPosX;
		
		if (IE4)
			{
			var adjustHeight = document.body.scrollTop;
			if (((eval(globalPointerX) < eval(lPos)) || (eval(globalPointerX-15) > eval(rPos))) || ((eval(globalPointerY+adjustHeight+15) < eval(tPos)) || (eval(globalPointerY+adjustHeight-15) > eval(bPos))))
				{
				displayElem(ActiveArray[activeLayerType]+activeLayerType+'Layer','hidden');
				setVariable(ActiveArray[activeLayerType]+activeLayerType+'Layer','0',activeLayerType);
				}
			}
		else if (NS4 && !NS6)
			{
			if (((globalPointerX < eval(lPos)) || ((globalPointerX-15) > eval(rPos+lPos))) || (((globalPointerY+15) < eval(tPos)) || ((globalPointerY-15) > eval(bPos+tPos))))
				{
				displayElem(ActiveArray[activeLayerType]+activeLayerType+'Layer','hidden');
				setVariable(ActiveArray[activeLayerType]+activeLayerType+'Layer','0',activeLayerType);
				}
			}
		else if (NS6)
			{
			if (((globalPointerX < eval(lPos)) || ((globalPointerX-15) > eval(rPos))) || (((globalPointerY+15) < eval(tPos)) || ((globalPointerY-15) > eval(bPos))))
				{
				displayElem(ActiveArray[activeLayerType]+activeLayerType+'Layer','hidden');
				setVariable(ActiveArray[activeLayerType]+activeLayerType+'Layer','0',activeLayerType);
				}
			}
		}
	setTimeout("CheckPointerPosition()",250);
	}

setTimeout("CheckPointerPosition()",250);