document.writeln("<form id=\"frm\" name=\"frm\" method=\"post\" action=\"#\">");
document.writeln("	    <SCRIPT LANGUAGE=\"JAVASCRIPT\" >");
document.writeln("	 function linkChangelinkSelect_621()");
document.writeln("	 {");
document.writeln("	 	var linkObj = document.all(\"category2\");");
document.writeln("		 if(linkObj==null)");
document.writeln("			 return;");
document.writeln("		 var link = linkObj.options[linkObj.selectedIndex].value;");
document.writeln("		 if(link!=\'0\')");
document.writeln("			 window.open(link);");
document.writeln("	 }");
document.writeln("	 <\/SCRIPT>                     ");
document.writeln("");
document.writeln("<select name=\"category1\" onChange=\"redirec(document.frm.category1.options.selectedIndex)\" class=\"sel\"> ");
document.writeln("<option selected>请选择类型<\/option> ");
document.writeln("<option value=\"超市生鲜灯\">超市生鲜灯<\/option> ");
document.writeln("<option value=\"超市冰柜灯\">超市冰柜灯<\/option> ");
document.writeln("<option value=\"超市线槽灯\">超市线槽灯<\/option> ");
document.writeln("<option value=\"超市配套灯具\">超市配套灯具<\/option> ");
document.writeln("<\/select> ");
document.writeln("");
document.writeln("<select name=\"category2\" onchange=\"linkChangelinkSelect_621();\" class=\"sel1\"> ");
document.writeln("<option value=\"请选择\" selected>请选择产品<\/option> ");
document.writeln("<\/select> ");
document.writeln("");
document.writeln("<script language=\"javascript\"> ");
document.writeln("\/\/获取一级菜单长度 ");
document.writeln("var select1_len = document.frm.category1.options.length; ");
document.writeln("var select2 = new Array(select1_len); ");
document.writeln("\/\/把一级菜单都设为数组 ");
document.writeln("for (i=0; i<select1_len; i++) ");
document.writeln("{ select2[i] = new Array();} ");
document.writeln("\/\/定义基本选项 ");
document.writeln("select2[0][0] = new Option(\"请选择\", \"\"); ");
document.writeln("");
document.writeln("select2[1][0] = new Option(\"CSD450系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01a.html\"); ");
document.writeln("select2[1][1] = new Option(\"CSD400系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01b.html\"); ");
document.writeln("select2[1][2] = new Option(\"CSD315系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01c.html\"); ");
document.writeln("select2[1][3] = new Option(\"CSD195系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01d.html\"); ");
document.writeln("select2[1][4] = new Option(\"CSD192系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01e.html\"); ");
document.writeln("select2[1][5] = new Option(\"CSD280系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01f.html\"); ");
document.writeln("select2[1][6] = new Option(\"CSD225系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01g.html\"); ");
document.writeln("select2[1][7] = new Option(\"CSD320系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01h.html\"); ");
document.writeln("select2[1][8] = new Option(\"CSD294系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01i.html\"); ");
document.writeln("select2[1][9] = new Option(\"CSD300系列超市生鲜吊灯\", \"http:\/\/www.martlighting.com\/chaoshishengxiandeng\/shengxiandeng_mlnga01j.html\");  ");
document.writeln("");
document.writeln("select2[2][0] = new Option(\"铝合金冰柜荧光灯\", \"http:\/\/www.martlighting.com\/chaoshibingguideng\/bingguideng_mlnga02001.html\"); ");
document.writeln("select2[2][1] = new Option(\"椭圆形冰柜荧光灯\", \"http:\/\/www.martlighting.com\/chaoshibingguideng\/bingguideng_mlnga02002.html\"); ");
document.writeln("select2[2][2] = new Option(\"矩形冰柜荧光灯\", \"http:\/\/www.martlighting.com\/chaoshibingguideng\/bingguideng_mlnga02003.html\"); ");
document.writeln("");
document.writeln("select2[3][0] = new Option(\"T8\/T5分体式广照型铝合金线槽灯\", \"http:\/\/www.martlighting.com\/chaoshixiancaodeng\/xiancaodeng_mlnga03001.html\"); ");
document.writeln("select2[3][1] = new Option(\"胶片\/格栅分体式广照型铝合金线槽灯\", \"http:\/\/www.martlighting.com\/chaoshixiancaodeng\/xiancaodeng_mlnga03002.html\"); ");
document.writeln("select2[3][2] = new Option(\"一体化广照型铝合金线槽灯\", \"http:\/\/www.martlighting.com\/chaoshixiancaodeng\/xiancaodeng_mlnga03003.html\");");
document.writeln("select2[3][3] = new Option(\"净化式铝合金线槽灯\", \"http:\/\/www.martlighting.com\/chaoshixiancaodeng\/xiancaodeng_mlnga03004.html\");");
document.writeln("select2[3][4] = new Option(\"组合型铝合金线槽灯\", \"http:\/\/www.martlighting.com\/chaoshixiancaodeng\/xiancaodeng_mlnga03005.html\");");
document.writeln("select2[3][5] = new Option(\"投射型铝合金荧光灯\", \"http:\/\/www.martlighting.com\/chaoshixiancaodeng\/xiancaodeng_mlnga03006.html\");");
document.writeln("");
document.writeln("select2[4][0] = new Option(\"格栅荧光灯\", \"http:\/\/www.martlighting.com\/mart_geshandeng.html\"); ");
document.writeln("select2[4][1] = new Option(\"支架荧光灯\", \"http:\/\/www.martlighting.com\/mart_zhijiadeng.html\"); ");
document.writeln("select2[4][2] = new Option(\"筒灯\", \"http:\/\/www.martlighting.com\/mart_tongdeng.html\"); ");
document.writeln("select2[4][3] = new Option(\"高天棚灯具\", \"http:\/\/www.martlighting.com\/mart_gaotianpeng.html\"); ");
document.writeln("select2[4][4] = new Option(\"应急灯\", \"http:\/\/www.martlighting.com\/mart_yingjideng.html\"); ");
document.writeln("select2[4][5] = new Option(\"其他荧光灯\", \"http:\/\/www.martlighting.com\/mart_qitayingguangdeng.html\"); ");
document.writeln("\/\/联动函数 ");
document.writeln("function redirec(x) ");
document.writeln("{ ");
document.writeln("var temp = document.frm.category2;");
document.writeln("");
document.writeln("\/\/here is my code");
document.writeln("var oldLen = temp.length;");
document.writeln("var newLen = select2[x].length;");
document.writeln("if(oldLen > newLen)");
document.writeln("{");
document.writeln("  var startN = oldLen - oldLen + newLen;");
document.writeln("  for(var i=startN;i<oldLen;i++)");
document.writeln("  {");
document.writeln("    temp.options[startN] = null;");
document.writeln("  }");
document.writeln("}");
document.writeln("\/\/my code end");
document.writeln("");
document.writeln("for (i=0;i<select2[x].length;i++) ");
document.writeln("{ temp.options[i]=new Option(select2[x][i].text,select2[x][i].value);} ");
document.writeln("temp.options[0].selected=true; ");
document.writeln("} ");
document.writeln("<\/script>");
document.writeln("<\/form>")
