ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function getDiv(divName) {	
	if (ns4) return (document.layers[divName]);
	else if (ie4) return (document.all[divName]);	
}

function changeDiv(div, page) 
{
	if (ns4) 
		eval("document." + div + "Layer.src = page")
	else 
		if (ie4) 
			eval("parent." + div + "Frame.document.location = page")			
}

function showDiv(divName) {
	var obj = getDiv(divName);	
	if (obj != null)
	{
		if (ns4) obj.visibility = "show";
		else if (ie4) obj.style.visibility = "visible";
	}			
}

function hideDiv(divName) {
	var obj = getDiv(divName);	
	if (obj != null)
	{
		if (ns4) obj.visibility = "hide";
		else if (ie4) obj.style.visibility = "hidden";
	}			
}

function moveDivBy(divName,x,y) {
	var theDiv = getDiv(divName);	
	if (ns4) 
	{
		theDiv.moveBy(x,y);
	} 
	else if (ie4)
	{
		theDiv.style.pixelLeft += x; 
		theDiv.style.pixelTop += y;
	} 
} 

function moveDiv(divName,x,y) {
	var theDiv = getDiv(divName);	
	if (ns4) 
	{
		theDiv.moveTo(x,y);
	} 
	else if (ie4)
	{
		theDiv.style.pixelLeft = x; 
		theDiv.style.pixelTop = y;
	} 
} 

	
	
