ns=window.navigator.appName == "Netscape"
ie=window.navigator.appName == "Microsoft Internet Explorer"


function openMenu(x) {
	if (x==0) {nameO="Home"}
	if (x==1) {nameO="Products"}
	if (x==2) {nameO="Contact"}
	if (x==3) {nameO="Help"}
	if (x==4) {nameO="TC"}
	if (x==5) {nameO="HEAT"}
	if (x==6) {nameO="RTD"}
	if (x==7) {nameO="CABLE"}
    if (x==8) {nameO="MET"}
	
	dropWindow=document.getElementById(nameO)
	dropWindow.style.visibility = "visible";
	if (ie) {
		dropWindow.style.top=210;
	}
	if (ns) {
		dropWindow.style.top=203;
	}

	
	items=9;
	for (z=0;z<items;z++) {
		if (z==0) {nameO="Home"}
		if (z==1) {nameO="Products"}
		if (z==2) {nameO="Contact"}
		if (z==3) {nameO="Help"}
		if (z==4) {nameO="TC"}
		if (z==5) {nameO="HEAT"}
		if (z==6) {nameO="RTD"}
		if (z==7) {nameO="CABLE"}
        if (z==8) {nameO="MET"}
		if ((z!=x)&&(x<4)) {
			dropWindow=document.getElementById(nameO)
			dropWindow.style.visibility = "hidden";
		}
		if ((z!=x)&&(x>3)) {
			if(z!=1){
				dropWindow=document.getElementById(nameO)
				dropWindow.style.visibility = "hidden";
			}
		}
	}

}

function fillTable(x,y,z){
	document.write(divs[x]);
	document.write(makeTable[0]);
	for (i=y;i<=z;i++){
		document.write(makeTable[1]);
		document.write(links[i]);
	}
	document.write(makeTable[2]);
}


function buildHeader(x,y,z){
	if (x=0){document.write(divs[20]);}
	if (x=1){document.write(divs[21]);}
	document.write(makeTable[3]);
	document.write(makeTable[4]);
	document.write(makeTable[3]);
	
	for (i=y;i<=z;i++){
		document.write(setHeader[i]);
	}
	document.write(makeTable[7]);
}

function closeMenu() {
	var items = 9 
   	for (i=0; i<items; i++) {
   		items=9;
		for (z=0;z<items;z++) {
			if (z==0) {nameO="Home"}
			if (z==1) {nameO="Products"}
			if (z==2) {nameO="Contact"}
			if (z==3) {nameO="Help"}
			if (z==4) {nameO="TC"}
			if (z==5) {nameO="HEAT"}
			if (z==6) {nameO="RTD"}
			if (z==7) {nameO="CABLE"}
            if (z==8) {nameO="MET"}
			dropWindow=document.getElementById(nameO)
			dropWindow.style.visibility = "hidden";
		}
	}          
}