// JavaScript Documentvar currentDiv = [];var arrPreload = [];var curSub = "none";var intSub = "none";var curSrc = "none";var curId = "none";var curPop = "none";function init() {  if(window.curMainSec) {    document.getElementById(curMainSec).className = "subactive";  }  var arrDivs = document.getElementsByTagName("div");  for(i=0;i<arrDivs.length;i++) {    if(arrDivs[i].className=="showitem") {	  currentDiv[currentDiv.length] = arrDivs[i];	}  }  var arrAnchors = document.getElementsByTagName("a");  for(i=0;i<arrAnchors.length;i++) {		arrAnchors[i].onfocus = new Function("if(this.blur)this.blur()");		if(arrAnchors[i].rel=="rollover") {			arrAnchors[i].onmouseover = new Function("rollOver(this)");			arrAnchors[i].onmouseout = new Function("rollOut(this)");			arrAnchors[i].imgObj = arrAnchors[i].getElementsByTagName("img")[0];			arrAnchors[i].origSrc = arrAnchors[i].imgObj.src;			arrAnchors[i].overSrc = arrAnchors[i].imgObj.src.replace("_0.","_1.");			if (arrAnchors[i].className=="active") {				arrAnchors[i].imgObj.src = arrAnchors[i].overSrc;				obj_CurPortfolioImage = arrAnchors[i];			}			preLoad(arrAnchors[i].overSrc);		}		if(arrAnchors[i].rel=="rolloverportfolio") {			arrAnchors[i].imgObj = arrAnchors[i].getElementsByTagName("img")[0];			arrAnchors[i].origSrc = arrAnchors[i].imgObj.src;			arrAnchors[i].overSrc = arrAnchors[i].imgObj.src.replace("_0.","_1.");			preLoad(arrAnchors[i].overSrc);		}		if(arrAnchors[i].rel=="mainnav") {			arrAnchors[i].onmouseover = new Function("showSub(this)");			arrAnchors[i].onmouseout = new Function("subRollOut(this)");		}		if(arrAnchors[i].rel=="subroll") {			arrAnchors[i].onmouseover = new Function("subRollOver(this)");			arrAnchors[i].onmouseout = new Function("subRollOut(this)");		}  }//  preLoad("../images/shared/top_nav_bg_1.gif","../images/shared/drop_nav_bg_0.gif","../images/shared/drop_nav_bg_1.gif","../images/shared/sub_nav_bg_1.gif","../images/shared/sub_nav_bg_end_1.gif");}// init() is now called in footer include to avoid error when user clicks nav before page loaded// window.onload = init;function preLoad() {  for(j=0;j<arguments.length;j++) {    imgTemp = new Image();    imgTemp.src = arguments[j];    arrPreload[arrPreload.length] = imgTemp;  }}function showHideMult() {  var showStatus = (arguments[0]=="hide") ? "hideitem" : "showitem";  for(i=0;i<currentDiv.length;i++) {    currentDiv[i].className = "hideitem";  }  currentDiv = [];  for(i=1;i<arguments.length;i++) {    if(showStatus=="showitem") {      currentDiv[currentDiv.length] = document.getElementById(arguments[i]);	}    document.getElementById(arguments[i]).className = showStatus;  }}function rollOver(objTemp) {	if(obj_CurPortfolioImage!=objTemp) {		objTemp.imgObj.src = objTemp.overSrc;	}}function rollOut(objTemp) {	if(obj_CurPortfolioImage!=objTemp) {		objTemp.imgObj.src = objTemp.origSrc;	}}function showSub(objTemp) {  if(curSub!="none") {    document.getElementById(curSub).style.display = "none";  }  if(intSub!="none") {    clearInterval(intSub);  }  curSub = "sub"+objTemp.id;  if((curSub=="subcompany") || (curSub=="sublocations")) {    if(document.getElementById("areadropdown")!=null) {	  document.getElementById("areadropdown").style.visibility = "hidden";	}  } else {    if(document.getElementById("areadropdown")!=null) {	  document.getElementById("areadropdown").style.visibility = "visible";	}  }  document.getElementById(curSub).style.left = (document.getElementById("holder").offsetLeft + objTemp.offsetParent.offsetLeft + 18) + "px";  document.getElementById(curSub).style.display = "block";}function hideSub() {  document.getElementById(curSub).style.display = "none";  if((curSub=="subcompany") || (curSub=="sublocations")) {    if(document.getElementById("areadropdown")!=null) {	  document.getElementById("areadropdown").style.visibility = "visible";	}  }  if(intSub!="none") {    clearInterval(intSub);	intSub = "none";  }}function subRollOver(objTemp) {  if(intSub!="none") {    clearInterval(intSub);	intSub = "none";  }}function subRollOut(objTemp) {  intSub = setInterval("hideSub()",50);}function confirmDelete(strHref) {  if(confirm("Are you sure you want to delete this item?")) {    location = strHref;  } else {	return false;  }}function writeEmail(strDomain,strAddress,strContact) {  document.write('<a href="mailto:'+strAddress+'@'+strDomain+'>'+strAddress+'@'+strDomain+'</a>');}function doOffsetOver(strId,strSrc) {  curId = strId;  curSrc = document.getElementById(strId).src;  document.getElementById(strId).src = strSrc;}function doOffsetOut() {  document.getElementById(curId).src = curSrc;}function openWin(strUrl,strWidth,strHeight,strParams) {  if((curPop!=null) && (curPop!="none")) {    curPop.close();	curPop = "none";  }  strTempParam = "width="+strWidth+",height="+strHeight;  if(strParams!=null) strTempParam+=","+strParams;  var curPop = window.open(strUrl,'newwin',strTempParam);  curPop.focus();}var obj_CurPortfolioImage = "none";function setPortfolioImage(strSrc, obj_Anchor) {	if (obj_CurPortfolioImage!="none") {		obj_CurPortfolioImage.imgObj.src = obj_CurPortfolioImage.origSrc;	}	obj_CurPortfolioImage = obj_Anchor;	obj_CurPortfolioImage.imgObj.src = obj_CurPortfolioImage.overSrc;	document.getElementById("mainimage").style.backgroundImage = "url("+strSrc+")";	return false;}function popUp(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=1,width=580,height=600,left = 100,top = 98');");}