
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

bName = navigator.appName;

if      (bName.indexOf('Netscape')>=0)
document.write('<link rel="stylesheet" href="http://www.ukeas.com.tw/menu_css.css" type="text/css">');
else		
document.write('<link rel="stylesheet" href="http://www.ukeas.com.tw/menu_css.css" type="text/css">');

function MM_openBrWindow(theURL,winName,features) { //v2.0
   window.open(theURL,winName,features);
}


           
 function perResize() {
	if(navigator.appName.indexOf('Netscape') != -1) {
		parent.location.reload();
	}
 }
 
           function stopError() {
             return true;
           }
 
           window.onerror = stopError;
 

if (document.layers) {n=1;ie=0}
if (document.all) {n=0;ie=1}
function init() {
        if (n) {drop1 = document.pull1; drop2 = document.pull2; drop3 = document.pull3; drop4 = document.pull4; drop5 = document.pull5; drop6 = document.pull6; drop7 = document.pull7; drop8 = document.pull8;}
		if (ie) {drop1 = pull1.style; drop2 = pull2.style; drop3 = pull3.style; drop4 = pull4.style; drop5 = pull5.style;  drop6 = pull6.style;  drop7 = pull7.style;  drop8 = pull8.style;}
}
function hideall() {
		if (n) {drop1.visibility = "hide"; drop2.visibility = "hide"; drop3.visibility = "hide"; drop4.visibility = "hide"; drop5.visibility = "hide"; drop6.visibility = "hide"; drop7.visibility = "hide"; drop8.visibility = "hide";}
		if (ie) {drop1.visibility = "hidden";  drop2.visibility = "hidden"; drop3.visibility = "hidden"; drop4.visibility = "hidden"; drop5.visibility = "hidden"; drop6.visibility = "hidden"; drop7.visibility = "hidden"; drop8.visibility = "hidden";}

}
function visible(layer_id)
{
	// Get the middle of the screen
	if(ie)
		documentWidth=(document.body.offsetWidth+document.body.scrollLeft-20)/2-211;
	else if(ns)
		documentWidth=(window.innerWidth+window.pageXOffset-20)/2-211;
	else if(w3)
		documentWidth=(self.innerWidth+window.pageXOffset-20)/2-211;
	
	if(layer_id==1)
	{
       	if (n) {drop1.visibility = "show";drop1.left=documentWidth;drop1.top=160;}
		if (ie) {drop1.visibility = "visible";drop1.left=documentWidth;drop1.top=160;}
	}
	if(layer_id==2)
	{
       	if (n) {drop2.visibility = "show";drop2.left=documentWidth;drop2.top=191;}
		if (ie) {drop2.visibility = "visible";drop2.left=documentWidth;drop2.top=191;}
	}
	if(layer_id==3)
	{
       	if (n) {drop3.visibility = "show";drop3.left=documentWidth;drop3.top=208;}
		if (ie) {drop3.visibility = "visible";drop3.left=documentWidth;drop3.top=208;}
	}
}

function hiderest(layer_id)
{
	if(layer_id==1)
	{
		if (n) {drop2.visibility = "hide"; drop3.visibility = "hide"; drop4.visibility = "hide"; drop5.visibility = "hide"; drop6.visibility = "hide"; drop7.visibility = "hide"; drop8.visibility = "hide";}
		if (ie) {drop2.visibility = "hidden"; drop3.visibility = "hidden"; drop4.visibility = "hidden"; drop5.visibility = "hidden"; drop6.visibility = "hidden"; drop7.visibility = "hidden"; drop8.visibility = "hidden";}
	}
	if(layer_id==2)
	{
		if (n) {drop1.visibility = "hide"; drop3.visibility = "hide"; drop4.visibility = "hide"; drop5.visibility = "hide"; drop6.visibility = "hide"; drop7.visibility = "hide"; drop8.visibility = "hide";}
		if (ie) {drop1.visibility = "hidden"; drop3.visibility = "hidden"; drop4.visibility = "hidden"; drop5.visibility = "hidden"; drop6.visibility = "hidden"; drop7.visibility = "hidden"; drop8.visibility = "hidden";}
	}
	if(layer_id==3)
	{
		if (n) {drop1.visibility = "hide"; drop2.visibility = "hide"; drop4.visibility = "hide"; drop5.visibility = "hide"; drop6.visibility = "hide"; drop7.visibility = "hide"; drop8.visibility = "hide";}
		if (ie) {drop1.visibility = "hidden"; drop2.visibility = "hidden"; drop4.visibility = "hidden"; drop5.visibility = "hidden"; drop6.visibility = "hidden"; drop7.visibility = "hidden"; drop8.visibility = "hidden";}
	}
}

function openWindow(siteUrl){
var nTop = window.screenTop+125;	
var nLeft = window.screenLeft+395;

	selectFileObject = window.open(siteUrl, 'newWindow', 'height=550; width=750; top='+nTop+'; left='+nLeft+'; location=0; resizeable=1; status=0; toolbar=0; titlebar=0; channelbar=0; directories=0; fullscreen=0');
return false;

}
