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=#ffffff cellpading=0 cellspacing=0><tr><td>"
		      + "<table width=80px  cellpading =0 cellspacing=1 border=0 bgColor=#ffffff>";
          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='#eeeeee'\" align=left ";
			 str += " onMouSeover=\"this.style.background='#ffffff'\" bgcolor='#eeeeee'>";
			 str += "<td nowrap><a href='" + url + "'";
			 str += " target='" + target + "'" ;
			 str += ">";
			 str += "<font color='#7a7a7a'>&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-3;

 }

  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   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"] = "wangxgk";		//网校概况
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "网校介绍|" + urlRoot + "/?F=wangxgk.html&InMid=90";
  menus[pos]["List"][index++] = "组织机构|" + urlRoot + "/?F=wangxgk.html&InMid=91";
  menus[pos]["List"][index++] = "大事记|" + urlRoot + "/?F=wangxgk.html&InMid=92";

  pos++
  menus[pos] = new Array();			//新闻综合
  menus[pos]["name"] = "xinwen";
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "教育新闻|" + urlRoot + "/?F=xinwzh.html&InMid=93";
  menus[pos]["List"][index++] = "缤纷校园|" + urlRoot + "/?F=xinwzh.html&InMid=94";
  menus[pos]["List"][index++] = "社区信息|" + urlRoot + "/?F=xinwzh.html&InMid=95";
  menus[pos]["List"][index++] = "中小学生常见问题解析|" + urlRoot + "/?F=xinwzh.html&InMid=169";
  // 中小学生常见话题解析
  
  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "fumukt";		//父母课堂
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "父母必读|" + urlRoot + "/?F=fumukt.html&InMid=97";
  menus[pos]["List"][index++] = "0-3岁|" + urlRoot + "/?F=fumukt.html&InMid=98";
  menus[pos]["List"][index++] = "3-6岁|" + urlRoot + "/?F=fumukt.html&InMid=99";
  menus[pos]["List"][index++] = "小学阶段|" + urlRoot + "/?F=fumukt.html&InMid=100";
  menus[pos]["List"][index++] = "中学阶段|" + urlRoot + "/?F=fumukt.html&InMid=101";
  menus[pos]["List"][index++] = "特殊家庭教育|" + urlRoot + "/?F=fumukt.html&InMid=103";
  menus[pos]["List"][index++] = "婚姻家庭|" + urlRoot + "/?F=fumukt.html&InMid=143";
  
  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "jjbhy";
  menus[pos]["List"] = new Array();     //家教百花园
  var index = 0;
  //menus[pos]["List"][index++] = "家教启示|" + urlRoot + "/?F=jiajbhy.html&InMid=104";
  menus[pos]["List"][index++] = "名人家教|" + urlRoot + "/?F=jiajbhy.html&InMid=106";
  menus[pos]["List"][index++] = "亲子沟通|" + urlRoot + "/?F=jiajbhy.html&InMid=107";
  menus[pos]["List"][index++] = "八面来风|" + urlRoot + "/?F=jiajbhy.html&InMid=108";
  //menus[pos]["List"][index++] = "家教格言|" + urlRoot + "/?F=jiajbhy.html&InMid=109";
  menus[pos]["List"][index++] = "家教研究|" + urlRoot + "/?F=jiajbhy.html&InMid=105";
  menus[pos]["List"][index++] = "布谷声声|" + urlRoot + "/?F=jiajbhy.html&InMid=178";

   pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "xinldh";
  menus[pos]["List"] = new Array(); //心理导航
  var index = 0;
  menus[pos]["List"][index++] = "心理辅导|" + urlRoot + "/?F=xinldh.html&InMid=110";
  menus[pos]["List"][index++] = "心灵聊吧|" + urlRoot + "/?F=xinldh.html&InMid=112";
  //menus[pos]["List"][index++] = "心理课程|" + urlRoot + "/?F=xinldh.html&InMid=113";
  menus[pos]["List"][index++] = "心理研究|" + urlRoot + "/?F=xinldh.html&InMid=114"; 
  menus[pos]["List"][index++] = "卫生与健康|" + urlRoot + "/?F=xinldh.html&InBid=38&InMid=176";


  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "xuekfd";
  menus[pos]["List"] = new Array(); //学科辅导
  var index = 0;
  menus[pos]["List"][index++] = "名师课堂|" + urlRoot + "/?F=xuekfd.html&InMid=116";
  menus[pos]["List"][index++] = "中高考试题及答案|" + urlRoot + "/?F=xuekfd.html&InMid=117";
  menus[pos]["List"][index++] = "高中新课改|" + urlRoot + "/?F=xuekfd.html&InMid=118";
  menus[pos]["List"][index++] = "语文|" + urlRoot + "/?F=xuekfd.html&InMid=119";
  menus[pos]["List"][index++] = "数学|" + urlRoot + "/?F=xuekfd.html&InMid=120";
  menus[pos]["List"][index++] = "英语|" + urlRoot + "/?F=xuekfd.html&InMid=121";
  menus[pos]["List"][index++] = "学业测评|" + urlRoot + "/52ceping/index.asp";


  pos++;
  menus[pos] = new Array();			//专家在线
  menus[pos]["name"] = "zhuanjzx";     
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "高老师信箱|" + urlRoot + "/?F=zhuanjia3.htm";
  menus[pos]["List"][index++] = "专家专栏|" + urlRoot + "/?F=zhuanjzx.html&InMid=122";
  menus[pos]["List"][index++] = "视频讲座|" + urlRoot + "/?F=zhuanjzx.html&InMid=123";
  //menus[pos]["List"][index++] = "鲍校长工作室|" + urlRoot + "/?F=zhuanjzx.html&InMid=145";



  pos++;
  menus[pos] = new Array();			//风采展示
  menus[pos]["name"] = "fengczs";        
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "荣誉台|" + urlRoot + "/?F=fengczs.html&InMid=125";
  menus[pos]["List"][index++] = "园丁风采|" + urlRoot + "/?F=fengczs.html&InMid=126";
  menus[pos]["List"][index++] = "家长风采|" + urlRoot + "/?F=fengczs.html&InMid=127";
  menus[pos]["List"][index++] = "学子风采|" + urlRoot + "/?F=fengczs.html&InMid=128";
  //menus[pos]["List"][index++] = "首批实验基地|" + urlRoot + "/?F=fengczs.html&InMid=129";
  
  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "fazjy";   //法制天地
  menus[pos]["List"] = new Array();
  var index = 0;
  menus[pos]["List"][index++] = "法制动态|" + urlRoot + "/?F=fazjy.html&InMid=140";
  //menus[pos]["List"][index++] = "法制课堂|" + urlRoot + "/?F=fazjy.html&InMid=141";
  menus[pos]["List"][index++] = "教育法规|" + urlRoot + "/?F=fazjy.html&InMid=142";
 //menus[pos]["List"][index++] = "法制研究|" + urlRoot + "/?F=fazjy.html&InMid=152";
  
  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "deyzh";          
  menus[pos]["List"] = new Array(); //德育纵横
  var index = 0;
  menus[pos]["List"][index++] = "德育管理|" + urlRoot + "/?F=deyzh.html&InMid=146";
  //menus[pos]["List"][index++] = "德育特色|" + urlRoot + "/?F=deyzh.html&InMid=147";
  menus[pos]["List"][index++] = "德育基地|" + urlRoot + "/?F=deyzh.html&InMid=148";
 // menus[pos]["List"][index++] = "德育课题|" + urlRoot + "/?F=deyzh.html&InMid=149";
  menus[pos]["List"][index++] = "德育科研|" + urlRoot + "/?F=deyzh.html&InMid=150";
  menus[pos]["List"][index++] = "班主任工作室|" + urlRoot + "/?F=deyzh.html&InMid=151";
  
  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "meilyx";         
  menus[pos]["List"] = new Array(); //魅力宜兴
  var index = 0;
  menus[pos]["List"][index++] = "陶都今天|" + urlRoot + "/?F=meilyx.html&InMid=137";
  menus[pos]["List"][index++] = "宜兴历史|" + urlRoot + "/?F=meilyx.html&InMid=138";
  menus[pos]["List"][index++] = "陶都人文|" + urlRoot + "/?F=meilyx.html&InMid=139";
  menus[pos]["List"][index++] = "宜兴山水|" + urlRoot + "/?F=meilyx.html&InMid=153";

  pos++;
  menus[pos] = new Array();
  menus[pos]["name"] = "xxt";         
  menus[pos]["List"] = new Array(); //魅力宜兴
  var index = 0;
  //menus[pos]["List"][index++] = "优秀短信欣赏|" + urlRoot + "http://sch.yxswx.com/webschool/web_top100goodmsg_all.asp";
  menus[pos]["List"][index++] = "优秀短信欣赏|" + urlRoot + "/webschool/web_top100goodmsg_all.asp";  
  //menus[pos]["List"][index++] = "评选短信欣赏|" + urlRoot + "http://sch.yxswx.com/webschool/web_goodmsg_all.asp";
  //menus[pos]["List"][index++] = "评选短信欣赏|" + urlRoot + "http://222.92.77.179:9998/webschool/web_goodmsg_all.asp";
  
  //menus[pos]["List"][index++] = "互动之星风采|" + urlRoot + "http://222.92.77.179:9998/webschool/web_goodtea_all.asp";
  //menus[pos]["List"][index++] = "优秀班主任名单|" + urlRoot + "http://sch.yxswx.com/webschool/web_goodclasstea_all.asp";

  menus[pos]["List"][index++] = "使用心得|" + urlRoot + "/?F=xxt_syxd.html&InBid=43&InMid=163";
  menus[pos]["List"][index++] = "沟通技巧|" + urlRoot + "/?F=xxt_syxd.html&InBid=43&InMid=164";
  menus[pos]["List"][index++] = "活动展示|" + urlRoot + "/?F=xxt_syxd.html&InBid=43&InMid=165";


  //----------------------------------------------------------------------------------------------------------


var menuDiv = "<div id=menuDiv style='z-index:9999; position:absolute;left:0px,top:0px;display:none;background-color:#000000; border:0px'"
				+ " onMouseOver=\"this.style.display='block'\" onMouseOut=\"this.style.display='none'\"></div>";
var menuTableTr = "<table width='100%' border='0' cellspacing='0' cellpadding='0'  height='30' align='center'><tr nowrap>";

var menuTableTr1 = "<td width='0'></td>";
var menuTableTr4 = "<td width='0'></td>";

var menuTableTr2 = "<td width='100%' background='template/images/index_04.gif'  height='28' valign='middle'>";
var menuTableTr3 = "<table width='96%' height='28' border='0' cellpadding='0' cellspacing='0' align='center'><tr>";

var menuTrTable2 = "</td>";
var menuTrTable = "</tr></table>";

var menuSprTd = "<td  width='1' align='left' ></td>";
var menuSprTd2 = "<td width='15'><div align='center'>|</div></td>";

document.write(menuDiv + menuTableTr);
document.write(menuTableTr1);
document.write(menuTableTr2);
document.write(menuTableTr3);

document.write(menuSprTd + getMenuTD(true, "hr--", urlRoot + "/", "<font color='000000'>首页</font>"));
document.write(menuSprTd2 + menuSprTd); //首页

document.write(menuSprTd +  getMenuTD(true, "wangxgk", urlRoot + "/?F=wangxgk.html", "<font color='000000'>网校概况</font>"));
document.write(menuSprTd2);//网校概况

document.write(menuSprTd + getMenuTD(true, "xinwen", urlRoot + "/?F=xinwzh.html", "<font color='000000'>新闻综合</font>", "_self"));
document.write(menuSprTd2); //新闻综合

document.write(menuSprTd + getMenuTD(true, "fumukt", urlRoot + "/?F=fumukt.html", "<font color='000000'>父母课堂</font>", "_self"));
document.write(menuSprTd2);//父母课堂

document.write(menuSprTd + getMenuTD(true, "jjbhy", urlRoot + "/?F=jiajbhy.html", "<font color='000000'>家教百花园</font>", "_self"));
document.write(menuSprTd2);//家教百花园

document.write(menuSprTd +  getMenuTD(true, "xinldh", urlRoot + "/?F=xinldh.html", "<font color='000000'>心理导航</font>", "_self"));
document.write(menuSprTd2);//心理导航

document.write(menuSprTd +  getMenuTD(true, "xuekfd", urlRoot + "/?F=xuekfd.html", "<font color='000000'>学科辅导</font>", "_self"));
document.write(menuSprTd2);//学科辅导

document.write(menuSprTd +  getMenuTD(true, "zhuanjzx", urlRoot + "/?F=zhuanjzx.html", "<font color='000000'>专家在线</font>", "_self"));
document.write(menuSprTd2);//专家在线

document.write(menuSprTd + getMenuTD(true, "fengczs", urlRoot + "/?F=fengczs.html", "<font color='000000'>风采展示</font>", "_self"));
document.write(menuSprTd2); //风采展示

document.write(menuSprTd + getMenuTD(true, "fazjy", urlRoot + "/?F=fazjy.html", "<font color='000000'>法制教育</font>", "_self"));
document.write(menuSprTd2); //法制教育

document.write(menuSprTd + getMenuTD(true, "deyzh", urlRoot + "/?F=deyzh.html", "<font color='000000'>德育纵横</font>", "_self"));
document.write(menuSprTd2); //德育纵横

document.write(menuSprTd + getMenuTD(true, "xxt", urlRoot + "/?F=xxt.html", "<font color='000000'>家校互动</font>", "_self"));
document.write(menuSprTd2);//家校互动 

document.write(menuSprTd + getMenuTD(true, "meilyx", urlRoot + "/?F=meilyx.html", "<font color='000000'>魅力宜兴</font>", "_self"));
document.write(menuSprTd2);//魅力宜兴 

document.write(menuSprTd + getMenuTD(true, "luntan", urlRoot + "http://bbs.yxswx.com/yxbbs/", "<font color='000000'>家教论坛</font>", "_blank"));

//document.write(memberTd);
document.write(menuTrTable);
document.write(menuTrTable2);
document.write(menuTableTr4);
document.write(menuTrTable);


