var	ie=document.all
var	dom=document.getElementById

function MoveObject(sObjectName, iLeftPosition, iTopPosition){
	oObject = document.getElementById(sObjectName);
	oObject.style.left = iLeftPosition;
	oObject.style.top = iTopPosition;
}

function GetLeftPosition(sAnchorName)
{
	iLeftPosition = 0;
	aAnchor = document.getElementById(sAnchorName);
	aTag = aAnchor;
	do {
		aTag = aTag.offsetParent;
		iLeftPosition += aTag.offsetLeft;
	} while(aTag.tagName!="BODY");
	return iLeftPosition;
}

function GetTopPosition(sAnchorName)
{
	iTopPosition = 0;
	aAnchor = document.getElementById(sAnchorName);
	aTag = aAnchor;
	do {
		aTag = aTag.offsetParent;
		iTopPosition += aTag.offsetTop;
	} while(aTag.tagName!="BODY");
	return iTopPosition;
}

function ToggleObjectVisibility(sDivName)
{
	dDiv = document.getElementById(sDivName);
	if(dDiv.style.visibility == 'hidden')
	{
		dDiv.style.visibility=(dom||ie)? "visible" : "show";
	}
	else
	{
		dDiv.style.visibility = 'hidden';
	}
}

function ChangeCursor(oObject,sCursor)
{
	oObject.style.cursor = sCursor;
}

function ClearElement(element)
{
	var myElement = document.getElementById(element);
	var length = myElement.childNodes.length; 
	for (i=0;i<length;i++){
       myElement.removeChild(myElement.childNodes[0]);
  	}
}
function GetDocumentWidth()
{
 	if(ie)
		iDocumentWidth = (document.body.offsetWidth-70)
	else
		iDocumentWidth = (window.navigator.innerWidth-70)
	return iDocumentWidth
}
function GetDocumentHeight()
{
 	if(ie)
		iDocumentWidth = (document.body.offsetHeight) - 4
	else
		iDocumentWidth = (window.navigator.offsetHeight) - 4
	return iDocumentWidth
}
function OpenWindow(sURL,sName,sFeatures)
{
	wForward = window.open(sURL,sName,sFeatures);
	wForward.focus();
}