var ns4 = navigator.appName.indexOf("Netscape") != -1 && navigator.appVersion.charAt(0) >= 3
var ie4 = navigator.appName.indexOf("Microsoft Internet Explorer") != -1 && navigator.appVersion.charAt(0) >= 4
// ---- Initial Values ----
var onMousedLayer = '';
self.name = "cxhome";
// ------------------------

function rollOver(NAME){
	imagesON = eval(NAME + "_on.src");
	document.images[NAME].src= imagesON;
}
function rollOut(NAME){
	imageOFF = eval(NAME + "_off.src");
	document.images[NAME].src= imageOFF;
}
function showLayer(NAME){
	if (onMousedLayer != '') {
		hideLayer(onMousedLayer);
	}
	if (ns4) {
		if (document.layers[NAME] != null) {
			document.layers[NAME].visibility = "show";
			onMousedLayer = NAME;
		}
	}
	if (ie4) {
		if (document.all[NAME] != null) {
			document.all[NAME].style.visibility = "visible";
			onMousedLayer = NAME;
		}
	}
}
function hideLayer(NAME){
	if (ns4) {
		if (document.layers[NAME] != null) {
			document.layers[NAME].visibility = "hide";
		}
	}
	if (ie4) {
		if (document.all[NAME] != null) {
			document.all[NAME].style.visibility = "hidden";
		}
	}
}
function popUpWin(url, x, y) {
	if (x == null || y == null) {
		var newWin = window.open(url, '');
	} else {
		eval ("window.open(url, 'Popup', 'width="+x+",height="+y+",,resizable=1,scrollbars=1');")
	}
}
function onlinePopup(url) {
	newWin = window.open(url,'TripFlowWindow','resizable=yes,status=no,menubar=yes,location=no,toolbar=yes,scrollbars=yes');
}
function getCookie(Name)
	{ var search = Name + "=";
	  if (document.cookie.length > 0)
		{ // if there are any cookies
		  offset = document.cookie.indexOf(search);
		  if (offset != -1)
		  	{ // if cookie exists 
			  offset += search.length;
			  // set index of beginning of value
			  end = document.cookie.indexOf(";", offset);
			  // set index of end of cookie value
		      if (end == -1)
				end = document.cookie.length;
			  return unescape(document.cookie.substring(offset, end));
			}
		}
	}
function netscapeReload(){
	if (ns4) {
		location.reload();
	}
}
