var active_menu=null;
var tid=null;

function startTimer(x) {
	tid=window.setTimeout("delay();", 2000);
}

function stopTimer() {
	if (tid)  
		window.clearTimeout(tid);
	tid=null;	
};

function showChild(obj){
	var ullis = obj.getElementsByTagName("UL");
	ullis[0].style.display = "block";
}
function delay(){
	if (active_menu) {
		hideChild(active_menu);
	};
}
function hideChild(mainobj){
	var obj = active_menu;
	var ullis = obj.getElementsByTagName("UL");
	ullis[0].style.display = "none";	
}

function processOnParentMouseOver(obj) {
	if (active_menu) 
		hideChild(active_menu);
	active_menu=obj;
	showChild(obj);
	stopTimer();	
}

function processOnChildMouseOver() {
	stopTimer();
}

function processOnMouseOut() {
	startTimer();
}


activateMenu = function(nav) {
	if (document.all && document.getElementById(nav).currentStyle) {  
		var navroot = document.getElementById(nav);	
		/* Get all the list items within the menu */
		var lis=navroot.getElementsByTagName("LI"); 
		for (i=0; i<lis.length; i++) {
			lis[i].onmouseover = function(){
				if(this.className != "simplecheck headertabshover")
					this.className = "headertabshover";
			}
			lis[i].onmouseout = function(){
				if(this.className != "simplecheck headertabshover")
					this.className = "none";
			}
		}
	}
}

/*
window.onload= function(){
    activateMenu('headertabs'); 
}
*/

function openWindow(url) { popupWin = window.open(url, 'openWin', "width=500, height=400, scrollbars=yes, resizable=yes"); } 

function openWindow1(url) { popupWin = window.open(url, 'openWin', "width=500, height=400, scrollbars=yes, resizable=yes"); } 

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}