//樹形導航的JS代碼
document.write("<style type=text/css>#master {LEFT: -125px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; Z-INDEX: 999}</style>")
document.write("<table id=master width='100' border='0' cellspacing='0' cellpadding='0'><tr><td></td><td rowspan='2' valign='top'><img id=menu onMouseOver=javascript:expand() border=0 height=70 name=menutop src=images/menuo.gif width=18></td></tr>");
document.write("<tr><td valign='top'><table width='100%' border='0' cellspacing='5' cellpadding='0'><tr><td height='230' valign='top'><table width=100% height='100%' border=1 cellpadding=0 cellspacing=5 bordercolor='#666666' bgcolor=#ecf6f5 style=FILTER: alpha(opacity=90)><tr>");
document.write("<td height='10' align='center' bordercolor='#ecf6f5'><font color=999900 style='font-size:12px;'><strong>產&nbsp;品&nbsp;列&nbsp;表</strong></font></td></tr><tr><td valign='top' bordercolor='#ecf6f5'>");
document.write("<table width='100%' border='0' cellpadding='0' cellspacing='0' class='menu'>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product.asp'>綠色產品</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#01'>美容養顏</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#02'>全效整腸</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#03'>健美纖體</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#04'>維他命、礦物質</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#05'>健體營養</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#06'>增強功能</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#07'>強健體魄</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#08'>營養美點</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td height='20' style='padding-left:5px;'><img src='images/web_21.jpg' width='3' height='6' align='absmiddle'>&nbsp;<a href='product_k.htm#09'>營養食物配件</a></td>");
document.write("  </tr>");
document.write("  <tr> ");
document.write("    <td><img src='images/web_25.jpg' width='100' height='1'></td>");
document.write("  </tr>");
document.write("</table></td></tr></table></td></tr></table></td></tr></table>");

var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
var master = new Object("element")
master.curLeft = -125;	master.curTop = 10;
master.gapLeft = 0;		master.gapTop = 0;
master.timer = null;

if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;}
setInterval("FixY()",100);

function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){
	clearTimeout(eval(layerName).timer)
	if(eval(layerName).curLeft != fromLeft){
		if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
		else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
			else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
		if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
		if(ns){document[layerName].left = eval(layerName).curLeft}
	}
	if(eval(layerName).curTop != fromTop){
   if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
		else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
			else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
		if(ie){document.all[layerName].style.top = eval(layerName).curTop}
		if(ns){document[layerName].top = eval(layerName).curTop}
	}
	eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
}

function setPace(layerName, fromLeft, fromTop, motionSpeed){
	eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
	eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed
	moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
}

var expandState = 0

function expand(){
	if(expandState == 0){setPace("master", 0, 10, 10); if(ie){document.menutop.src = "images/menui.gif"}; expandState = 1;}
	else{setPace("master", -125, 10, 10); if(ie){document.menutop.src = "images/menuo.gif"}; expandState = 0;}
}

function FixY(){
	if(ie){sidemenu.style.top = document.body.scrollTop+10}
	if(ns){sidemenu.top = window.pageYOffset+10}
}