function swapImages(img_name, img_src){	if (document.images){		document[img_name].src = img_src;    }}function returnImgLoc(name, extension){	for(i=0;i<navTopLength;i++){		if(name.slice(0,3)==navTopArray[i].slice(0,3)){			var nameLeng=name.length;			var tempNum=name.slice(nameLeng-1,nameLeng);			var imgLoc='images/nav/subs/'+navSubArray[i][name.slice(nameLeng-1,nameLeng)-1]+''+extension+'.gif';		}	}	return imgLoc;}function showSub(name){	menuOver();	if(openedSubNav!=name){		openedSubNav=name;		for(i=0;i<navSubLength;i++){			if(name==navSubArray[i]){				document.getElementById(navSubArray[i]).style.visibility = 'visible';			}else{				document.getElementById(navSubArray[i]).style.visibility = 'hidden';			}		}	}}function hideSubs(){	showSub("none")}function openPopup(name, height, width){	var winl = (screen.width - width) / 2;	var wint = (screen.height - height) / 2;	var windowName = name.slice(name.indexOf('-')+1, 50);	var windowLoc = ''+name+'.html';	var winProps = 'toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width='+width+',height='+height+',top='+wint+',left='+winl;	window.open(windowLoc, windowName, winProps);}function getQueryVariable(variable) {  	var query = window.location.search.substring(1);  	var vars = query.split("&");  	for (var i=0;i<vars.length;i++) { 		var pair = vars[i].split("=");
   		if (pair[0] == variable) {
      		return pair[1];
		}
	}
}
function includeFlash(movieName, width, height, bgcolor, vars){
	var nocache=new Date().getTime();
	if(vars){
		urlvars=("?randomImage="+vars+"&nc="+nocache);
	}else{
		urlvars=("?nc="+nocache);
	}
	document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id='+movieName+' ALIGN="">'
		+'<PARAM NAME=movie VALUE="'+movieName+'.swf'+urlvars+'"><PARAM NAME=FlashVars VALUE="movieid='+nocache+'" />'		+'<PARAM NAME=salign VALUE="LT"><PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=noscale><PARAM NAME=bgcolor VALUE='+bgcolor+'>'		+'<EMBED src="'+movieName+'.swf'+urlvars+'" ' 		+'FlashVars="movieid='+nocache+'" quality=high scale=noscale bgcolor='+bgcolor+'  WIDTH="'+width+'" HEIGHT="'+height+'" NAME='+movieName+' SALIGN="LT"'		+'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>')}/********************************************************************** section 1 - below is an array of sections used in the navigation **********************************************************************/navTopArray=["about","tech","prod","invst","news","career","contact"];navSubArray=["prodSub2","prodSub3"];navTopLength=navTopArray.length;navSubLength=navSubArray.length;/********************************************************************** section 2 - below shows and hides navigation layers **********************************************************************/function show(id){	menuOver();	if(window.openedNav){	if(id!=openedNav){		if (id == "none") openedNav="none"		for(i=0;i<navTopLength;i++){			var topDivName = "nav"+(i+1);			var subDivName = navTopArray[i]+"Sub";			if(id==navTopArray[i]){				openedNav=navTopArray[i];				document.getElementById(subDivName).style.visibility = 'visible';				document.getElementById(topDivName).className = topDivName;			}else{				document.getElementById(subDivName).style.visibility = 'hidden';				document.getElementById(topDivName).className = 'topNav';			}		}	}	}	hideSubs();}function hideAll(){	show(pageSelected);	if(window.navItem2)showSub(pageSelected+"Sub"+navItem);}function menuOver(){	if(window.clearNav){		window.clearTimeout(clearNav);	}}function menuRevert(){	clearNav = window.setTimeout("hideAll()", 1500);}/********************************************************************** section 5 - below are the functions called on page load (content area) **********************************************************************/function init() {	if(window.navItem2 && window.navItem2!="none"){		document.getElementById(pageSelected+''+navItem+'-'+navItem2).className = (navItem2==1)?'navSelectLeft':'navSelect';	}else if(window.navItem){		document.getElementById(pageSelected+''+navItem).className = (navItem==1)?'navSelectLeft':'navSelect';
	}	if(window.newscheck){setNewsPage();}	hideAll();}
openedNav="none";openedSubNav="none";/**********************************************************************
 section 6 - Email update form validation **********************************************************************/function validateEmailUpdate() {	error_string="";					if (document.emailupdate.email.value==""){		error_string = "An email address.\n" + error_string;		document.emailupdate.email.focus();	} else if (document.emailupdate.email.value.indexOf("@")==-1 || document.emailupdate.email.value.indexOf(".")==-1){		error_string = "A valid email address.\n" + error_string;		alert("Please provide a valid email address.");		document.emailupdate.email.focus();		return false;	}	if (document.emailupdate.name.value==""){		error_string = "A name.\n" + error_string;		document.emailupdate.name.focus();	}    if (error_string!=""){		error_string = "The following must be provided: \n\n" + error_string;		alert(error_string);		return false; 	}else{		return true;	}}/**********************************************************************
 section 7 - This determines what news section the user is in and changes the style to match
 **********************************************************************/
function setNewsPage(){	var varLoc = document.cookie.indexOf("section")+8;	if(document.cookie.slice(varLoc, varLoc+3)=='inv'){		document.getElementById('copyArea').className="invstCopy";		pageSelected='invst'; //this tells the navigation which page is selected		navItem=1; //this tells the sub navigation which item should be selected		swapImages('imgA', 'images/topImgs/img4A.jpg');		swapImages('imgB', 'images/topImgs/img4B.gif');	}else{		document.getElementById('copyArea').className="newsCopy";		pageSelected='news'; //this tells the navigation which page is selected		navItem=1; //this tells the sub navigation which item should be selected		swapImages('imgA', 'images/topImgs/img5A.jpg');		swapImages('imgB', 'images/topImgs/img5B.gif');	}}