//
//
// The following contains miscellaneous Dynamic HTML routines
// assuming the use of DOM compatible browser.
//
// Modified: September 12, 2003
//
//

self.focus()


function getObj(obj)
{	return document.getElementById(obj).style
}



function show(layr)
{	obj = getObj(layr)
	obj.visibility = "visible"
}

function hide(layr)
{	obj = getObj(layr)
	obj.visibility = "hidden"
}



function setTop(layr,num)
{	obj = getObj(layr)
	obj.top = num
}

function setLeft(layr,num)
{	obj = getObj(layr)
	obj.left = num
}



function incTop(layr,num)
{	obj = getObj(layr)
	obj.top = getTop(layr) + num
}

function incLeft(layr,num)
{	obj = getObj(layr)
	obj.left = getLeft(layr) + num
}



function getTop(layr)
{	obj = getObj(layr)
	if (is.mac && is.ie5up)
	{	return (obj.posTop)
	}
	else
	{	return (document.getElementById(layr).offsetTop)
	}
}

function getLeft(layr)
{	obj = getObj(layr)
	if (is.mac && is.ie5up)
	{	return (obj.posLeft)
	}
	else
	{	return (document.getElementById(layr).offsetLeft)
	}
}



function getWidth(layr)
{	return (document.getElementById(layr).offsetWidth)
}
	
function getHeight(layr)
{	return (document.getElementById(layr).offsetHeight)
}



function layerClip(layr,topA,rightA,bottomA,leftA)
{	obj = getObj(layr)
	obj.clip = "rect(" + topA + " " + rightA + " " + bottomA + " " + leftA + ")"
}

function setZindex(layr,num)
{	obj = getObj(layr)
	obj.zIndex = num
}



function browserWidth()
{	if (is.nav)
	{	return (window.innerWidth)
	}
	else
	{	return (document.body.clientWidth)
	}
}

function browserHeight()
{	if (is.nav)
	{	return (window.innerHeight)
	}
	else
	{	return (document.body.clientHeight)
	}
}



