/*---------------[IE 5.5 Scrollbars colorer]--------------------*/
function scrollBar(line,face,theme)
{
	if (!line||!face)
	{
		line=null;
		face=null;
		switch(theme) 
		{
			case "blue":  //設定色系名稱
				var line="#78AAFF";  //設定捲軸色系框線
				var face="#EBF5FF";  //設定捲軸色系底色
				break;
			case "orange":
				var line="#FBBB37";
				var face="#FFF9DF";
				break;
			case "red":
				var line="#FF7979";
				var face="#FFE3DD";
				break;
			case "green":
				var line="#00C600";
				var face="#D1EED0";
				break;
			case "neo":
				var line="#FFFFFF";
				var face="#64D0FE";
				break;
			case "coffee":
				var line="#FFFFFF";
				var face="#D1AB6A";
				break;
			}
		}

		with(document.body.style)
			{
		scrollbarDarkShadowColor=line;
		scrollbar3dLightColor=line;
		scrollbarArrowColor="black";
		scrollbarBaseColor=face;
		scrollbarFaceColor=face;
		scrollbarHighlightColor=face;
		scrollbarShadowColor=face;
		scrollbarTrackColor="#FFFFFF";
			}
		}

/*------------------[Pointer coordinates catcher]---------------*/
function colorBar(){
	var w = document.body.clientWidth;
	var h = document.body.clientHeight;
	var x = event.clientX;
	var y = event.clientY;
if(x>w) scrollBar('#FFFFFF','#FF7979'); // 滑鼠移上後欲顯示的顏色（格式為：框線，底色）
	else scrollBar(null,null,"green"); //選擇載入時捲軸色系（由上方設定）
	}

/*---------------[IE 5.5 Scrollbars colorer]--------------------*/


/*------------------------[下拉式選單]--------------------------*/
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,x,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v;}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*------------------------[下拉式選單]--------------------------*/

function Chk_win() {
  var x,args=Chk_win.arguments; 
  if (document.body.offsetWidth>=778) x=(document.body.offsetWidth-778)/2; else x=0;
  if ((obj=MM_findObj(args[0]))!=null)
     if (obj.style) obj.style.posLeft=args[1]+x 
}





