



function MenuClick(div,key){
   // var key = event.srcElement.innerHTML;
    var str = "";
	for(var i = 0; i < menus.length; i++){
	   if(menus[i]["name"].toUpperCase() == key.toUpperCase().replace(" ","")){
	      str = "<table border=0 bgColor=#000000 cellpading=0 cellspacing=0><tr><td>"
		      + "<table width=80px  cellpading =0 cellspacing=0 border=0 bgColor=#000000>";
          var tempArr = menus[i]["List"];
		  for(var j = 0;j < tempArr.length;j++){
		     var content = tempArr[j];
			 var name = tempArr[j].split("|")[0];
			 var url = tempArr[j].split("|")[1];
             var target = "_self";
             if(tempArr[j].split("|").length > 2){
                 target = tempArr[j].split("|")[2];
             }
		     str += "<tr class=menu OnMouSeout=\"this.style.background='#000000'\" align=left ";
			 str += " onMouSeover=\"this.style.background='#000000'\" bgcolor='#000000'>";
			 str += "<td nowrap><a href='" + url + "'";
			 str += " target='" + target + "'" ;
			 str += ">";
			 str += "<font color='#000000'>&nbsp;" + name + "&nbsp;</font>";
			 str += "</a></td></tr>";
		  }
	      str +="</table></td></tr></table>";
	      popMenu(div,str);
		  return;
	   }
	}
  }


  function popMenu(div,str){
    var x = event.srcElement.offsetLeft;
    var y = event.srcElement.offsetTop;
    var parent = event.srcElement.parentElement;
	while(parent.nodeName.toUpperCase()!="BODY"){
       	x += parent.offsetLeft;
		y += parent.offsetTop;

		parent = parent.offsetParent;
	}
	y += event.srcElement.offsetHeight;
    div.innerHTML = str;
	div.style.display = "block";
	if(div.style.width < event.srcElement.offsetWidth){
	    div.offsetwidth = event.srcElement.offsetWidth;
	}
	div.style.pixelLeft = x;
    div.style.pixelTop  = y;

 }

  function hideMenu(div){
     div.style.display='none';
  }


  function hide(){
    var div = document.all.menuDiv;
    hideMenu(div);
  }

  function pop(key){
    var div = document.all.menuDiv;
    MenuClick(div,key);
  }

  //by jamesyang
  function getMenuTD(haveSubs, curKey, curUrl, curUrlTitle, target) {
      if(target == null) {
          target = "_self";
      }
  	var ret = "<td width='1%' nowrap";
  	if(haveSubs) {
  		ret = ret + " onMouseout='hide()' onMouseOver=\"pop('" + curKey + "')\"";
  	}
  	ret = ret + "><a href='" + curUrl + "' target='" + target + "' class='txt_white'>" + curUrlTitle + "</a></td>";
  	return ret;
  }

 //-----------------------------------------------------

  var urlRoot = "";

  var menus = new Array();
  var pos = -1 ;

  pos++
  menus[pos] = new Array();
  menus[pos]["name"] = "Oem";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "研发实力|" + urlRoot + "/oem/yanfa.htm";
  menus[pos]["List"][index++] = "规模生产|" + urlRoot + "/oem/product.htm";
  menus[pos]["List"][index++] = "OEM/ODM|" + urlRoot + "/oem/oem.htm";
//  menus[pos]["List"][index++] = "社区风采|" + urlRoot + "/wenhua/fengcai.asp";
 


 pos++
  menus[pos] = new Array();
  menus[pos]["name"] = "Automobile";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "管理特色|" + urlRoot + "/fuwu/tese.htm";
  menus[pos]["List"][index++] = "专业管理|" + urlRoot + "/fuwu/zhuanye.htm";
  menus[pos]["List"][index++] = "服务指南|" + urlRoot + "/fuwu/server.htm";
  menus[pos]["List"][index++] = "我要留言|" + urlRoot + "/fuwu/liuyan.htm";



  pos++
  menus[pos] = new Array();
  menus[pos]["name"] = "Products";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "公司概况|" + urlRoot + "/company/profile.htm";
  menus[pos]["List"][index++] = "企业文化|" + urlRoot + "/wenhua/wenlinian.htm";
  menus[pos]["List"][index++] = "资质荣誉|" + urlRoot + "/company/certi.htm";
  menus[pos]["List"][index++] = "人才战略|" + urlRoot + "/wenhua/rencai.htm";
 // menus[pos]["List"][index++] = "企业形象片|" + urlRoot + "/company/xingxiang.htm";


  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "Clients";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "公司新闻|" + urlRoot + "/news/news.asp";
  menus[pos]["List"][index++] = "行业动态|" + urlRoot + "/news/hangye.asp";
 
pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "product";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "智能温玉按摩床|" + urlRoot + "/products/product_z.asp?class=智能温玉按摩床";
  menus[pos]["List"][index++] = "微电脑按摩靠垫|" + urlRoot + "/products/product_z1.asp?class=微电脑按摩靠垫";
  menus[pos]["List"][index++] = "微电脑按摩枕|" + urlRoot + "/products/product_z2.asp?class=微电脑按摩枕";

  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "Partners";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "拓展服务|" + urlRoot + "/tuozhan/tuozhan.htm";
 menus[pos]["List"][index++] = "项目集粹|" + urlRoot + "/tuozhan/xiangmu.htm ";
 menus[pos]["List"][index++] = "市场经纬|" + urlRoot + "/tuozhan/market.htm ";
//  menus[pos]["List"][index++] = "销售伙伴社区|" + urlRoot + "/agent/agent_login.jsp";
//  menus[pos]["List"][index++] = "伙伴关注|" + urlRoot + "/alliance/focus.htm ";

  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "Service";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "销售中心|" + urlRoot + "/fuwu/sales.htm";
  menus[pos]["List"][index++] = "在线留言|" + urlRoot + "/online/bbsdefault.asp";
  menus[pos]["List"][index++] = "技术支持|" + urlRoot + "/fuwu/tech.htm";
  menus[pos]["List"][index++] = "下载中心|" + urlRoot + "/aboutus/indexdown.asp";
 //  menus[pos]["List"][index++] = "OEM/ODM|" + urlRoot + "/cn/sales/oem.htm";
 // menus[pos]["List"][index++] = "联系我们|" + urlRoot + "/cn/sales/contact.htm";

  


  //----------------------------------------------------------------------------------------------------------


var menuDiv = "<div id=menuDiv style='position:absolute;left:0px,top:0px;display:none;background-color:#000000;border:0px,z-index:4'"
				+ " onMouseOver=\"this.style.display='block'\" onMouseOut=\"this.style.display='none'\"></div>";

var menuTableTr = "<table align='right' width='752' height='30' border='0' cellpadding='0' cellspacing='0' bgcolor='''><tr nowrap>"
var menuTrTable = "</tr></table>"

var menuSprTd = "<td align='center' width='10%' nowrap><img src='"+urlRoot+"images/bar_line.gif' height='7'></td>";

var memberTd = "<td width='70' bgcolor='00418F'><a href='"+urlRoot+"/member/' class='txt_white'><font color='#66FFFF'>瑞电社区</font></a></td>";

document.write(menuDiv + menuTableTr);

//document.write(menuSprTd + "<td><img  width='100%' height='100%' src='"+urlRoot+"../../images/line_color_99.gif'></td>");

document.write(menuSprTd + getMenuTD(false, "Home", urlRoot + "/index.htm", "<strong>首页</strong>"));
document.write(menuSprTd + getMenuTD(true, "Service1", urlRoot + "/company/profile_c.htm", "<strong>关于我们</strong>", "_self"));
document.write(menuSprTd + getMenuTD(true, "Service1", urlRoot + "/company/factory_c.htm", "<strong>工厂设备</strong>", "_self"));
document.write(menuSprTd + getMenuTD(true, "Clients1", urlRoot + "/aspnew/news_ch.asp", "<strong>新闻中心</strong>", "_self"));
document.write(menuSprTd + getMenuTD(true, "product1", urlRoot + "/products/productcenter_c.asp", "<strong>产品中心</strong>", "_self"));
document.write(menuSprTd + getMenuTD(true, "Service1", urlRoot + "/online/bbsdefault.asp", "<strong>在线留言</strong>","_self"));
document.write(menuSprTd + getMenuTD(true, "Service1", urlRoot + "/wenhua/rencai_x.asp", "<strong>人才招聘</strong>","_self"));
document.write(menuSprTd + getMenuTD(true, "Support1", urlRoot + "/company/contact_c.htm", " <strong>联系我们</strong> ", "_self"));
//document.write(menuSprTd + getMenuTD(true, "Support1", urlRoot + "/company/profile.htm", " <strong>English</strong> ", "_self"));
document.write(menuSprTd + getMenuTD(true, "Support1", urlRoot + "/support/", "        ", "_self"));

//document.write(memberTd);
document.write(menuTrTable);




document.writeln("<script type=\"text\/javascript\">");
document.writeln("function hidead()");
document.writeln("{document.getElementById(\"floater\").style.display=\"none\";}");
document.writeln("<\/script>");
document.writeln("<DIV id=floater ");
document.writeln("      style=\"Z-INDEX: 10; RIGHT: 8px; WIDTH: 120px; POSITION: absolute; TOP: 100px; HEIGHT: 200px\">");
document.writeln("      <TABLE cellSpacing=0 cellPadding=0 border=0>");
document.writeln("        <TBODY>");
document.writeln("        <TR>");
document.writeln("          <TD style=\"background-image:url(..\/images\/qq1.gif); background-repeat:no-repeat; background-position:center; padding-right:5px; padding-top:5px; color:#000; cursor:pointer;\" height=\"39\" align=\"right\" valign=\"top\" onclick=\"hidead();\" ><img src=\"..\/images\/off.gif\" \/><\/TD>");
document.writeln("        <\/TR>");
document.writeln("        <TR>");
document.writeln("          <TD height=\"100\" background=..\/images\/qq2.gif><table cellspacing=0 cellpadding=0 width=100 align=center ");
document.writeln("              border=0>");
document.writeln("            <tbody>");
document.writeln("              <tr>");
document.writeln("                <td height=2 colspan=\"2\"><\/td>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                ");
document.writeln("                <td width=\"100%\" align=\"center\" valign=\"middle\"><A href=\'http:\/\/wpa.qq.com\/msgrd?V=1&amp;Uin=365399975&amp;Site=www.tdgled.com&amp;Menu=yes\' title=\'请确保已安装好QQ软件\' target=_blank><img border=0 SRC=http:\/\/wpa.qq.com\/pa?p=1:365399975:4 alt=\'QQ留言\'><font color=\"#737F8D\">:陆先生<\/font><\/a><\/td>");
document.writeln("              <\/tr>");

document.writeln("              <tr>");
document.writeln("                ");
document.writeln("                <td width=\"100%\" align=\"center\" valign=\"middle\"><A href=\'http:\/\/wpa.qq.com\/msgrd?V=1&amp;Uin=459448891&amp;Site=www.tdgled.com&amp;Menu=yes\' title=\'请确保已安装好QQ软件\' target=_blank><img border=0 SRC=http:\/\/wpa.qq.com\/pa?p=1:459448891:4 alt=\'QQ留言\'><font color=\"#737F8D\">:黄小姐<\/font><\/a><\/td>");
document.writeln("              <\/tr>");

document.writeln("              <tr>");
document.writeln("                ");
document.writeln("                <td width=\"100%\" align=\"center\" valign=\"middle\"><A href=\'http:\/\/wpa.qq.com\/msgrd?V=1&amp;Uin=1179736883&amp;Site=www.tdgled.com&amp;Menu=yes\' title=\'请确保已安装好QQ软件\' target=_blank><img border=0 SRC=http:\/\/wpa.qq.com\/pa?p=1:1179736883:4 alt=\'QQ留言\'><font color=\"#737F8D\">:莫小姐<\/font><\/a><\/td>");
document.writeln("              <\/tr>");

document.writeln("              <tr>");
document.writeln("                ");
document.writeln("                <td width=\"100%\" align=\"center\" valign=\"middle\"><A href=\'http:\/\/wpa.qq.com\/msgrd?V=1&amp;Uin=990296216&amp;Site=www.tdgled.com&amp;Menu=yes\' title=\'请确保已安装好QQ软件\' target=_blank><img border=0 SRC=http:\/\/wpa.qq.com\/pa?p=1:990296216:4 alt=\'QQ留言\'><font color=\"#737F8D\">:韦小姐<\/font><\/a><\/td>");
document.writeln("              <\/tr>");

document.writeln("              <tr>");
document.writeln("                ");
document.writeln("                <td width=\"100%\" align=\"center\" valign=\"middle\"><A href=\'http:\/\/wpa.qq.com\/msgrd?V=1&amp;Uin=51235821&amp;Site=www.tdgled.com&amp;Menu=yes\' title=\'请确保已安装好QQ软件\' target=_blank><img border=0 SRC=http:\/\/wpa.qq.com\/pa?p=1:51235821:4 alt=\'QQ留言\'><font color=\"#737F8D\">:黄先生<\/font><\/a><\/td>");
document.writeln("              <\/tr>");


document.writeln("            <\/tbody>");
document.writeln("          <\/table><\/TD>");
document.writeln("        <\/TR>");
document.writeln("        <TR>");
document.writeln("          <TD><img src=\"..\/images\/qq3.gif\" width=\"114\" height=\"34\" \/><\/TD>");
document.writeln("        <\/TR>");
document.writeln("        <TR>");
document.writeln("  <TD><\/TD><\/TR><\/TBODY><\/TABLE>");
document.writeln("<\/DIV>");
document.writeln("<script type=\"text\/javascript\"> ");
document.writeln("\/\/Enter \"frombottom\" or \"fromtop\" ");
document.writeln("var verticalpos=\"frombottom\" ");
document.writeln("function JSFX_FloatTopDiv() ");
document.writeln("{ ");
document.writeln("	var startX =30, ");
document.writeln("	startY = 500; ");
document.writeln("	\/\/var ns = (navigator.appName.indexOf(\"Netscape\") != -1); ");
document.writeln("	var d = document; ");
document.writeln("	function ml(id) ");
document.writeln("	{ ");
document.writeln("		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; ");
document.writeln("		if(d.layers) el.style=el; ");
document.writeln("		el.sP=function(x,y){this.style.right=x;this.style.top=y;}; ");
document.writeln("		el.x = startX; ");
document.writeln("		if(verticalpos==\"fromtop\") ");
document.writeln("			el.y = startY; ");
document.writeln("		else");
document.writeln("		{ ");
document.writeln("			\/\/el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight; ");
document.writeln("			el.y = getScrollTop() + getClientHeight(); ");
document.writeln("			el.y -= startY; ");
document.writeln("		} ");
document.writeln("		return el; ");
document.writeln("	} ");
document.writeln("	window.stayTopLeft=function() ");
document.writeln("	{ ");
document.writeln("		if (verticalpos==\"fromtop\")");
document.writeln("		{ ");
document.writeln("			\/\/var pY = ns ? pageYOffset : document.body.scrollTop; ");
document.writeln("			var pY = getScrollTop(); ");
document.writeln("			ftlObj.y += (pY + startY - ftlObj.y)\/8; ");
document.writeln("		} ");
document.writeln("		else");
document.writeln("		{ ");
document.writeln("			\/\/var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight; ");
document.writeln("			var pY = getScrollTop() + getClientHeight(); ");
document.writeln("			ftlObj.y += (pY - startY - ftlObj.y)\/8; ");
document.writeln("		} ");
document.writeln("		ftlObj.sP(ftlObj.x, ftlObj.y); ");
document.writeln("		setTimeout(\"stayTopLeft()\", 10); ");
document.writeln("	} ");
document.writeln("	ftlObj = ml(\"floater\"); ");
document.writeln("	stayTopLeft(); ");
document.writeln("} ");
document.writeln("JSFX_FloatTopDiv();  ");
document.writeln("function hideDiv(id)");
document.writeln("{");
document.writeln("	var d = document; ");
document.writeln("	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; ");
document.writeln("	el.style.display=\"none\";");
document.writeln("}");
document.writeln("\/*******************************************");
document.writeln("获取滚动条位置及客户区高度");
document.writeln("兼容IE和Firefox(包括DTD定义)");
document.writeln("                            2010.2.24 大圣");
document.writeln("*******************************************\/");
document.writeln("function getScrollTop()");
document.writeln("{");
document.writeln("	return	window.pageYOffset  ");
document.writeln("			|| document.documentElement.scrollTop  ");
document.writeln("			|| document.body.scrollTop  ");
document.writeln("			|| 0;");
document.writeln("}");
document.writeln("function getClientHeight()");
document.writeln("{");
document.writeln("	return	window.innerHeight  ");
document.writeln("			|| document.documentElement.clientHeight  ");
document.writeln("			|| document.body.clientHeight  ");
document.writeln("			|| 0;");
document.writeln("}");
document.writeln("\/*******************************************\/");
document.writeln("<\/script>")
