// SET VARIABLES FOR CROSS BROWSER LAYER/OBJECT FUNCTIONS

	IE = false;
	NS = false;
	NoScripts = true;

	if (document.all) 
	{	IE = true;
		NoScripts = false;
		cbObj =		"document.all";			
		cbObjR =		"document.all";
		cbObjEnd =	"</div>";
		cbObjEndR =	"</div>";
	     cbVisible =	"visible";
	     cbHidden =	"hidden";
		cbPrep =		".style.";
		cbLeft =		".style.pixelLeft";
		cbRight = 	".style.pixelRight";
		cbTop =		".style.pixelTop";
		cbBottom =	".style.pixelBottom";
		cbBgColor =	".style.backgroundColor";
		} 
	else {if (document.layers)
	{	NS = true;
		NoScripts = false;
		cbObj =		"document.layers";
		cbObjR =		"document.ilayers";
		cbObjEnd =	"</layer>";
		cbObjEndR =	"</ilayer>";
		cbVisible =	"show";
		cbHidden =	"hide";
		cbPrep =		".";
		cbLeft =		".left";
		cbRight = 	".right";
		cbTop =		".top";
		cbBottom =	".bottom";
		cbBgColor =	".bgColor";
	}}
		cbLB = 		"['";
		cbRB = 		"']";
		cbVisibility =	cbPrep + "visibility";
		cbIndex=		cbPrep + "zIndex";
		cbClip=		cbPrep + "clip";
		cbBgImage =	cbPrep + "background";
		cbWidth =		cbPrep + "clip.width";
		cbBorderS =	cbPrep + "borderStyle";
		cbBorderW =	cbPrep + "borderWidths";
		cbFontSize =	cbPrep + "fontSize";
		cbFont =		cbPrep + "fontFamily";


// INCLUDE CROSS BROWSER LAYER/OBJECT FUNCTIONS

function cbSet(objName,objProp,PropValue)
{	var str = cbObj + cbLB + objName + cbRB + objProp + "='" + PropValue + "';";
	eval(str);
}

function cbProp(objName,objProp)
{	return eval(cbObj + cbLB + objName + cbRB + objProp);
}

function cbObject(objName,x,y)	//absolute position
{	var htmlStr;
	if (IE)
	{	htmlStr = "<div id='" + objName + "'  style='position:absolute;top:" + y + ";left:" + x + ";'>";
	} 
	else  
	{	y += 0;
		x += 0;
		htmlStr = "<layer name=" + objName + " top=" + y + " left=" + x + " height=0>";
	}
	return htmlStr;
}

function cbObjectR(objName,x,y)	//relative position
{	var htmlStr;
	if (IE)
	{	htmlStr = "<div id='" + objName + "'  style='position:relative;top:" + y + ";left:" + x + ";'>";
	} 
	else  
	{	x -=7;
		htmlStr = "<ilayer name=" + objName + " top=" + y + " left=" + x + ">";
	}
	return htmlStr;
}

function showBkground(objName)
{	eval(cbObj + cbLB + objName + cbRB + cbLeft + "+=1;");
}

function cbShowB(objName)
{	cbSet(objName, cbVisibility, cbVisible);
	var timedCall = "showBkground('" + objName + "')";
	TimeoutID = setTimeout(timedCall,1);
}

function cbShow(objName)
{	cbSet(objName, cbVisibility, cbVisible);
}


function cbHide(objName)
{	cbSet(objName, cbVisibility, cbHidden);
}

function cbInnerHTML(objName,htmlStr)
{	if (IE)
	{	eval(cbObj + cbLB + objName + cbRB + '.innerHTML="' + htmlStr + '";');
	}
	else // only works on absolute positioned layers in Netscape
	{	eval('document["' + objName + '"].document.write("' + htmlStr + '");');
		eval('document["' + objName + '"].document.close();');
	}
}

function cbClipLeft(objName,x)
{	if (IE)
	{	eval(cbObj + cbLB + objName + cbRB + cbClip + "='rect(auto auto auto " + x + ")';");
	}
	else
	{	eval(cbObj + cbLB + objName + cbRB + cbClip + ".left='" + x + "';");
	}
}

function cbClipBottom(objName,y)
{	if (IE)
	{	eval(cbObj + cbLB + objName + cbRB + cbClip + "='rect(auto auto " + y + " auto)';");
	}
	else
	{	eval(cbObj + cbLB + objName + cbRB + cbClip + ".bottom='" + y + "';");
	}
}

function cbShowMain(objName)
{	eval("window.top.main.window" + cbObj + cbLB + objName + cbRB + cbVisibility + "='" + cbVisible + "';");
}

function cbHideMain(objName)
{	eval("window.top.main.window." + cbObj + cbLB + objName + cbRB + cbVisibility + "='" + cbHidden + "';");
}
