loaded = false;
for(i = 1; i <= 4; i ++){
	eval("t" + i + "= new Image; t" + i + ".src=\"../images/nav/t" + i + ".gif\"");
	eval("t" + i + "o= new Image; t" + i + "o.src=\"../images/nav/t" + i + "o.gif\"");
	eval("b" + i + "= new Image; b" + i + ".src=\"../images/home/b" + i + ".gif\"");
	eval("b" + i + "o= new Image; b" + i + "o.src=\"../images/home/b" + i + "o.gif\"");
}
function swap(n, s){
	eval("document." + n + ".src=" + s + ".src");
}
ns = (document.layers)? true:false
ie = (document.all)? true:false
ns6 = (navigator.appName == "Netscape" && document.getElementById)? true:false
winIE5 = false;
var browserString = navigator.appVersion;
if (navigator.userAgent.indexOf("Win") > -1 && navigator.appName == "Microsoft Internet Explorer"){
	if (parseInt(browserString.charAt(22)) < 6){
		winIE5 = true;
	}
}
macIE = false;
macNS = false;
var browserString = navigator.appVersion;
if (navigator.userAgent.indexOf("Mac") > -1 && navigator.appName == "Microsoft Internet Explorer"){
	macIE = true;
}else if(navigator.userAgent.indexOf("Mac") > -1 && navigator.appName != "Microsoft Internet Explorer"){
	macNS = true;
}
function openWin(page,name,width,height,scroll,resize){
window.open(page,name,"toolbar=0,location=0,status=0,menubar=0,scrollbars=" + scroll + ",resizable=" + resize + ",top=0,left=0,width=" + width + ",height=" + height)
}
function oroll(n){
	//alert(loaded);
	if(spreadIt){
		for(i = 1; i <= 4; i ++){
			if(i == n){
				swap("p" + i,"b" + i + "o");
				//if(spreadIt){
					x = n;
					if(n == 1){
						x = "";
					}
					if(ie){
						document.all["theBase" + x].style.backgroundColor='000066';
					}else if(ns6){
						var obj = eval("document.getElementById('theBase" + x + "')")
						obj.style.backgroundColor='000066';
					}else if(ns){
						//what's the syntax?
						//document.layers[id].visibility = "hide"
					}
				//}
			}else{
				swap("p" + i,"b" + i);
				//if(spreadIt){
					x = i;
					if(i == 1){
						x = "";
					}
					if(ie){
						document.all["theBase" + x].style.backgroundColor='FF9900';
					}else if(ns6){
						var obj = eval("document.getElementById('theBase" + x + "')")
						obj.style.backgroundColor='FF9900';
					}else if(ns){

					}
				//}
			}
		}
	}
}
function orollOver(n, state){
	if(state > 0){
		swap("p" + n,"b" + n + "o");
		if(n == 1){
			n = "";
		}
		if(ie){
			document.all["theBase" + n].style.backgroundColor='000066';
		}else if(ns6){
			var obj = eval("document.getElementById('theBase" + n + "')")
			obj.style.backgroundColor='000066';
		}else if(ns){
			//what's the syntax?
			//document.layers[id].visibility = "hide"
		}
	}else{
		swap("p" + n,"b" + n);
		if(n == 1){
			n = "";
		}
		if(ie){
			document.all["theBase" + n].style.backgroundColor='FF9900';
		}else if(ns6){
			var obj = eval("document.getElementById('theBase" + n + "')")
			obj.style.backgroundColor='FF9900';
		}else if(ns){

		}
	}
}
function clearAll(){
	oroll(-1);
	hide("bigHide");
}
function doNav(ele,state){
	if(state > 0){
		ele.style.backgroundColor='FF9900';
		ele.style.color='000000';
	}else{
		ele.style.backgroundColor='000066';
		ele.style.color='ffffff';
	}
}
function doPageNav(ele,state){
	if(state > 0){
		ele.style.backgroundColor='FF9900';
		ele.style.color='ffffff';
	}else{
		ele.style.backgroundColor='6699CC';
		ele.style.color='ffffff';
	}
}
function doNavTC(ele,state){
	if(state > 0){
		ele.style.backgroundColor='BAD9F9';
		ele.style.color='000000';
	}else{
		ele.style.backgroundColor='FF9900';
		ele.style.color='000000';
	}
}
function doNavTCnon(ele,state){
	if(state > 0){
		ele.style.backgroundColor='BAD9F9';
		ele.style.color='000000';
	}else{
		ele.style.backgroundColor='003366';
		ele.style.color='000000';
	}
}
function pageSub(pageArray, highlight, butName){
	pageArray = eval(pageArray);
	pnavHTML = "";
	theLine = "<tr><td bgcolor='ffffff'><img src=\"../images/spacer.gif\"></td></tr>";
	theShim = "<img src=\"../images/spacer.gif\" width=1 height=5>"
	pnavHTML += theLine;
	pnavHTML += "<tr><td><a href=\"default.asp\" target=\"_top\"><img src=\"../images/buttons/" + butName + ".gif\" width=211 height=29 border=0></a></td></tr>";
	for(p = 0; p < pageArray.length; p ++){
		theClass = "leftNav";
		mouseAction = "onMouseOver=\"doPageNav(this,1);\" onMouseOut=\"doPageNav(this,0);\" ";
		if(p == highlight){
			theClass = "leftNavHighlight";
			mouseAction = "";
		}
		if(ns){
			theLink = "<a href=\"" + pageArray[p].goLink + "\" target=\"_top\">" + pageArray[p].displayText + "</a>";
		}else{
			theLink = pageArray[p].displayText;
		}
		pnavHTML += theLine;
		pnavHTML += "<tr><td bgcolor='0066CC' class=\"" + theClass + "\" " + mouseAction + " onClick=\"parent.location='" + pageArray[p].goLink + "';\">" + theShim + "<br>" + theLink + "<br>" + theShim + "</td></tr>";
	}
	pnavHTML += theLine;
	document.write(pnavHTML);
}
function storeDefault(){
	pageHTML = "";
	for(h = 0; h < depts.length; h ++){
		pageHTML += "<a href=\"" + depts[h].goLink + "\">" + depts[h].displayText + "</a><p>";
	}
	document.write(pageHTML);
}
function gopage(f, dept){
	//alert(f.elements["applied"].value);
	parent.location='../store/browse.asp?dept=' + dept + '&page=' + f;
}

function menuItem(displayText,goLink,theX,id){
	this.displayText = displayText;
	this.goLink = goLink;
	this.theX = theX;
	this.id = id;
}
sub1 = new Array();
	sub1[0] = new menuItem("Broadcast","../tower_sites/broadcast.asp",-2);
	sub1[1] = new menuItem("Leasing","../tower_sites/leasing.asp");
	sub1[2] = new menuItem("Management","../tower_sites/management.asp");
	sub1[3] = new menuItem("Tower Locations","../tower_sites/locations.asp");
NavAbout = new Array();
	NavAbout[0] = new menuItem("Company Profile","../about");
	NavAbout[1] = new menuItem("Company News","../about/news.asp");
	NavAbout[2] = new menuItem("Company Events","../about/events.asp");
	NavAbout[3] = new menuItem("Facility Locations","../about/locations.asp");
	NavAbout[4] = new menuItem("Employment Opportunities","../about/employment.asp");
	NavAbout[5] = new menuItem("Contact Us","../about/contact.asp");
	
function isLoaded(){
	//loaded = true;
}