var loadhref="";var contacters=[];var smsConNames=[];var smsConPhones=[];var ConEmails=[];var ConLoginNames=[];var ConNfsIds=[];var ConNfsNames=[];var orderType="2";var orderState="1";var personType="2";var modelType="3";var isPerson=true;var currPage=1;var oldObj;var oldObjSubsel;var oldSelect;var relPath;var type="";var rootId="";var groupId="";var groupName="";var navigationId="1.1";var swfu;var width=100;var height=45;var fromUrl="http://www.wsclz.com";var gps={paths:{},getPath:function(a){if(this.paths[a]){return this.paths[a]}else{return null}},setPath:function(a,b){this.paths[a]=b},clearPath:function(a){if(this.paths[a]){this.paths[a]=null}}};$(document).ready(function(){if(window.opener){fromUrl=window.opener.location.href}var b=$("#main_iframe")[0];oldSelect=$("#Tabs .current");if($.getParam("from")=="shoppcart"){showSubtitle("adminsub",$("#Tabs a[@ui=adminsub]")[0],"order")}else{$("#main_iframe").attr("src","per_index.html")}var c=$.getAgentInfo();var d=c.agent_state;if(d&&d==2){$("a[ui=agentsub]").parent().show()}else{$("a[ui=agentsub]").parent().hide()}var a=window.document.body.clientHeight-$("#header").height()-$("#subtitlebar").height()-$("#footer").height()-$("#fbottom").height()-40;top.load_fun=function(j){var k=$("#main",b.contentWindow.document.body).parent();var g=$("#side",b.contentWindow.document.body).height();try{b.style.height=a+15;if(b.contentWindow.document.body.scrollHeight<a){k.addClass("valign").height(a-15);b.style.height=a}else{k.addClass("valign");if(g>a-15){k.height(g)}else{if(navigator.userAgent.indexOf("Firefox")>0){k.height(b.contentWindow.document.body.clientHeight-25)}else{k.addClass("valign").height(b.contentWindow.document.body.offsetHeight-25)}}b.style.height=b.contentWindow.document.body.scrollHeight}if(b.contentWindow.document.body.clientWidth<778){b.style.width=778;$("#header")[0].style.width=778;$("#footer")[0].style.width=778;$("#subtitlebar")[0].style.width=778}else{b.style.width=b.contentWindow.document.body.clientWidth;$("#header")[0].style.width=b.contentWindow.document.body.clientWidth;$("#subtitlebar")[0].style.width=b.contentWindow.document.body.clientWidth;$("#footer")[0].style.width=b.contentWindow.document.body.clientWidth}}catch(i){}var f=b.contentWindow.location.href;if(f=="about:blank"){return}loadhref=f.substring(f.lastIndexOf("/site/"),f.length);$("a").each(function(m){var e=$(this).attr("href");var l=$(this).attr("id");var n=$(this).parent().attr("id");if(loadhref==e){if($(this).attr("class")!="current"){if(e=="/site/jxc/modules/personal/per_index.html"){showSubtitle("indexsub",$("#Tabs a[@ui="+n+"]")[0])}else{showSubtitle(n,$("#Tabs a[@ui="+n+"]")[0],l)}}}});if(j!=null){if($(j).length>0&&$(j)[0].nodeType){var h=document.body;h.scrollTop=$(j).offset().top}}};window.onresize=function(){var e=window.screen.availWidth-22;b.style.width=e;$("#header")[0].style.width=e;$("#subtitlebar")[0].style.width=e;$("#footer")[0].style.width=e};if($.browser.msie){b.attachEvent("onload",top.load_fun)}else{b.onload=top.load_fun}navstyle=$(".style");getPerName();getPerLogo();getDay()});function getDay(){var b=["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];var a=new Date();var c="今天是";c+=a.getFullYear()+"年";c+=a.getMonth()+1+"月";c+=a.getDate()+"日，";c+=b[a.getDay()];$("#today").html(c+"，祝您心情愉快！")}function showSubtitle(e,d,c,b){if(oldSelect){oldSelect.removeClass()}$(d).attr("class","current");oldSelect=$("#Tabs .current");d.blur();if(oldObj){oldObj.hide()}oldObj=$("#"+e);$("#"+e).show();if(e=="index"){$("#subtitlebar a.current").removeClass("current");$("#subtitlebar span[@ui=subSpan]").hide();return}var a;if(!c){a=oldObj.find("a:eq(0)")[0]}else{a=oldObj.find("a#"+c)[0]}if(b){changeBg(a,b)}else{changeBg(a,"sub1")}}var changeBg=function(b,a){navigationId="1.1";if(!$(b).attr("unclear")){gps.clearPath(0)}b.blur();if(oldObjSubsel){oldObjSubsel.removeClass()}$("#subtitlebar a.current").removeClass("current");$(b).addClass("current");$("#main_iframe").attr("content",$(b).attr("id"));oldObjSubsel=$("#subtitlebar a.current");Ttype=$(b).attr("Ttype");Jtype=$(b).attr("Jtype");type=$(b).attr("type");if(a){if(a=="sub1"){$("#main_iframe").attr("src",$(b).attr("href"));$("#main_iframe").attr("ui",$(b).attr("href"))}else{if(a!=""){$("#main_iframe").attr("src",a);$("#main_iframe").attr("ui",a)}}}else{$("#main_iframe").attr("ui",$(b).attr("href"))}};function clickTab(d,b,a){var c=$("#Tabs a[@ui="+d+"]")[0];showSubtitle(d,c,b,a)}function moreFind(a){switch(a){case"1":showSubtitle("jxcsub3",$("#jxcModule3 a:eq(0)"));navigationId="1.2";break;case"2":showSubtitle("jxcsub3",$("#jxcsub3 a:eq(1)"),"sub3_advise");navigationId="1.4";break;case"3":showSubtitle("adminsub2",$("#jxcModule8 a:eq(0)"),"publicbbs");SDtype="1";break;case"4":showSubtitle("adminsub2",$("#jxcModule8 a:eq(0)"),"publicbbs");SDtype="2";break;case"5":showSubtitle("jxcsub4",$("#jxcModule4 a:eq(0)"));navigationId="4";break;case"6":showSubtitle("adminsub",$("#adminsub a:eq(0)"));navigationId="1.3";break;default:break}}function getPerName(){$.getDS("service/do/biz/account/PersonInfo/getInfo","login_name="+$.cookie("login_name"),function(a){$("#pName").html(changfontSize(a.result[0].name,"pName"))})}function modificPerName(a){if(a){$.cookie("name",a,{expires:null,path:"/",secure:false});$("#pName").html(changfontSize(a,"pName"))}}function getPerLogo(){$.getDS("service/do/biz/account/PersonInfo/getPic","contact_id="+$.cookie("person_id")+"&flag=logo_",function(a){var b="/themes/default/img/per_nophoto.gif";$.bindImg($("#per_logo"),a.small_path,b,function(c){$("#logoTd").attr("width",c+10)})})}var tabNum=0;relPath="txl/";function opentab(g,c,e){if(relPath){e=relPath+e}var f=$("#txlsub a[@contactId="+g+"]");if(f.length>0){f.attr("href",e);f[0].onclick();$("#main_iframe").attr("src",$(f).attr("href"))}else{if(tabNum==4){var b=txlsub.childNodes[6];txlsub.removeChild(b);tabNum--}oldObjSubsel.removeClass("current");var d="<span contactId='"+g+"'>| <a class='current' unclear=true id='"+g+"' href='/site/jxc/modules/personal/"+e+"' contactId='"+g+"' onclick='changeBg(this)' target='c_main'>"+c+" </a></span>";$("#txlsub").append(d);oldObjSubsel=$("#txlsub .current");oldObjSubsel[0].onclick();$("#main_iframe").attr("src",$(oldObjSubsel).attr("href"));tabNum++}}function delTab(a){$("#txlsub span[@contactId="+a+"]").remove();tabNum--}function changestyle(b){var a=location.href.split("?")[0];window.location=(a.indexOf("#")==(a.length-1))?a.substring(0,a.length-1):a}var width=100;var height=45;function imgShow(a){if(a.width>width){a.height=a.height*width/a.width;a.width=width}if(a.height>height){a.width=a.width*height/a.height;a.height=height}}function checkLogoEditable(){var b="contact_id="+$.cookie("person_id")+"&width="+width+"&height="+height+"&flag=logo_";var a="service/do/biz/account/PersonInfo/uploadPic?"+b;if(swfu==undefined){swfu=$.initSWF(a,{size:"8",types:"*.jpg;*.gif;*.png;*.jpeg",files:"10",swfspace:"swfspace",swftitle:"更改个人头像",swfwidth:"90"},function(){getPerLogo();for(var c=0;c<window.frames.length;c++){if(window.frames[c].getPreLogo){window.frames[c].getPreLogo()}}})}else{swfu.setUploadURL(a);swfu.addSetting("upload_complete_handler",function(){getPerLogo();for(var c=0;c<window.frames.length;c++){if(window.frames[c].getPreLogo){window.frames[c].getPreLogo()}}},null)}$("#per_logo").attr("alt","点击图片可更换logo");$("#per_logo").css("cursor","pointer");$("#per_logo").bind("click",function(){})}function upLoad(){swfu.selectFile()};
