lock = 0;
footer = "<a href=\"http://www.boeing.com\" class=\"link_footer\" target=\"boeing\">Boeing Home</a> | <a href=\"http://www.boeing.com/commercial/\" class=\"link_footer\" target=\"boeing\">Commercial Airplanes</a> | <a href=\"mailto:WebMaster.BCA@boeing.com\" class=\"link_footer\">Contact Aero</a> | Aero Copyright &copy; 2008 The Boeing Company. All rights reserved.";
function toggleDelay(state,which){
	//alert(which)
	//if(which!=0){
		document.getElementById("toolTip").style.top = (document.getElementById("artNum"+which).offsetParent.offsetTop+70+eval("bias_art"+which))+"px";//+70;
	//}
	if(state==1){
		document.getElementById("artNum"+which).style.border = "1px dashed";
		document.getElementById("artNum"+which).style.left=-3+"px";
		if(lock==0){
			timer = setInterval("toolTipToggle()",1000);
		}
		stateVal = state;
	}else{
		document.getElementById("artNum"+which).style.border = "none";
		document.getElementById("artNum"+which).style.left=-2+"px";
		if(lock==0){
			timer = setInterval("toolTipToggle()",1);
		}
		stateVal = state;
	}
	artNum = which;
	lock = 1;
}

function toolTipToggle(){
	lock = 0;
	clearTimeout(timer);
	document.getElementById("arrow").style.top = eval("art"+artNum+"_arrowPos")+"px";
	document.getElementById("toolTip_content").innerHTML = eval("art"+artNum+"_textVal");
	if(stateVal==1){
		vizState = 'visible';
	}else{
		vizState = 'hidden'
	}
	document.getElementById('toolTip').style.visibility=vizState;
}

function changeBg(which,state){
	if(state==1){
		bgColor = '#ed6e00'
	}else{
		bgColor = '#FFFFFF';	
	}
	document.getElementById(which).style.background=bgColor;
}

function openPop(which,width,height){
	leftVal = eval(screen.availWidth/2)-(width/2);
	topVal = (screen.availHeight/2)-(height/2);
	
	window.open('../../pop.html?'+which,'','left='+leftVal+',top='+topVal+',width='+width+',height='+height+',resizable=0,scrollbars=yes')
}

function centerScreen(URL,wide,high) {
  x = (screen.availWidth/2)-(wide/2);
	y = (screen.availHeight/2)-(high/2);
	if(screen.availWidth > 800){
		padX = 0;
		padY = 0//20;
	} else {
		padX = 18;
		padY = 10;
	}
	newX = x;
	newY = y;
	//Change the following URL to point to the directory where flash_detect.html resides, if different from the opener.
		childWin = window.open(URL,'pop','width='+(wide+padX)+',height='+(high+padY)+',status=no,location=no,left='+newX+',screenX='+newX+',top='+newY+',screenY='+newY+',scrollbars=no,resizable=no,menubar=no,toolbar=no');
}

lastTab = 1;
function tabToggle(which){
	if(lastTab!=which){
		document.getElementById("tab"+which+"_bg").style.visibility = "visible";
		document.getElementById("tab"+lastTab+"_bg").style.visibility = "hidden";
		lastTab = which;
	}
}

function setLink(which){
	currentLoc = document.referrer;
	folderLoc = currentLoc.substr(currentLoc.indexOf("qtr"),8);
	return "articles/"+folderLoc+"/"+which+".html";
}