function write_menu(){
document.write("<div class='meun1' >");
document.write("<a href='/web.action?web=xdtop&tempCode=index' onmouseover =showDiv('0','0') style='color:#FFFFFF'>首页</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodIndex&module=xdtop_spzq'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>食品专区首页</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodInfoList&module=xdtop_spzq_zcfg'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>政策法规</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodInfoList&module=xdtop_spzq_zxzx'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>资讯中心</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodInfoList&module=xdtop_spzq_aqyj'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>安全预警</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodInfoList&module=xdtop_spzq_spjc'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>食品检测</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodInfoList&module=xdtop_spzq_qyzq'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>企业专区</a> | ");
document.write("<a href='/web.action?web=xdtop&tempCode=foodInfoList&module=xdtop_spzq_njbbfb'  onmouseover =showDiv('0','0') style='color:#FFFFFF'>三园电子台帐软件</a> | ");
document.write("<div class='meun2' id = 'subModule0' style='left:0px;display:none;width:850px;  height:20px;  float:left;  padding:6px 0px 0px 30px; color: #000000;' onmouseout ='hiddenDiv(this)' onmouseover=showhiddenDiv(this,'0')   >");
document.write("<div class='meun2' id = 'tigBg0'>");
document.write("</div>");
document.write("</div>");
document.write("</div>");
}
function showDiv(module,tigBg){

var sum=0;
var i=0;
for(i=0;i<sum;i+=70){
if(i==module){
document.getElementById('subModule'+i).style.display='';
if(tigBg==0){
document.getElementById('subModule'+i).style.display='none';
}
}else{
alert(i);
document.getElementById('subModule'+i).style.display='none';
}
}
}
function hiddenDiv(obj){
obj.style.display = "none";
clearInterval(myMar);
}
var myMar;	
function showhiddenDiv(obj,id){
obj.style.display = "";
if(event.clientX<=275){
mousedownLow(id);
}else if(event.clientX>=900){
mousedownAdd(id);
}
}
function mousedownAdd(id){
clearInterval(myMar);
myMar=setInterval("scrollAdd('"+id+"')",10);
}
function mousedownLow(id){
clearInterval(myMar);
myMar=setInterval("scrollLow('"+id+"')",10);
}
function scrollLow(id){
var tempObj=document.getElementById('tigBg'+id);
tempObj.scrollLeft=tempObj.scrollLeft-20;
}
function scrollAdd(id){
var tempObj=document.getElementById('tigBg'+id);
tempObj.scrollLeft=tempObj.scrollLeft+20;
}

