function formatID(which)
{
	which+=1;
	if(which<10)
		which="0"+which;
	return which;
}

function formatPgName(txt)
{
	var tmp;

	if(txt.indexOf("#")!=-1)
	{
		tmp=txt.split("#");
		return tmp[1];
	}

	return txt;
}

function rollover(thisImg, thisSrc, thisTxt)
{
	if (thisImg!="")
		document.images[thisImg].src=thisSrc.src;
	window.status=unescape(thisTxt);
	return true;
}

function openWin(page, width, height, name, style)
{
	win=window.open(page, name, style);
	if(!win.closed)
	{
		win.location=page;
		win.location.reload();
	}
	win.resizeTo(width, height);
	win.moveTo(screen.width/2-width/2, screen.height/2-height/2);
}

function toJump(which)
{
	var tmp;

	for(i=0;i<parent.menuUnit.length;i++)
	{
		for(j=0;j<parent.menuSec[i].length;j++)
		{
			if(formatPgName(unescape(parent.menuSec[i][j]))==unescape(which))
			{
				tmp=parent.location.href.split("#");
				parent.location=tmp[0]+"#"+parent.pageDetails.deptid+"#"+formatID(i)+"#"+formatID(j);
				parent.location.reload();
			}
		}
	}
}

function showHide(object, status)
{
	if (document.getElementById && document.getElementById(object))
		document.getElementById(object).style.visibility = status; 
	else if (document.layers && document.layers[object] != null)
		document.layers[object].visibility = status; 
	else if (document.all)
		document.all[object].style.visibility = status; 
}