﻿var goleftimage='http://221.231.138.111/skins/zh-chs/4.2.0925/default/images/menu/left.gif'
var gorightimage='http://221.231.138.111/skins/zh-chs/4.2.0925/default/images/menu/right.gif'
var menuwidth=770
var scrollspeed=4
var menucontents='<nobr class="guide"><span class="m_bg3" onclick="fnLoadProById(23);"><a  href="#">休闲娱乐</a></span> <span class="m_bg6" onclick="fnLoadProById(26);"><a href="#">宾馆酒店</a></span> <span class="m_bg2" onclick="fnLoadProById(22);"><a  href="#">餐饮美食</a></span>  <span class="m_bg5" onclick="fnLoadProById(164);" ><a href="#">婚庆服务</a></span> <span class="m_bg8" onclick="fnLoadProById(28);"><a  href="#">金融银行</a></span>  <span class="m_bg4" onclick="fnLoadProById(24);"><a  href="#">健身美容</a></span><span class="m_bg1" onclick="fnLoadProById(21);"><a  href="#">商业网点</a></span> <span class="m_bg7" onclick="fnLoadProById(27);"><a href="#">旅游景点</a></span>    <span class="m_bg9" onclick="fnLoadProById(29);"><a  href="#">教育培训</a></span>  <span class="m_bg10" onclick="fnLoadProById(30);"><a  href="#">医疗服务</a></span></nobr>'


var actualwidth=''
var ns_scroll
function fillup(){
if (document.all){
test2.innerHTML=menucontents
actualwidth=test2.offsetWidth
}
else if (document.layers){
ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.write(menucontents)
ns_scroll.document.close()
actualwidth=ns_scroll.document.width
}
}
window.onload=fillup

function moveright(){
if (document.all&&test2.style.pixelLeft>(menuwidth-actualwidth))
test2.style.pixelLeft-=scrollspeed
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
lefttime=setTimeout("moveright()",50)
}

function moveleft(){
if (document.all&&test2.style.pixelLeft<0)
test2.style.pixelLeft+=scrollspeed
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
righttime=setTimeout("moveleft()",50)
}

if (document.all||document.layers){
with (document){
write('<table border="0" cellspacing="0" cellpadding="0">')
write('<td valign="middle"><a href=#" onMouseover="moveleft()" onMouseout="clearTimeout(righttime)"><img src="'+goleftimage+'"border=0></a>&nbsp;</td>')
write('<td valign="top">')
if (document.all){
write('<span style="position:relative;width:'+menuwidth+';">')
write('<span style="position:absolute;width:'+menuwidth+';clip:rect(0 '+menuwidth+' auto 0)">')
write('<span id="test2" style="position:absolute;left:0;top:0">')
write('</span></span></span>')
}
else if (document.layers){
write('<ilayer width='+menuwidth+' name="ns_scrollmenu">')
write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')
}
write('</td>')
write('<td valign="middle">&nbsp;<a href="#" onMouseover="moveright()" onMouseout="clearTimeout(lefttime)">')
write('<img src="'+gorightimage+'"border=0></a>')
write('</td></table>')
}
}