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

function showLayers(i)
{
eval("document.all.layer" + i + ".style.visibility='visible';");
//eval("document.all.a"+i+".style.backgroundColor='#FCF6EC';");
//eval("document.all.f"+i+".style.color='#ff0000';");
}
function hideLayers(i)
{
eval("document.all.layer" + i + ".style.visibility='hidden';");
//eval("document.all.a" + i + ".style.backgroundColor='';");
//eval("document.all.f"+i+".style.color='#000000';");
}
function navbarOver(src, clrOver)
{
if(!src.contains(event.fromElement))
{
    //src.style.cursor = 'hand';
    src.bgColor = clrOver;
}
}
function navbarOut(src, clrIn)
{
if(!src.contains(event.toElement))
{
    //src.style.cursor = 'default';
    src.bgColor = clrIn;
}
}

// ---- 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 popUpWinWithStatus(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,status=1');")
	}	
}
function popWindow(url,winName) { //v2.0
	if (url != "")
		var w = window.open(url,winName,'width=640,height=400,scrollbars=1,resizable=0,status=0,menubar=0,fullscreen=0');
}

function popUpWinWithToolbar(url, x, y) {
	if (x == null || y == null) {
		var newWin = window.open(url, '');
	} else {
		eval ("window.open(url, 'Popup', 'width="+x+",height="+y+",,toolbar=yes,location=yes,resizable=1,scrollbars=1');")
	}	
}
