//*******************************************************************

// Check browser type and version

var isNN = (document.layers) ? true : false;

var isIE = (document.all) ? true : false;

var isV4 = ((isNN || isIE) && (parseInt(navigator.appVersion) >= 4 ) ); 

//if (!isV4)

//	alert('This browser is not a version 4 browser!\nDHTML not supported...');



//*******************************************************************

function selectObj(obj)

{

	if(isNN)

		return window.document.layers[obj]



	

	if(isIE)

		return document.all[obj]

}



//*******************************************************************

function getX(obj)

{

	if(isNN)

		return obj.left;

	

	if(isIE)

		return obj.style.pixelLeft;

}



function getY(obj)

{

	if(isNN)

		return obj.top;

	

	if(isIE)

		return obj.style.pixelTop;

}



function gotoXY(obj,x,y)

{

	if(isNN)

	{

		obj.top=y;

		obj.left=x;

	}

	

	if(isIE)

	{

		obj.style.pixelTop=y;

		obj.style.pixelLeft=x;

	}

}



function gotoRel(obj,x,y)

{

	if(isNN)

	{

		obj.top+=y;

		obj.left+=x;

	}

	

	if(isIE)

	{

		obj.style.pixelTop+=y;

		obj.style.pixelLeft+=x;

	}

}



//*******************************************************************

function getZ(obj)

{

	if(isNN)

		return obj.zIndex;

	

	if(isIE)

		return obj.style.zIndex;

}



function setZ(obj,z)

{

	if(isNN)

		obj.zIndex=z;

	

	if(isIE)

		obj.style.zIndex=z;

}



//*******************************************************************

function isVis(obj)

{

	if(isNN)

		return obj.visibility=='show';

	

	if(isIE)

		return obj.style.visibility=='visible';

}



function setVis(obj,b)

{

	if(isNN)

		if (b) 

			obj.visibility='visible'

		else

		obj.visibility='hidden'

	

	if(isIE)

		if (b) 

			obj.style.visibility='visible'

		else

			obj.style.visibility='hidden'

}

//*******************************************************************

function getWidth(obj)

{

	if(isNN)

		return obj.clip.width;

	

	if(isIE)

		return obj.clientWidth;

}



function getHeight(obj)

{

	if(isNN)

		return obj.clip.height;

	

	if(isIE)

		return obj.clientHeight;

}



//*******************************************************************

function getWinWidth()

{

	if(isNN)

		return window.innerWidth;

	

	if(isIE)

	{

		return document.body.clientWidth;

	}



}



function getWinHeight()

{

	if(isNN)

		return window.innerHeight;

	

	if(isIE)

		return document.body.clientHeight;



}






