var ie;
var n;

ie = 1;

if (document.layers) {ie=0;n=1}
if (document.all) {ie=1;n=0}

function noLink() {
	void(0);
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function showWord(theWord) {
	if (n) {
		eval("document." + theWord + "Pop.visibility = 'show';");
	} else {
		theHeight = eval(theWord + "Pop.scrollHeight");
		if (document.body.clientWidth - window.event.clientX <= 250) {
			sideOffset = 250;
		} else sideOffset = 0;
		topOffset = document.body.scrollTop;
		if (document.body.clientHeight - window.event.clientY <= theHeight) {
			topOffset = topOffset - theHeight;
		}

		eval(theWord + "Pop.style.left = window.event.clientX - sideOffset;");
		eval(theWord + "Pop.style.top = window.event.clientY + topOffset;");
		eval(theWord + "Pop.style.visibility = 'visible';");
	}
}

function hideWord(theWord) {
	if (n) {
		eval("document." + theWord + "Pop.visibility = 'hidden';");
	} else {
		eval(theWord + "Pop.style.top = 0;");
		eval(theWord + "Pop.style.left = 0;");
		eval(theWord + "Pop.style.visibility = 'hidden';");
	}
}

function showMenu(layerName, layerWrapper) {
	if (n) {
		eval("document." + layerName + ".visibility = 'show';");
	} else {
		eval("if (" + layerName + ".scrollWidth < " + layerWrapper + ".scrollWidth) " + layerName + ".style.left = parseInt((" + layerWrapper + ".scrollWidth - 100) / 2);");
//		eval(layerName + ".style.left = parseInt((" + layerWrapper + ".scrollWidth - 100) / 2);");
		eval(layerName + ".style.visibility = 'visible';");
		if (typeof(flashDiv) != "undefined") {
			flashDiv.style.visibility = 'hidden';
		}
	}
}

function hideMenu(layerName) {
	if (n) {
		eval("document." + layerName + ".visibility = 'hide';");
	} else {
		eval(layerName + ".style.visibility = 'hidden';");
		if (typeof(flashDiv) != "undefined") {
			flashDiv.style.visibility = 'visible';
		}
	}
}

function otherColumns(listHow,id1,pageID,language) { //id1's value depends on how to list
	winColumnList = open("/other-columns-popup.asp?listHow=" + listHow + "&id1=" + id1 + "&pageID=" + pageID + "&language=" + language,"","height=200,width=245,scrollbars=yes");
}

// d = destination url
// h = height of window
// w = width of window
// s = scrollbars flag

function doPopupWindow(d, h, w, s) {
	beehivePopup = open(d, "", "height=" + h + ",width=" + w + ",scrollbars=" + s);
}

// uStr = destination url

function doLink(uStr) {
    opener.location = uStr;
    top.close();
}

function weatherPop2() {
	winWeather = open("local_weather_pop.asp","","height=200,width=300");
}
