function changedisp( param )
{
	var nCount = 0;
	var i ;
	var strId ;
	var dd = new Date();
	var oFsh ;

	strId = param.split(",");
	for ( nCount = 0, i = 0 ; i != -1 ; nCount++ ) 
	{
		i = param.indexOf( ",", i + 1) ;
		oFsh = document.getElementById( strId[ nCount] );
		oFsh.style.display = "none" ;
	}
	if ( dd.getMonth() == 11 )
	{
		oFsh = document.getElementById( strId[ 0 ] );
		oFsh.style.display = "block" ;
	}
	else if ( dd.getMonth() == 0 )
	{
		oFsh = document.getElementById( strId[ 1 ] );
		oFsh.style.display = "block" ;
	}
	else
	{
		oFsh = document.getElementById( strId[ 2 ] );
		oFsh.style.display = "block" ;
	}
}

function randomdisp( param )
{
	var nCount = 0;
	var i ;
	var strId ;
	var dd = new Date();
	var oFsh ;

	strId = param.split(",");
	for ( nCount = 0, i = 0 ; i != -1 ; nCount++ ) 
	{
		i = param.indexOf( ",", i + 1) ;
		oFsh = document.getElementById( strId[ nCount] );
		oFsh.style.display = "none" ;
	}
	nCount = dd.getSeconds() % nCount ;
	oFsh = document.getElementById( strId[ nCount] );
	oFsh.style.display = "block" ;
}

function pdm( id, event )
{
	var i ;
	var xx, yy, ww, hh ;
	var wd ;

	var oMn = document.getElementById( id ) ;
	ww = oMn.offsetWidth ;
	hh = oMn.offsetHeight ;
	for ( xx = 0, yy = 0 ; oMn != null ; oMn = oMn.offsetParent )
	{
		xx += oMn.offsetLeft ;
		yy += oMn.offsetTop ;
	}
	oMn = document.getElementById( "pdsyohin" ) ;
	oMn.style.display = "block" ;
	for ( oMn0 = oMn, wd = 0 ; oMn0 != null ; oMn0 = oMn0.nextSibling )
	{
		if ( wd < oMn0.offsetWidth )
		{
			wd = oMn0.offsetWidth ;
		}
		for ( oMn1 = oMn0 ; oMn1 != null ; oMn1 = oMn1.firstChild )
		{
			if ( wd < oMn1.offsetWidth )
			{
				wd = oMn1.offsetWidth ;
			}
		}
	}
	oMn.style.top = yy + hh ;
	oMn.style.left = xx + ( ww - wd ) / 2 ;
}

function delpdm()
{
	document.getElementById( "pdsyohin" ).style.display = "none" ;
}

function changeimage( id, onout )
{
	var oImg = document.getElementById( id )
	var oImg1 = document.getElementById( id + "1" )
	if ( onout == "ON" )
	{
		var imgsrc = "./menu/" + id + "-hv.gif";
	}
	else if ( onout == "DN" )
	{
		var imgsrc = "./menu/" + id + "-dn.gif";
	}
	else if ( onout == "OUT" )
	{
		var imgsrc = "./menu/" + id + "-nm.gif";
	}
	else
	{
		return false;
	}
	if ( oImg != null ) oImg.setAttribute("src", imgsrc);
	if ( oImg1 != null ) oImg1.setAttribute("src", imgsrc);

	return true;
}

function setStsPDMenu()
{
	if ( document.getElementById( "pmon" ).style.display == "block" )
	{
		setmenu( "pmon", "none" );
		setmenu( "pmoff", "block" );
	}
	else
	{
		setmenu( "pmoff", "none" );
		setmenu( "pmon", "block" );
	}

	return true;
}

function setmenu( id, mode )
{
	if ( document.getElementById( id ).style.display != mode )
	{
		document.getElementById( id ).style.display = mode;
	}
	return true;
}

function mt( id, mode )
{
	var oMenu = document.getElementById( id )
	if ( mode == "OV" )
	{
		document.getElementById( "pdsyohin" ).style.display = "none" ;
		oMenu.style.color = "white";
		oMenu.style.cursor = "pointer";
	}
	if ( mode == "OVM" )
	{
		oMenu.style.color = "white";
		oMenu.style.cursor = "pointer";
	}
	else if ( mode == "OT" )
	{
		oMenu.style.color = "black";
		oMenu.style.cursor = "pointer";
	}
	else if ( mode == "DN" )
	{
		oMenu.style.color = "skyblue";
		oMenu.style.cursor = "pointer";
	}

	return true;
}

