	var bPageLoaded = false;
	var navCount = 5;
	var timerID = null;
	var currentImgOn = '';
	var currentDrop = '';
	var topOffset = 68;
	
	preloadImage("nav1On", "city_navpic_citydept_H.jpg");
	preloadImage("nav1Off", "city_navpic_citydept_I.jpg");

	preloadImage("nav2On", "city_navpic_destination_H.jpg");
	preloadImage("nav2Off", "city_navpic_destination_I.jpg");

	preloadImage("nav3On", "city_navpic_neighborhood_H.jpg");
	preloadImage("nav3Off", "city_navpic_neighborhood_I.jpg");

	preloadImage("nav4On", "city_navpic_business_H.jpg");
	preloadImage("nav4Off", "city_navpic_business_I.jpg");

	preloadImage("nav5On", "city_navpic_families_H.jpg");
	preloadImage("nav5Off", "city_navpic_families_I.jpg");

	function init() {
		bPageLoaded = true;
		
		if (document.getElementById("homeTopBoxPopular"))
			topOffset += 135;
		
		var divNav = document.getElementById("navMain1");
		if (document.getElementById("navBoundsOuter")) {
			document.getElementById("navBoundsOuter").style.top = (topOffset - 44) + "px";
			document.getElementById("navBoundsUnder").style.top = (topOffset + 78) + "px";
		}
		
		//if there are at least two announcement boxes (first one is anncBox0) then
		//kick off the fadein/out announcement timer
		if (document.getElementById("anncBox1")) {
			fadeAnnc();
		}

		//if there are at least three feature boxes (first one is featBox0) then
		//kick off the fadein/out feature timer
		if (document.getElementById("featBox2")) {
			fadeFeat();
		}
	}

	function showPull(which, _hideDrops) {
		
		currentImgOn = '';
		imgOn(which);
		currentDrop = which;
		var siteWrap = document.getElementById("siteWrap");
		var divNav = document.getElementById("navMain" + which);
		var divPull = document.getElementById("popSub" + which);

		var posT = topOffset;
		var posL = siteWrap.offsetLeft;
		if (which == '4' || which == '5') {
			posL += divNav.offsetLeft - divPull.offsetWidth + 1;
		}
		else
			posL += divNav.offsetLeft + divNav.offsetWidth - 1;
		
		if (_hideDrops) 
			hideDrops();

		divPull.style.top = posT + "px";
		divPull.style.left = posL + "px";
		divPull.style.visibility = "visible";

	}
	
	function hidePull() {
		if (currentImgOn == '') return;
		
		if (document.getElementById("popSub" + currentImgOn)) {
			divPull = document.getElementById("popSub" + currentImgOn);
			divPull.style.visibility = "hidden";
			imgOff(currentImgOn);
			currentImgOn = '';
			currentDrop = '';
			showDrops();
		}
			
	}
	
	function hideDrops() {
		if (document.getElementsByTagName) {
			for (var s = 0; s < document.getElementsByTagName("SELECT").length; s++) {
				document.getElementsByTagName("SELECT")[s].style.visibility = "hidden";
			}
		}
		else if (document.tags) {
			document.tags.select.visibility = "hidden";
		}
	}
	
	function showDrops() {
		if (document.getElementsByTagName) {
			for (var s = 0; s < document.getElementsByTagName("SELECT").length; s++) {
				document.getElementsByTagName("SELECT")[s].style.visibility = "visible";
			}
		}
		else if (document.tags) {
			document.tags.select.visibility = "visible";
		}
	}
	
	function imgOn(which) {
	
		if (bPageLoaded && which != currentImgOn) {
			if (currentImgOn != '')
				hidePull();
			currentImgOn = which;
			document["nav" + which].src = eval("nav" + which + "On").src;
			document.getElementById("navMain" + which).style.backgroundColor = '#bdc8d6';
			document.getElementById("navMain" + which).style.borderBottom = "solid 1px #000";

		}
	}
	
	function imgOff(which) {
		if (bPageLoaded) {
			document["nav" + which].src = eval("nav" + which + "Off").src;
			document.getElementById("navMain" + which).style.backgroundColor = '#fff';
			document.getElementById("navMain" + which).style.borderBottom = "solid 1px #fff";
		}
	}
	
	function navOn(whichSub) {
		document.getElementById("popNav" + whichSub).style.backgroundColor = '#bdc8d6';
	}
	
	function navOff(whichSub) {
		document.getElementById("popNav" + whichSub).style.backgroundColor = '#fff';
	}
	
	
	
	function preloadImage(imgObj,imgSrc) {
		eval(imgObj + ' = new Image()');
		eval(imgObj + '.src = "/shared/images/' + imgSrc + '"');
	}
	
	
	///////////////////////////////
	//pop windows...
	///////////////////////////////

	function zoomThumb(img) {
	
		window.open('/dept/zoom.aspx?img=' + img, 'popZoom','screenx=150,screeny=75,left=150,top=75,width=500,height=400,menubar=no,toolbar=no,location=no,status=no,directories=no,copyhistory=no,scrollbars=auto,resizable=yes');
	
	}
	
	
	
	
