// By Liangchen Chao modified from Gary Liu's layercenter.js
// menu 重設位置
	
// Last Modified Date: 2005/02/23

function getPageWidth()
{    NS4 = (document.layers);
     IE4 = (document.all);
       
 		//fist set page width to the width of screen
  		//var PageWidth=window.screen.width;
   
        
		//if(NS4) PageWidth=document.width;
		if(NS4) PageWidth=window.innerWidth;
		if(IE4) PageWidth=document.body.clientWidth;
  		return PageWidth;
}

function getLeftToTableWidth()
{
   if (pw>ContentWidth) 
	{  pw = (pw-ContentWidth)/2+20;		}
	else
	{  pw=20; }
}

function reMenuPosition() {
  	pw = getPageWidth();	
   getLeftToTableWidth();
}

function initMenuCenter(){
	//設定 window 改變大小時, 會執行此 function 作動作
	window.onresize = reMenuPosition;
	
	//一開始就先執行一次
	reMenuPosition();
}
