//Testing Browser and setting global variable.
//Testing the browser.
var strAgent = new String(navigator.userAgent);
IE = strAgent.indexOf("MSIE");
openWin = false;

//Changes the parent image.
function preload_Images(arFileNames){

	arFileNames += "/images/logos/TriadLogo.gif,/images/navigation/marketingOver.gif,/images/navigation/exhibitsOver.gif./images/navigation/signageOver.gif";

	var arImages = arFileNames.split(",");
	var arImageList = new Array();

	for(i in arImages){
		arImageList[i] = new Image();
		arImageList[i].src = "/images/" + arImages[i];
		//alert(arImageList[i].src);
	}
}

function changeImage(parentSrc){
	sUrl = location.href;
	if(sUrl.indexOf(".shtml") == -1){
		blur();

		if(parentSrc){
			document.images["imgLeft"].src = "/images/imgRight/" + parentSrc;
		}else{
			document.images["imgLeft"].src = "/images/Tart.jpg";		
		}
	}

}

function blur(){

	if(IE != -1){
		document.images['imgLeft'].style.filter = "alpha(Opacity=50, FinishOpacity=0, Style=0)";
		//Removes blur filter
		setTimeout('removeBlur();', 200);
	}

}

function removeBlur(){
	document.images['imgLeft'].style.filter = "";
}

//Changes the sName image to sSrc as the source
function swapImage(sName,sSrc){
	if(sSrc){
		document.images[sName].src = sSrc;
	}else{
		document.images[sName].src = arImages[sName].src;
	}
}

//Popup window function.
function openWindow(sURL,winName,sFeatures) {

  if(!sFeatures){
	sFeatures = "width=640,height=540";
  }

  newWin = window.open(sURL,"newWin",sFeatures);
  newWin.focus();

}

function rotateButton(i,s){
	document.images[i].src = s;
}