// JavaScript Document

var myID='sp3';

function myGetObject(id)
{
	if (useDom==2)
		return document.all[id];
		else
		if(useDom==1)
	return document.getElementById (id);
	else
	return null;
}

function onofLayer(id,visibility)
{
	myDiv=myGetObject(id);
	if(myDiv==null) return ;
	try
	{
	myDiv.style.visibility=visibility;
	}
	catch (e)
	{
	alert('Could Not Hide/Show layer');
	}							
}
    function reDo()
    { 
        if(document.all)
        {
	       window.location.reload();
        }
        else
        {
		       window.location.replace(self.location.href); 
        }
    }

window.onresize = reDo;

function myGetX (obj)
{
	var x = 0;

	do
	{
		x += obj.offsetLeft;
		obj = obj.offsetParent;
	}
	while (obj);
	return x;
}
function myGetY (obj)
{
	var y = 0;
	do
	{
		y += obj.offsetTop;
		obj = obj.offsetParent;
	}
	while (obj);
	return y;
}
function myGetPosition(id)
{
obj=myGetObject(id);
if(obj==null) return;
 position=new Object();
 position.x=myGetX(obj);
 position.y=myGetY(obj);
 return position;
}
function myGetHeight (obj)
{
	var height = obj.offsetHeight;
	if (height > 0 || !myIsTRNode (obj))
		return height;
	if (!obj.firstChild)
		return 0;
	// use the first child's height
	return obj.firstChild.offsetHeight;
}

function myGetWidth (obj)
{
	var width = obj.offsetWidth;
	if (width > 0 || !myIsTRNode (obj))
		return width;
	if (!obj.firstChild)
		return 0;
	// use the first child's height
	return obj.firstChild.offsetWidth;
}

function myIsTRNode (obj)
{
	var tagName = obj.tagName;
	return tagName == "TR" || tagName == "tr" || tagName == "Tr" || tagName == "tR";
}

function intParams()
{
if(document.getElementById)
		{
		useDom=1;
		screenSize=window.innerHeight;
		}
	else
if(document.all)
		{
		useDom=2;
		screenSize = document.body.clientWidth + 18;
		}
}
function changetext(num)
{
	myObj=myGetObject(myID);
	if(myObj!=null)
		{
			myObj.innerHTML=text[num];
		}
		else
		{
			alert("??????");
		}
}