root = window.loc

ns=(document.layers)?true:false;
ns6=(document.getElementById&&!document.all)?true:false;
ie=(document.all)?true:false;

function imgSwap(imgName,src,status) {
  if(ie||ns6){
		imgDiv=window;
	}
  if(ns){
		if(window.whichSection != "recruit"){
			imgDiv=document.container.document.sideNavDiv.document.sideNav;
		}else{
			imgDiv=document.container.document.sideNav;
		}
	}
	imgDiv.document[imgName].src = root + "images/"+src+".gif"
	if(status != null){
		window.status = status;
	}
}

function getURL(){
	 if(ie||ns6)var f = eval("window.document.servicesDrop.services");
  if(ns) var f = eval("document.copy.document.servicesDrop.services");
	
	var strMake = f.options[f.selectedIndex].value;
	
	if (strMake == 'None')
		strMake = "";
	else
		strMake = strMake;
	
	document.location.href =  "servicesList.html#service" + strMake;
}    

function openWin(URL,name,sizeX, sizeY,loc,menu,scrollbars) {
	if(loc){
		thisLoc = "yes";
	} else {
		thisLoc = "no";
	}
	if(menu){
		menuVal = "yes";
	} else {
		menuVal = "no";
	}
	if(scrollbars){
		scrollbar = "yes";
	} else {
		scrollbar = "no";
	}

	winLeft=eval(screen.availWidth/2)-(sizeX/2);
	winTop=eval(screen.availHeight/2)-(sizeY/2);
  siteWindow = window.open
	(URL,"pop","width="+sizeX+",height="+sizeY+",toolbar=no,location="+thisLoc+",directories=no,status=no,menubar="+menuVal+",scrollbars="+scrollbar+",resizable=yes,left="+winLeft+",top="+winTop)
}

lastPhoto = "";
function setLast(which){
	if(which!=lastPhoto){
		if(lastPhoto!=""){
		document.getElementById("photo_"+lastPhoto).src = root + "images/spacer.gif";
			if(document.getElementById("text_"+lastPhoto) != null){
				document.getElementById("arrow_"+lastPhoto).src = root + "images/spacer.gif";
				document.getElementById("text_"+lastPhoto).className="blueText";
			}
		}
		lastPhoto = which;
	}
}

function checkName(){
	loc = document.location.href;
	if(loc.indexOf("who=")>-1){
		who = loc.substring(loc.indexOf("who=")+4);
		photoSwap(who,1,'global');	
		setLast(who);
	}
}

function selectWho(){
	loc = document.location.href;
	which = "";
	if(loc.indexOf("?")>-1){
		who = loc.substring(loc.indexOf("who=")+4);
		info.location.href = "../ourPeople/pop_"+who+".html"
		checkName();
	}
}

function photoSwap(imgName,state,type) {
	if(lastPhoto!=imgName){
		if(state == 1){
			srcArrow = "arrow_people"
			srcBorder = "border"
		}else{
			srcArrow = "spacer"
			srcBorder = "spacer"
		}
		if(document.getElementById("text_"+imgName) != null){
			document.getElementById("arrow_"+imgName).src = root + "images/"+srcArrow+".gif";
			document.getElementById("text_"+imgName).className=type;
		}
		document.getElementById("photo_"+imgName).src = root + "images/"+srcBorder+".gif"
	}
}

function showTitle(val){
	if(parent.leadership == true || opener.leadership == true ){
		document.write("<div class='popLeaderTitle'>"+val+"</div>");
	}
}

if(document.getElementById("footerDiv")!=null){
	document.getElementById("footerDiv").style.visibility="hidden";
	document.getElementById("footerDiv").style.position = "absolute";
}

hasPhoto = true;
function showPhoto(which){
	if(parent.hasPhoto!=false){
		document.write("<img src=\"../images/ourPeople/photo_"+which+".jpg\" width=\"159\" height=\"100\" alt=\"\" style=\"margin-right:10px\">");
	}
}

function checkType(){
	if(parent.leadership == true){
		document.getElementById("footerDiv").style.visibility="hidden";
		document.getElementById("footerDiv").style.position="absolute";
		document.body.style.marginTop="0px";
	}
}
