//存储发生行为的对象 var left_middle = ["left_config", "left_human", "left_change", "left_salary", "left_engage", "left_report"]; //所有的顶部对象 var menu_bar = ["body_config", "body_human", "body_change", "body_salary", "body_engage", "body_report"]; //left_middle 上发生鼠标点击事件 function left_click(e) { e.ondblclick = function(){//该对象的双击事件 var str = e.char.replace("left","body");//目标顶部对象 show_body(str,true);//显示框架顶部和主体 }; var id = e.char; var obj = document.getElementById(id); if(obj.style.display != "block"){ obj.style.display = "block"; for (var i = 0; i < left_middle.length; i++) { var str = left_middle[i]; if (str != id) { document.getElementById(str).style.display = "none"; } } } } //left_middle 上发生的行为 function left_link(e) { var href = ""; var str = e.charset; switch (str) {// case "config_file_first_kind":href="/hr/fileFirstKind.do?method=toUrl&url=success";break; case "config_file_second_kind":href="/hr/fileSecondKind.do?method=toUrl&url=success";break; case "config_file_third_kind":href="/hr/fileThirdKind.do?method=toUrl&url=success";break; case "config_file_major_kind":href="/hr/majorKind.do?method=toUrl&url=success";break; case "config_file_major":href="/hr/major.do?method=toUrl&url=success";break; case "config_file_public_char":href="/hr/publicChar.do?method=toUrl&url=success";break; case "config_question_first_kind":href="/hr/questionFirstKind.do?method=toUrl&url=success";break; case "config_question_second_kind":href="/hr/questionSecondKind.do?method=toUrl&url=success";break; case "config_user":href = "/hr/users.do?method=toUrl&url=users";break; case "config_primary_key":href = "/hr/primaryKey.do?method=toUrl&url=success";break; case "human_file_add":href = "/hr/human.do?method=toLoadOptions";break; case "human_file_check":href = "human.do?method=toLoadUncheckHumanFile";break; case "human_file_opreate":href = "human.do?method=toLoadFirstKind";break; case "human_file_resume":href = "human.do?method=toLoadResume";break; case "change_add":href="/hr/reMajor.do?method=toSearch";break; case "change_check":href="/hr/chMajor.do?method=doCheckList";break; case "change_search":href="/hr/searchMajor.do?method=toSearchPage";break; case "salary_standed_add":href="/hr/restand.do?method=doSarlar";break; case "salary_standed_check":href="/hr/ckstand.do?method=doSeStandList";break; case "salary_standed_search":href="/hr/search.do?method=toRearchPage";break; case "salary_grant_add":href="/hr/regrant.do?method=reGrant";break; case "salary_grant_check":href="/hr/chGrant.do?method=toReGrantList";break; case "engage_release":href="/hr/release.do?method=toUrl&url=add";break; case "engage_subjects":href="/hr/subjects.do?method=toUrl&url=add";break; case "engage_resume":href="/hr/resume.do?method=toUrl&url=resarch";break; case "engage_view":href="/hr/view.do?method=toUrl&url=Vresarch";break;//////招聘管理 case "report_excel":href="/hr/report.do?method=toUrl&url=excel";break; case "report_pdf":href="/hr/report.do?method=toUrl&url=pdf";break; case "report_xml":href="/hr/report.do?method=toUrl&url=xml";break; default:break; } if ("" != href) { e.href = href; str = "body_" + str.split("_")[0]; show_body(str,false);//显示框架顶部和主体 return true; } return false; } //根据字符串改变顶部的显示,(从而面部改变主体的显示,flag是否需要显示主体的) function show_body(str,flag){ var bd = window.parent.frame_top; var name = menu_bar[0]; for (var i in menu_bar) { var ele = bd.document.getElementById(menu_bar[i]); if(menu_bar[i] == str){ ele.src = ele.src.replace("no", "yes"); name = menu_bar[i]; }else { ele.src = ele.src.replace("yes", "no"); } } //改变主体部分的显示 if(flag){ window.parent.frame_body.location.href = "/hr/baseConfig.do?method=toBodyUrl&url=" + name; } }