Ext.namespace("Ablesky.app.profile.profileService");Ablesky.app.profile.profileService=function(){LoadLangFile.loadFile("js/lang/Lang-profile");LoadLangFile.loadFile("js/lang/Lang-flow");var E=function(){Navigation.init([{name:Ext.get("screenName").getValue(),link:Ext.get("username").getValue()},{name:Lang.profile.provideService}])};var D=function(){UpdatePageInfo("blogComments",Lang.head.blogComments)};var F=function(){var H=Ext.get("ownerOptionsTitle");var J=Request.QueryString("username");var I=Ablesky.app.common.GetCurrentUser();if(J!=I){if(H){H.dom.style.display="none"}}else{if(H){H.dom.style.display="block"}}};var G=function(){if(LoadLangFile.getLang()=="zh"){if(Ext.get("bestImg")){var H=String.format('ext:qtip="{0}"',Lang.seller.bestTip);Ext.get("bestImg").dom.innerHTML="<img "+H+'  src="'+Ablesky.app.common.GetStaticServerPath()+'images/icon/absBestOfWord_Chi.gif" />'}}else{if(Ext.get("bestImg")){var H=String.format('ext:qtip="{0}"',Lang.seller.bestOfWorld);Ext.get("bestImg").dom.innerHTML="<img "+H+' src="'+Ablesky.app.common.GetStaticServerPath()+'images/icon/absBestOfWord.gif" />'}}};var C=function(){Ext.Ajax.request({url:"organization.do?action=getOrgUserRelation",params:{username:Ext.get("username").getValue()},success:B})};var B=function(H,J){var I=Ext.util.JSON.decode(H.responseText);if(I){if(I.relationType!=0){UpdatePageInfo("viewHaveTroubleDiv",Lang.profile.haveTrouble+"<br/>"+Lang.profile.contactMe);UpdatePageInfo("viewMakeSureSpan",Lang.profile.makeSure);UpdatePageInfo("viewSoftwareA",Lang.profile.software);if(!I.isOnline){Ext.get("organizationImage").dom.src=Ablesky.app.common.GetStaticServerPath()+"images/bg/clientView_zh_disable.gif";Ext.get("organizationImage").dom.onclick="{}"}else{Ext.get("organizationImage").dom.style.cursor="pointer"}Ext.get("organizationImageDiv").dom.style.display="block"}}else{Msg.showError(I.message)}};var A=function(){var I=Ext.get("username").getValue();var H=new Ext.Window({layout:"fit",closeAction:"close",cls:"abPopWinL",title:'<div class="popSignInTitle paddingReMLR">'+Lang.profile.viewTalkSend+"</div>",width:480,height:170,modal:true,draggable:false,buttonAlign:"right",items:[{xtype:"panel",layout:"column",autoHeight:true,style:"padding:0 9px;",items:[{width:80,html:'<img class="photo" src="viewPhoto.do?userName='+I+'"  width="50px" height="50px" />'},{width:370,html:Lang.profile.viewTalkCheck1+I+Lang.profile.viewTalkCheck2+"<br/>"+Lang.profile.viewTalkCheck3}]},{html:'<div class="abDotRepeatTop" ></div>'}],buttons:[new Ext.Button({text:Lang.head.submit,buttonAlign:"right",cls:"OrangeBtn",id:"continueBtn",handler:function(){var J="ableskyp:call?username="+I+"&";window.open(J);H.close()}}),new Ext.Button({text:Lang.head.cancel,buttonAlign:"right",cls:"GrayBtn",id:"cancelBtn",handler:function(){H.close()}})]});H.show()};return{init:function(){E();D();F();G();if(Ext.get("serviceType")){var J=Ext.get("serviceType").dom.value;var H=document.getElementsByName("selectService");for(var I=0;I<H.length;I++){if(H[I].value==J){H[I].checked=true}}}},showViewTalk:A}}();Ext.onReady(function(){Ablesky.app.profile.profileService.init()});var showSelectTag=function(C,B,D,A){Ext.get(C).dom.className="floatleft select";Ext.get(B).dom.className="floatleft";Ext.get(D).dom.style.display="block";Ext.get(A).dom.style.display="none"};Ablesky.app.profile.profileService.radioCheck=function(){var E=Ext.get("username").dom.value;var D=(Ext.get("sort").dom.value=="/"||"")?"":Ext.get("sort").dom.value;var B=(Ext.get("dir").dom.value=="/"||"")?"":Ext.get("dir").dom.value;search="";if(Ext.get("org_search_input")){search=Ext.get("org_search_input").getValue();if(search=="搜索服务"){search=""}}var A=document.getElementsByName("selectService");for(var C=0;C<A.length;C++){if(A[C].checked){window.location.href="community.do?action=toProfileService&username="+E+"&serviceType="+A[C].value+"&sort="+D+"&dir="+B+"&search="+search}}};Ablesky.app.profile.profileService.showDes=function(E){var B=document.getElementById("shorDes_"+E);var A=document.getElementById("longDes_"+E);var D=document.getElementById("openBtn"+E);var C=document.getElementById("closeBtn"+E);if(B.style.display=="none"){B.style.display="inline";A.style.display="none";D.style.display="inline";C.style.display="none"}else{B.style.display="none";A.style.display="block";D.style.display="none";C.style.display="inline"}};