var aM=0;var aW=20;var aS=4000;var MiscNoteParseTag="<b>Note: </b>";var bq;var an;var I;var ba=4000;var aR=15000;var aZ=240;var aN=0;var CustomerLastupdateDate=0;var UserLastupdateDate=0;bq=SessionMiscEnv;an=SessionMiscEnv;if(bq==="0"){I="ItalkService.asmx";}else{I="ItalkService.asmx";}var bj=false,aT=true,R=false,bg=0,bb=0,bn,aQ="",CustomerStatusDnle="Auto",aC=false,ce=false,GoogleCount=2,bC=2,GoogleKeyword="",B=false,SearchPage,aK,aL,bF=false,bc=true,bL,bG="";function C(Function,bA){bc=true;bL=setTimeout(Function,bA);};function bM(){bc=false;clearTimeout(bL);};function be(bm,Str2,Start){return bm.toLowerCase().indexOf(Str2.toLowerCase(),Start);};function bh(bm,Str2){return bm.toLowerCase().lastIndexOf(Str2.toLowerCase());};function bJ(mode,url,method,parameters,async,callback){var i=0;if(bF){if(mode===1){while(mode===1&&bF){i++;if(i>=3){return;}alert("Unable to process request. Please try again. If you continue to see this error, please refresh the page.");}}else{return;}}bF=true;SOAPClient.invoke(url,method,parameters,async,callback);};function bK(){if(bF){alert("Unable to process request. Please try again. If you continue to see this error, please refresh the page.");return false;}else{return true;}};function H(id){if(document.getElementById){H=function(id){return document.getElementById(id);};}else if(document.all){H=function(id){return document.all[id];};}else if(document.layers){H=function(id){return document.layers[id];};}else{H=function(){return false;};}return H(id);};function P(ObjectId,Property,Value){var Object=H(ObjectId);if(Object){switch(Property){case "Top":Object.style.top=Value;break;case "Left":Object.style.left=Value;break;case "Height":Object.style.height=Value;break;case "Width":Object.style.width=Value;break;case "Visibility":Object.style.visibility=Value;break;case "Disabled":Object.disabled=Value;break;case "Innerhtml":Object.innerHTML=Value;break;case "MinHeight":Object.style.minHeight=Value;Object.style.height=Value;}return true;}else{return false;}};function aD(aO){var bm,Str2,Str3;var i,ix;aO=MiscTransRemoveHtml(aO," ");ix=aO.length;if(ix>250){ix=250;i=aO.lastIndexOf(". ",ix-1,100);if(i=== -1){i=aO.lastIndexOf(", ",ix-1,50);}if(i=== -1){i=aO.lastIndexOf(" ",ix-1,50);}i=(i=== -1?ix:i+1);bm=aO.substring(0,i);if(aO.length>i){aO=aO.substring(i,aO.length);if(aO.length>2000){ix=2000;i=aO.lastIndexOf(". ",ix-1);if(i=== -1){i=aO.lastIndexOf(" ",ix-1);}i=(i=== -1?ix:i+1);Str2=aO.substring(0,i);}else{Str2=aO;}}else{Str2="";}}else{bm=aO;Str2="";}bm=MiscConversationTextWww(bm,"[","]");Str2=MiscConversationTextWww(Str2,"","");if(Str2!==""){Str3=bm+" [ "+Str2+" ] ";}else{Str3=bm;}return Str3;};function t(Text,Comment,Tag){return Text+Tag+Comment+"<br><br>";};function r(Text,Comment){return t(Text,Comment,SessionCustomerParseTag);};function v(Text,Comment){return t(Text,Comment,SessionUserParseTag);};function A(Text,Comment){return t(Text,Comment,MiscNoteParseTag);};function aq(aO){var bm;bm=aO;bm=MiscTransRemoveUserProp(bm," ");bm=MiscTransRemoveHtml(bm," ");bm=bm.replace(/\[[\s\S.]*\]/g,"");return bm;};function bd(aO){aO=aq(aO);return aO;};function J(Text){var i,bx="";for(i=Text.length;i>=0;i--){if(be(Text,SessionUserParseTag,i)!== -1||be(Text,SessionCustomerParseTag,i)!== -1){bx=Text.substring(0,i);break;}}return bx;};function av(Text){var Rex;Rex=new RegExp("("+SessionCustomerParseTag+"|"+SessionUserParseTag+"|<br>|</br>|<b>|</b>)","ig");return Text.replace(Rex," ");};function au(Text){var i,j,n0,Return="";j=Text.length;for(i=Text.length-1;i>=0;i--){if(be(Text,SessionUserParseTag,i)===i||be(Text,MiscNoteParseTag,i)===i){j=i;}if(be(Text,SessionCustomerParseTag,i)!== -1){n0=i+SessionCustomerParseTag.length;Return=av(Text.substring(n0,j));break;}}return Return;};function aY(Text){var i,Return="";i=bh(Text,SessionCustomerParseTag);if(i!== -1){Return=Text.substring(i);}return Return;};function D(Text){return aD(Text);};function ai(Text){Text=Text.replace(/no\./ig,"no, ");Text=Text.replace(/\.{2,}/ig,", ");Text=Text.replace(/[\!\?:;]/ig,", ");Text=Text.replace(/<br>/ig," ");Text=Text.replace(/[^A-Za-z0-9'\-\.,\$%&+= ]/ig," ");return Text;};function MiscOnkeypress(evt,ObjectId){var Object=H(ObjectId);if(Object){if(evt.which){if(evt.which===13){Object.click();evt.preventDefault();}}else{if(event.keyCode===13){Object.click();event.returnValue=false;}}}};function SignupCategory1Aspxdropdownlist_DropDown(){H('SignupSubcategory_DropDownListO').options.length=0;};function SignupCategory2Callback(c1){bF=false;H('SignupSubcategory_DropDownListO').options.length=0;for(var i=0;i<c1.length;i++){H('SignupSubcategory_DropDownListO').options[i]=new Option(c1[i],c1[i]);}};function SignupCategory2Aspxdropdownlist_DropDown(){var c0=MiscDdlGet(H('SignupCategory_DropDownListO'));var c1;if(c0!==""&&c0!==null){c1="Please Wait";H('SignupSubcategory_DropDownListO').options.length=0;H('SignupSubcategory_DropDownListO').options[0]=new Option(c1,c1);var p1=new SOAPClientParameters();p1.add("Category_1",c0);p1.add("AllF",true);bJ(1,I,"ServiceCustomerCategory2Get",p1,true,SignupCategory2Callback);}else{c1="All Subcategories";H('SignupSubcategory_DropDownListO').options.length=0;H('SignupSubcategory_DropDownListO').Add(c1,c1,"");}};function SettingsCategory1Aspxdropdownlist_DropDown(){H('SettingsSubcategory_DropDownListO').options.length=0;};function SettingsCategory2Callback(c1){bF=false;H('SettingsSubcategory_DropDownListO').options.length=0;for(var i=0;i<c1.length;i++){H('SettingsSubcategory_DropDownListO').options[i]=new Option(c1[i],c1[i]);}};function SettingsCategory2Aspxdropdownlist_DropDown(){var c0=MiscDdlGet(H('SettingsCategory_DropDownListO'));if(c0!==""){var c1="Please Wait";H('SettingsSubcategory_DropDownListO').options.length=0;H('SettingsSubcategory_DropDownListO').options[0]=new Option(c1,c1);var p1=new SOAPClientParameters();p1.add("Category_1",c0);p1.add("AllF",true);bJ(1,I,"ServiceCustomerCategory2Get",p1,true,SettingsCategory2Callback);}else{H('SettingsSubcategory_DropDownListO').options.length=0;}};function ContentFormDropDownList_DropDown(source){if(source.name.indexOf("SignupCategory")!== -1){SignupCategory1Aspxdropdownlist_DropDown();}if(source.name.indexOf("SettingsCategory")!== -1){SettingsCategory1Aspxdropdownlist_DropDown();}if(source.name.indexOf("SignupSubcategory")!== -1){SignupCategory2Aspxdropdownlist_DropDown();}if(source.name.indexOf("SettingsSubcategory")!== -1){SettingsCategory2Aspxdropdownlist_DropDown();}};function refresh(){window.location.reload(false);};function ax(value){try{H('RLTTSComponent').Speed=value;}catch(bp){}};function ad(value){try{H('RLTTSComponent').Volume=value;}catch(bp){}};function aw(value){try{H('RLTTSComponent').Pitch=value;}catch(bp){}};function c(){try{H('RLTTSComponent').AttachCtrl(H('CrazyTalkPlayer'));if(SessionMode!=="User"){P("CtDiv","Visibility","visible");P("HomePage_FlashDiv","Visibility","hidden");}if(H('RLTTSComponent').GetVoiceCount()>0){if(H('RLTTSComponent').GetVoiceString(0)==="Microsoft Anna - English (United States)"){bb=1;ad(100);ax(50);}else{bb=0;ad(0);ax(55);}}aw(50);bj=true;}catch(bp){if(SessionMode!=="User"){P("HomePage_FlashDiv","Visibility","visible");P("CtDiv","Visibility","hidden");}}};function aa(aO){var bm;if(aO===null){bm="";}else{bm=aO;}bm=aq(bm);bm=ai(bm);try{H('RLTTSComponent').TextContent=bm;}catch(bp){}};function ak(aO){var bv=0;var aX="./ct/danielle-default.cts";if(aO.indexOf("[happy]")!== -1||aO.indexOf("[h]")!== -1){aX="./ct/danielle-happy.cts";}if(aO.indexOf("[no]")!== -1){bv=1;aX="./ct/danielle-no.cts";}if(aO.indexOf("[sad]")!== -1){aX="./ct/danielle-sad.cts";}if(aO.indexOf("[smile]")!== -1||aO.indexOf("[s]")!== -1){aX="./ct/danielle-smile.cts";}if(aO.indexOf("[wink]")!== -1){aX="./ct/danielle-wink.cts";}if(aO.indexOf("[yes]")!== -1){bv=1;aX="./ct/danielle-yes.cts";}try{H('CrazyTalkPlayer').ScriptName=aX;}catch(bp){}return bv;};function CtPlayText(){try{H('RLTTSComponent').Play();}catch(bp){}};function ae(aO){aa(aO);if(ak(aO)===0){CtPlayText();}else{C("CtPlayText()",1700);}};var bi;function K(aO,bw){if(aT){if(aO!==null&&aO!==""){if(bj){if(bb===1){ae(aO);}else{if(bw!==""&&bw!==null){bi=aO;SoundLoadPlay("MainBgsound",bw,"ae(bi)");}}}else{if(bw!==""&&bw!==null){SoundPlay("MainBgsound",bw);}}}}};function aB(){};function CtCtlPos(){var bT,cc,n0;if(R){if(bj){H('CrazyTalkPlayer').ModelName='./ct/danielle-large.ctm';}cc=640;bT=425;P("DanielleDiv","Height","475px");P("DanielleDiv","Width","464px");P("DanielleTitlebarDiv","Width","464px");P("CtCtlSoundA","Left","357px");P("CtCtlSoundA1","Left","357px");P("CtCtlZoomA","Left","397px");P("CtCtlZoomA","Innerhtml","\u00abSmaller");P("CtDiv","Width","464px");P("CtDiv1","Left","0px");P("ConversationDiv","Width","462px");P("ConversationBackDiv","Width","462px");P("HomePage_CustomerConversationDiv","Width","453px");P("ScoreDiv","Width","462px");P("SearchA","Width","462px");P("CrazyTalkPlayer","Height","400px");P("CrazyTalkPlayer","Width","462px");P("Section3Div","Top","175px");if(H("LoginDiv")){P("HomeDiv","Width","1092px");}else{P("HomeDiv","Width","830px");}P("MainDiv","Width","830px");P("FooterDiv","Left","191px");P("RightDiv","Left","842px");P("MainBackDiv","MinHeight","890px");}else{if(bj){H('CrazyTalkPlayer').ModelName='./ct/danielle-small.ctm';}cc=490;bT=200;P("CrazyTalkPlayer","Height","175px");P("CrazyTalkPlayer","Width","200px");P("ConversationDiv","Width","250px");P("ConversationBackDiv","Width","250px");P("HomePage_CustomerConversationDiv","Width","241px");P("ScoreDiv","Width","250px");P("SearchA","Width","250px");P("CtDiv1","Left","25px");P("CtDiv","Width","252px");P("CtCtlSoundA","Left","150px");P("CtCtlSoundA1","Left","150px");P("CtCtlZoomA","Left","190px");P("CtCtlZoomA","Innerhtml","Larger\u00bb");P("DanielleTitlebarDiv","Width","252px");P("DanielleDiv","Height","200px");P("DanielleDiv","Width","252px");if(SessionProProduct==="Pro"){P("Section3Div","Top","62px");P("MainBackDiv","MinHeight","780px");}else{P("Section3Div","Top","0px");P("MainBackDiv","MinHeight","600px");}if(H("LoginDiv")){P("HomeDiv","Width","880px");}else{P("HomeDiv","Width","618px");}P("MainDiv","Width","618px");P("FooterDiv","Left","85px");P("RightDiv","Left","630px");}if(aT){if(bj){P("CtDiv1","Visibility","visible");}else{P("FlashDiv1","Visibility","visible");}P("CtCtlSoundA","Innerhtml","Off\u00bb");P("CtCtlSoundA1","Innerhtml","Off\u00bb");}else{P("CtDiv1","Visibility","hidden");P("FlashDiv1","Visibility","hidden");P("CtCtlSoundA","Innerhtml","\u00abOn");P("CtCtlSoundA1","Innerhtml","\u00abOn");bT=23;}n0=cc-bT;P("CtDiv","Height",bT.toString()+"px");P("ConversationDiv","Top",(bT+6).toString()+"px");P("ConversationDiv","Height",n0.toString()+"px");P("ConversationBackDiv","Height",(n0-20).toString()+"px");P("HomePage_CustomerConversationDiv","Height",(n0-30).toString()+"px");P("ScoreDiv","Top",(n0-17).toString()+"px");P("SearchA","Top",(n0-5).toString()+"px");};function CtCtlSound_Onclick(){aT= !aT;CtCtlPos();};function CtCtlZoom_Onclick(){R= !R;CtCtlPos();};function CtInstall_Onclick(){if(navigator.userAgent.indexOf("MSIE")!== -1){alert("To view full animation, please click Yes or Install to all installation prompts.\n\nIf you encounter problems: From the main menu select Tools then Internet options, select the Security tab, then select Internet under the zone selection area. Move the slider bar to Medium. If you are using a custom security level then select the custom level button. From the security settings screen make sure that Run ActiveX controls is enabled. The High safety disables ActiveX for example.");window.location="Home.aspx?Id=Home&CtMode=1";}else{alert("Full animation for Weegy is available for Internet Explorer only. Support for additional browsers will be provided soon.");}};function bE(){return bG;};function UserAcceptConversationSet(aO,aE,GoogleF){var l0=true,o0,o1;bG=aO;UserLastupdateDate=aE;H('UserAcceptConversationDiv').innerHTML=aO;H('UserAcceptConversationDiv').scrollTop=H('UserAcceptConversationDiv').scrollHeight;};function UserGoogleA_Onclick(){window.open("http://www.google.com/search?as_q="+au(bE()),"","");};function f(aO,V,GoogleF,SaveF){var l0=true,o0,o1;if(SaveF===1){aQ=aO;}CustomerLastupdateDate=V;H('HomePage_CustomerConversationDiv').innerHTML=aO;H('HomePage_CustomerConversationDiv').scrollTop=H('HomePage_CustomerConversationDiv').scrollHeight;};function g(){return aQ;};function aj(){UserLastupdateDate=0;H('ExpertMainPage_UserAcceptCommentAspxmemo').value="";UserAcceptConversationSet("",0,0);H('ExpertMainPage_UserAcceptKnowledgebaseCheckBox').checked=true;H('ExpertMainPage_UserAcceptExpirationTypeAspxdropdownlist').selectedIndex=0;H('ExpertMainPage_UserAcceptExpirationDateAspxtextbox').value="";H('ExpertMainPage_UserAcceptActionAspxdropdownlist').selectedIndex=0;};function bB(bk){P("CtCtlZoomA","Visibility","hidden");P("CommentLoginDiv","Visibility","hidden");if(bk==="Customer"){P("HomePage_CommentDiv","Top","118px");P("ExpiredateDiv","Visibility","hidden");P("HomePage_CommentCustomerImage","Visibility","visible");P("CommentUserImage","Visibility","hidden");P("CommentTitlebarDiv1","Innerhtml","Enter a comment from "+SessionCustomerParseTag);}else{P("HomePage_CommentDiv","Top","223px");P("ExpiredateDiv","Visibility","visible");P("HomePage_CommentCustomerImage","Visibility","hidden");P("CommentUserImage","Visibility","visible");P("CommentTitlebarDiv1","Innerhtml","Enter a comment from "+SessionUserParseTag);}if(g()===""){P("CustomerStartA","Visibility","hidden");P("DesignerBackA","Visibility","hidden");}else{P("CustomerStartA","Visibility","visible");P("DesignerBackA","Visibility","visible");}};function bt(){SoundPlayStop();switch(SessionUserStatusAction){case "Watch":P("HomePage_FlashDiv","Visibility","hidden");P("WatchDiv","Top","0px");P("AskDiv","Visibility","hidden");P("AcceptDiv","Visibility","hidden");P("WatchDiv","Visibility","visible");break;case "Ask":P("HomePage_FlashDiv","Visibility","hidden");P("AskDiv","Top","0px");P("WatchDiv","Visibility","hidden");P("AcceptDiv","Visibility","hidden");P("AskDiv","Visibility","visible");break;case "Accept":if(!bj){P("HomePage_FlashDiv","Visibility","visible");}P("AcceptDiv","Top","0px");P("WatchDiv","Visibility","hidden");P("AskDiv","Visibility","hidden");P("AcceptDiv","Visibility","visible");break;}};function m(bk){var c0=MiscDdlGet(H('ExpertMainPage_UserAcceptActionAspxdropdownlist'));if(bk==="Customer"&&(c0==="Normal Response"||c0==="Pass Conversation To Another Expert"||c0==="Start New Conversation")){H('UserAcceptEnterAspxbutton').disabled=true;}else{H('UserAcceptEnterAspxbutton').disabled=false;}};function bW(){SessionProPaid="0";if(H('HomePage_PayPaypalButton')){H('HomePage_PayPaypalButton').value="Pay Now";H('HomePage_PayPaypalButton').disabled=false;}};function k(bk){if(bk==="User"&&SessionCustomerStatusAction==="Active"){H('CustomerEnterAspxbutton').disabled=true;}else{H('CustomerEnterAspxbutton').disabled=false;}if(g()===""){if(B){P("CommentLoginDiv","Visibility","visible");}P("CustomerStartA","Visibility","hidden");}else{P("CustomerStartA","Visibility","visible");P("CommentLoginDiv","Visibility","hidden");}if(H('CustomerRateGoodAspxbutton')){H('CustomerRateGoodAspxbutton').disabled=(!aC);H('CustomerRateBadAspxbutton').disabled=(!aC);}if(ce){P("CustomerNsDiv","Visibility","visible");}else{P("CustomerNsDiv","Visibility","hidden");}if(SessionSize==="Small"){P("DesignerBackA","Visibility","hidden");}};function CustomerEndCallback(c1){bF=false;};function G(ConversationClear,ProClear,RateClear){if(SessionMode==="Customer"){SessionCustomerStatusAction="Inactive";SessionStatusTurn="Customer";if(RateClear===1){aC=false;ce=false;}if(ConversationClear===1){H('HomePage_CustomerCommentAspxmemo').value="";f("",0,0,1);}if(ProClear===1){bW();}k("Customer");if(SessionConversationId!==null&&ProClear===1){var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);bJ(0,I,"ServiceCustomerEnd",p1,true,CustomerEndCallback);}}else{SessionCustomerStatusAction="Inactive";SessionStatusTurn="Customer";H('HomePage_CustomerCommentAspxmemo').value="";f("",0,0,1);bB("Customer");}};function F(){var o0;o0=H('HomePage_CustomerCategory1Aspxdropdownlist');if(o0.selectedIndex=== -1||MiscDdlGet(o0)===""||MiscDdlGet(o0)===null){alert("You must select a category.");return false;}o0=H('HomePage_CustomerCategory2Aspxdropdownlist');if(o0.disabled===false&&(o0.selectedIndex=== -1||MiscDdlGet(o0)===""||MiscDdlGet(o0)===null)){alert("You must select a subcategory.");return false;}if(H('HomePage_CustomerCommentAspxmemo').value===""){alert("You must enter a question or comment.");return false;}if((SessionProProduct==="Pro"||SessionProProduct==="Research")&&(H('HomePage_CustomerExpertLabelDiv').innerHTML===""||SessionProUserId===null||SessionProUserId==="")){alert("You must select an expert.");return false;}if((SessionProProduct==="Pro"||SessionProProduct==="Research")&&SessionProPaid!=="1"){alert("You must send payment.");return false;}return true;};function ah(){SessionCustomerStatusAction="Inactive";k("Customer");SessionStatusTurn="Customer";};function cq(){var c2;c2="I'm sorry! Your payment could not be verified. If you successfully sent a payment, please <b><a onclick='CustomerNsDiv_Onclick(0);' href='#'>click here</a></b> to contact us. We apologize for the inconvenience.";f(A(g(),c2),0,1,1);bW();ah();};function CustomerTimeoutCallback(c1){bF=false;};function ca(){var c2;if(SessionProProduct==="Pro"||SessionProProduct==="Research"){c2="I'm sorry. Your expert did not respond. Please <b><a onclick='CustomerNsDiv_Onclick(1);' href='#'>click here</a></b> for a free conversation coupon that can be used at anytime to contact the expert of your choice.";f(A(g(),c2),0,1,1);}else{if(SessionUserUserId===null||SessionUserUserId===""){B=true;c2="I'm sorry. I cannot respond to your question. Please <a href='home.aspx?id=ExpertLogin'><b>log in</b></a> or <a href='home.aspx?id=SignupSignup'><b>sign up</b></a> to chat with an expert. It's free! [smile]";K(c2,"");f(A(g(),c2),0,1,1);}else{c2="I'm sorry. I cannot respond to your question, and an expert is not available. Please rephrase your question. [Please consider using <a href='home.aspx?id=Pro'><b>Weegy Pro</b></a>. With Weegy Pro, you'll always chat with a live expert.]";K(c2,"sounds/danielle-noexpert.wav");f(A(g(),c2),0,1,1);}}bW();var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);bJ(0,I,"ServiceCustomerTimeout",p1,true,CustomerTimeoutCallback);ah();};function cr(){var c2;c2="Thank you for your research question. Your expert will begin working now and should respond within 24 hours. At any time, you can click this link (or paste the URL into your browser) to view your answer, modify your question, or make a comment:<br><br><b><a href='http://www.weegy.com?ConversationId="+SessionConversationId+"'>www.weegy.com?ConversationId="+SessionConversationId+"</b></a><br><br>You can also search for your question in the archive.<br><br>Thank you for using Weegy!";f(A(g(),c2),0,1,1);bW();ah();};function CustomerEnterCallback(c1){var c2,V=parseFloat(c1[4]);K(c1[5],"speech/"+c1[6]);switch(c1[0]){case "True":f(c1[2],V,1,1);c2="Please rate the response. Click Bad to chat with a live expert.";f(A(c1[2],c2),V,0,0);SessionStatusTurn="Customer";aC=true;k("Customer");if(SessionSize==="Small"){P("ScoreDiv","Visibility","visible");P("SearchA","Visibility","visible");H("ScoreDiv").innerHTML=c1[3];}GoogleKeyword=GoogleKeyword+c1[5]+" ";break;case "Close":case "Login":ca();break;case "Not completed":cq();break;case "Error":ca();break;default:if(SessionProProduct==="Research"){cr();}else{f(c1[2],V,0,1);SessionStatusTurn="User";if(SessionSize==="Small"){P("ScoreDiv","Visibility","hidden");P("SearchA","Visibility","hidden");}if(!bc){Timer();}}}};function CustomerEnterBegCallback(c1){bF=false;SessionConversationId=c1[1];CustomerEnterCallback(c1);};function CustomerEnterNextCallback(c1){bF=false;CustomerEnterCallback(c1);};function CustomerEnter(){var Comment;if(!bK()){return;}if(F()){var aV=SessionCustomerStatusAction;SessionCustomerStatusAction="Active";aM=0;if(aV!=="Active"){f("",0,0,1);CustomerStatusDnle="Auto";}Comment=H('HomePage_CustomerCommentAspxmemo').value;f(r(g(),Comment),CustomerLastupdateDate,0,1);GoogleKeyword=GoogleKeyword+Comment+" ";H('HomePage_CustomerCommentAspxmemo').value="";k("User");var p1=new SOAPClientParameters();p1.add("AccountId",SessionCustomerAccountId);p1.add("Category1",MiscDdlGet(H('HomePage_CustomerCategory1Aspxdropdownlist')));p1.add("Category2",MiscDdlGet(H('HomePage_CustomerCategory2Aspxdropdownlist')));p1.add("CustomerId",SessionUserUserId);p1.add("Comment",Comment);p1.add("ConversationText",g());p1.add("CustomerIp",SessionIp);p1.add("SourceType","Web");p1.add("Phone","");if(aV!=="Active"&&SessionProProduct!=="Pro"&&SessionProProduct!=="Research"){pageTracker._trackPageview('/TrackEventCustomerEnterBeg');bJ(1,I,"ServiceCustomerEnterBeg",p1,true,CustomerEnterBegCallback);}else{pageTracker._trackPageview('/TrackEventCustomerEnterNext');p1.add("ConversationId",SessionConversationId);p1.add("ProProduct",SessionProProduct);p1.add("ProUserId",SessionProUserId);bJ(1,I,"ServiceCustomerEnterNext",p1,true,CustomerEnterNextCallback);}}};function CustomerWaitCallback(c1){var c2;bF=false;if(c1===null){return;}var V=parseFloat(c1[6]);aM++;if((c1[4]==="Watch"||c1[4]==="Ask")&&aM>aW){ca();}else{if(c1[4]==="End"){G(0,1,0);}else{if(c1[0]==="True"){if(SessionStatusTurn!==c1[3]){SessionStatusTurn=c1[3];k(SessionStatusTurn);GoogleKeyword=GoogleKeyword+c1[5]+" ";}K(c1[5],"speech/"+c1[7]);f(c1[2],V,1,1);}else{if(c1[4]==="Accept"&&CustomerStatusDnle!=="Manual"){CustomerStatusDnle="Manual";c2="An expert has accepted your question. Please wait for the expert to respond. [smile]";K(c2,"");f(A(g(),c2),CustomerLastupdateDate,0,1);aC=true;if(SessionProProduct==="Pro"){ce=true;}}}}}};function ac(){var p1=new SOAPClientParameters();if(SessionConversationId!==null){p1.add("ConversationId",SessionConversationId);p1.add("CustomerLastupdateDate",CustomerLastupdateDate);bJ(0,I,"ServiceCustomerWait",p1,true,CustomerWaitCallback);}};function CustomerRateProCallback(c1){bF=false;};function am(c1){f(c1[3],CustomerLastupdateDate,0,1);K(c1[1],"speech/"+c1[2]);ah();};function al(c1){aM=0;SessionCustomerStatusAction="Active";SessionStatusTurn="User";aC=false;k("User");f(c1[3],CustomerLastupdateDate,0,1);K(c1[1],"speech/"+c1[2]);var p1=new SOAPClientParameters();p1.add("AccountId",SessionCustomerAccountId);p1.add("Category1",MiscDdlGet(H('HomePage_CustomerCategory1Aspxdropdownlist')));p1.add("Category2",MiscDdlGet(H('HomePage_CustomerCategory2Aspxdropdownlist')));p1.add("CustomerId",SessionUserUserId);p1.add("Comment","");p1.add("ConversationText",g());p1.add("ConversationId",SessionConversationId);p1.add("CustomerIp",SessionIp);p1.add("ProProduct",SessionProProduct);p1.add("ProUserId",SessionProUserId);p1.add("SourceType","Web");p1.add("Phone","");bJ(1,I,"ServiceCustomerEnterNext",p1,true,CustomerEnterNextCallback);};function CustomerRateCallback(c1){bF=false;if(c1[0]==="Login"){B=true;}if(c1[0]==="Close"||c1[0]==="Login"){am(c1);}if(c1[0]==="Manual"){al(c1);}};function U(DnleRating){aC=false;k(SessionStatusTurn);var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);p1.add("DnleRating",DnleRating);if(SessionProProduct==="Pro"||CustomerStatusDnle==="Manual"){bJ(1,I,"ServiceCustomerRatePro",p1,true,CustomerRateProCallback);}else{p1.add("CustomerIp",SessionIp);p1.add("CustomerId",SessionUserUserId);p1.add("SourceType","Web");p1.add("Phone","");bJ(1,I,"ServiceCustomerRate",p1,true,CustomerRateCallback);}};function O(){if(F()){var aV=SessionCustomerStatusAction;SessionCustomerStatusAction="Active";if(aV!=="Active"){f("",0,0,1);}f(r(g(),H('HomePage_CustomerCommentAspxmemo').value),CustomerLastupdateDate,0,1);H('HomePage_CustomerCommentAspxmemo').value="";bB("User");SessionStatusTurn="User";}};function DesignerEnterCallback(){bF=false;};function ab(){var aI=g();var aF=D(H('HomePage_CustomerCommentAspxmemo').value);var aH=v(aI,aF);f(aH,CustomerLastupdateDate,0,1);H('HomePage_CustomerCommentAspxmemo').value="";bB("Customer");SessionStatusTurn="Customer";K(aF,"");var p1=new SOAPClientParameters();p1.add("AccountId",SessionCustomerAccountId);p1.add("Category1",MiscDdlGet(H('HomePage_CustomerCategory1Aspxdropdownlist')));p1.add("Category2",MiscDdlGet(H('HomePage_CustomerCategory2Aspxdropdownlist')));p1.add("UserId",SessionUserUserId);p1.add("SessionId",SessionUserSessionId);p1.add("CommentText",aF);p1.add("ConversationText",aH);p1.add("ConversationTextPre",aI);p1.add("DnleExpirationType",MiscDdlGet(H('HomePage_UserAcceptExpirationTypeAspxdropdownlist')));p1.add("DnleExpirationDate",H('HomePage_UserAcceptExpirationDateAspxtextbox').value);p1.add("DnleUserId",SessionUserDnleUserId);p1.add("Mode","");bJ(1,I,"ServiceDesignerEnter",p1,true,DesignerEnterCallback);};function ao(){if(SessionUserLevel<=1){alert("This function is disabled for your user level.");return;}if(SessionStatusTurn==="Customer"){O();}else{ab();}};function CustomerCategory1Aspxdropdownlist_DropDown(){if(SessionCustomerStatusAction==="Active"){G(1,1,1);}};function CustomerCategory1Aspxdropdownlist_CloseUp(){var j=0;var l0=false;var c0=MiscDdlGet(H('HomePage_CustomerCategory1Aspxdropdownlist'));if(SessionCustomerStatusAction==="Active"){G(1,1,1);}H('HomePage_CustomerCategory2Aspxdropdownlist').options.length=0;for(var i=0;i<SessionCustomerCategory2Items.length;i+=3){if(SessionCustomerCategory2Items[i]===c0){H('HomePage_CustomerCategory2Aspxdropdownlist').options[j]=new Option(SessionCustomerCategory2Items[i+1],SessionCustomerCategory2Items[i+1]);j++;if(SessionCustomerCategory2Items[i+1]==="No Subcategories"){l0=true;}}}if(l0){H('HomePage_CustomerCategory2Aspxdropdownlist').selectedValue="No Subcategories";H('HomePage_CustomerCategory2Aspxdropdownlist').disabled=true;}else{H('HomePage_CustomerCategory2Aspxdropdownlist').disabled=false;}};function CustomerExpertButton_Onclick(){var c0,c1;c0=MiscDdlGet(H('HomePage_CustomerCategory1Aspxdropdownlist'));c1=MiscDdlGet(H('HomePage_CustomerCategory2Aspxdropdownlist'));window.location="Home.aspx?Id=SelectPage&SpAccountId="+SessionCustomerAccountId+"&SpCategory="+c0+"&SpSubcategory="+c1+"&SpPage=1&SpEnter=1";};function CustomerEnterAspxbutton_Onclick(){if(SessionMode==="Customer"){CustomerEnter();}else{ao();}};function CustomerCommentAspxmemo_Onkeypress(evt){if(evt.which){if(evt.which===13){if(!H('CustomerEnterAspxbutton').disabled){CustomerEnterAspxbutton_Onclick();evt.preventDefault();}}}else{if(event.keyCode===13){if(!H('CustomerEnterAspxbutton').disabled){CustomerEnterAspxbutton_Onclick();event.returnValue=false;}}}};function CustomerStartA_Onclick(){G(1,1,1);};function CustomerRateGoodAspxbutton_Onclick(){K("[smile]","");U(1);};function CustomerRateBadAspxbutton_Onclick(){U(-1);};function CustomerSearchA_Onclick(){var c2=au(g());window.location="Home.aspx?Id=SearchPage&SpAccountId="+SessionCustomerAccountId+"&SpComment="+c2+"&SpPage=1&SpEnter=1";return true;};function CustomerNsCallback(c1){bF=false;if(c1[0]==="True"){if(c1[1]===null||c1[1]===""){window.location="Home.aspx?Id=ProNs";}else{window.location="Home.aspx?Id=ProNs&ProCoupon="+c1[1];}}};function CustomerNsDiv_Onclick(CouponF){if(!bK()){return false;}var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);p1.add("CouponF",CouponF);p1.add("Amount",H('HomePage_PayDropDownList').value);bJ(1,I,"ServiceCustomerNs",p1,true,CustomerNsCallback);return true;};function as(){SessionStatusTurn="Customer";bB("Customer");};function DesignerBackA_Onclick(){if(SessionStatusTurn==="Customer"){SessionStatusTurn="User";}else{SessionStatusTurn="Customer";}f(J(g()),0,0,1);bB(SessionStatusTurn);};function bD(){SessionUserStatusAction="Watch";bt();};function UserWatchAlert(c1){self.focus();SoundPlay("MainBgsound","sounds/ding.wav");};function UserWatchCallback(c1){bF=false;if(c1===null){return;}if(c1[0]==="True"){SessionConversationId=c1[1];if(c1[3]==="Pro"){H('UserAskBodyDiv').innerHTML="This is a Weegy Pro conversation and the user has selected you. Click Accept to respond.";H('UserAskBodyDiv').style.color="#ff0000";}else{H('UserAskBodyDiv').innerHTML="A user has started a conversaton and you are the first available expert. Click Accept to respond.";H('UserAskBodyDiv').style.color="#404040";}H('UserAskConversationDiv').innerHTML=c1[2];H('UserAskConversationDiv').scrollTop=H('UserAskConversationDiv').scrollHeight;SessionUserStatusAction="Ask";bt();UserWatchAlert();}if(c1[0]==="Logout"){window.location="Home.aspx?id=ExpertPage&Mode=Login";}};function ay(){if(SessionUserStatus==="Limited"){return;}var p1=new SOAPClientParameters();p1.add("AccountId",SessionUserAccountId);p1.add("Category1",SessionUserCategory1);p1.add("Category2",SessionUserCategory2);p1.add("UserId",SessionUserUserId);p1.add("SessionId",SessionUserSessionId);p1.add("StatusCustomerAll",SessionUserStatusCustomerAll);bJ(0,I,"ServiceUserWatch",p1,true,UserWatchCallback);};function UserAskTimeoutCallback(c1){bF=false;};function aA(){if(SessionUserStatusAction==="Ask"){bD();var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);bJ(0,I,"ServiceUserAskTimeout",p1,true,UserAskTimeoutCallback);}};function UserAcceptCallback(c1){var aE=parseFloat(c1[7]);bF=false;if(c1[0]==="True"){aj();GoogleKeyword=GoogleKeyword+c1[2]+" ";UserAcceptConversationSet(c1[2],aE,1);if(c1[3]==="Auto"){H('ExpertMainPage_UserAcceptCommentAspxmemo').value=c1[5];}if(c1[6]!==null){H('UserAcceptScoreDiv').innerHTML=c1[6];}SessionStatusTurn="User";SessionUserStatusAction="Accept";bt();m(SessionStatusTurn);}else{bD();}if(!bc){Timer();}};function UserAskAcceptAspxbutton_Onclick(){if(SessionUserStatusAction==="Ask"){if(!bK()){return;}bM();SessionUserStatusAction="";var p1=new SOAPClientParameters();p1.add("AccountId",SessionUserAccountId);p1.add("UserId",SessionUserUserId);p1.add("SessionId",SessionUserSessionId);p1.add("ConversationId",SessionConversationId);bJ(1,I,"ServiceUserAccept",p1,true,UserAcceptCallback);}};function UserAskRejectCallback(c1){bF=false;};function UserAskRejectAspxbutton_Onclick(){bD();var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);bJ(1,I,"ServiceUserReject",p1,true,UserAskRejectCallback);};function PayPaypalButton_Onclick(){H('HomePage_PayPaypalButton').disabled=true;};function UserEnterNormalCallback(c1){bF=false;UserLastupdateDate=parseFloat(c1[3]);SessionStatusTurn="Customer";if(!bc){Timer();}};function UserEnterValid(){if(MiscDdlGet(H('ExpertMainPage_UserAcceptExpirationTypeAspxdropdownlist'))==="Specified Date"){var d0=H('ExpertMainPage_UserAcceptExpirationDateAspxtextbox').value;if(d0===""){alert("You must enter an expiration date.");return false;}if(!MiscDateValidate(d0)){alert("Expiration Date is invalid. The format must be mm/dd/yyyy.");return false;}}if(H('ExpertMainPage_UserAcceptCommentAspxmemo').value===""){alert("You must enter a question or comment.");return false;}return true;};function UserEnterNormal(Mode){if(UserEnterValid()){var aI=bE();if(Mode===1){aI=aY(aI);}var aF=D(H('ExpertMainPage_UserAcceptCommentAspxmemo').value);var aH=v(aI,aF);SessionStatusTurn="Customer";m(SessionStatusTurn);GoogleKeyword=GoogleKeyword+aF+" ";UserAcceptConversationSet(aH,UserLastupdateDate,0);H('ExpertMainPage_UserAcceptCommentAspxmemo').value="";H('UserAcceptScoreDiv').innerHTML="";K(aF,"");var p1=new SOAPClientParameters();p1.add("AccountId",SessionUserAccountId);p1.add("Category1",SessionUserCategory1);p1.add("Category2",SessionUserCategory2);p1.add("UserId",SessionUserUserId);p1.add("SessionId",SessionUserSessionId);p1.add("ConversationId",SessionConversationId);p1.add("CommentText",aF);p1.add("ConversationTextPre",aI);p1.add("DnleKnowledgebase",H('ExpertMainPage_UserAcceptKnowledgebaseCheckBox').checked);p1.add("DnleExpirationType",MiscDdlGet(H('ExpertMainPage_UserAcceptExpirationTypeAspxdropdownlist')));p1.add("DnleExpirationDate",H('ExpertMainPage_UserAcceptExpirationDateAspxtextbox').value);p1.add("Action",MiscDdlGet(H('ExpertMainPage_UserAcceptActionAspxdropdownlist')));p1.add("DnleUserId",SessionUserDnleUserId);p1.add("UserIp",SessionIp);p1.add("SessionUserLevel",SessionUserLevel);bJ(1,I,"ServiceUserEnterNormal",p1,true,UserEnterNormalCallback);}};function UserEnterNoteCallback(c1){bF=false;};function UserEnterNote(Comment){var aF=D(Comment);UserAcceptConversationSet(A(bE(),aF),UserLastupdateDate,0);H('ExpertMainPage_UserAcceptCommentAspxmemo').value="";K(aF,"");var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);p1.add("Comment",aF);p1.add("ConversationText",bE());bJ(1,I,"ServiceUserEnterNote",p1,true,UserEnterNoteCallback);};function UserEnterPassCallback(c1){bF=false;};function UserEnterPass(){bD();var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);bJ(1,I,"ServiceUserPass",p1,true,UserEnterPassCallback);};function UserEnterEndCallback(c1){bF=false;if(!bc){Timer();}};function UserEnterEnd(c1){SessionStatusTurn="";bD();var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);bJ(1,I,"ServiceUserEnd",p1,true,UserEnterEndCallback);};function UserAcceptEnterAspxbutton_Onclick(){if(!bK()){return;}switch(MiscDdlGet(H('ExpertMainPage_UserAcceptActionAspxdropdownlist'))){case "Normal Response":UserEnterNormal(0);break;case "Start New Conversation":UserEnterNormal(1);break;case "Send Note":UserEnterNote(H('ExpertMainPage_UserAcceptCommentAspxmemo').value);break;case "Send Note-Please Wait":UserEnterNote("Please Wait");break;case "Pass Conversation To Another Expert":UserEnterPass("Please Wait");break;case "End Conversation":UserEnterEnd();break;}H('ExpertMainPage_UserAcceptActionAspxdropdownlist').selectedIndex=0;m(SessionStatusTurn);};function UserWaitCallback(c1){bF=false;if(c1===null){return;}var aE=parseFloat(c1[9]);if(c1[4]==="End"||c1[4]==="Timeout"){if(c1[3]==="Customer"){SessionStatusTurn="Customer";bD();m("Customer");}}else{if(c1[0]==="True"){UserAcceptConversationSet(c1[2],aE,0);if(c1[5]==="Auto"&&SessionStatusTurn==="Customer"&&c1[3]==="User"){H('ExpertMainPage_UserAcceptCommentAspxmemo').value=c1[7];H('UserAcceptScoreDiv').innerHTML=c1[8];}else{H('UserAcceptScoreDiv').innerHTML="";}}if(SessionStatusTurn==="Customer"&&c1[3]==="User"){self.focus();SoundPlay("MainBgsound","sounds/ChangeMetadata.wav");SessionStatusTurn=c1[3];m(SessionStatusTurn);}}};function ar(){var p1=new SOAPClientParameters();p1.add("ConversationId",SessionConversationId);p1.add("UserLastupdateDate",UserLastupdateDate);p1.add("SessionId",SessionUserSessionId);bJ(0,I,"ServiceUserWait",p1,true,UserWaitCallback);};function UserLoginStatusCallback(c1){bF=false;H('LoginStatusDiv').innerHTML=c1[0];refresh();};function UserLoginStatus_Onclick(){var p1=new SOAPClientParameters();p1.add("UserId",SessionUserUserId);bJ(0,I,"ServiceUserLoginStatus",p1,true,UserLoginStatusCallback);};function UserAcceptCommentAspxmemo_Onkeypress(evt){if(evt.which){if(evt.which===13){if(!H('UserAcceptEnterAspxbutton').disabled){UserAcceptEnterAspxbutton_Onclick();evt.preventDefault();}}}else{if(event.keyCode===13){if(!H('UserAcceptEnterAspxbutton').disabled){UserAcceptEnterAspxbutton_Onclick();event.returnValue=false;}}}};function SearchCategory1Aspxdropdownlist_DropDown(Obj2){H(Obj2).options.length=0;};function SearchCategory1Aspxdropdownlist_CloseUp(Obj1,Obj2){var j=0;var l0=false;var c0=MiscDdlGet(H(Obj1));H(Obj2).options.length=0;for(var i=0;i<SessionCustomerCategory2Items.length;i+=3){if(SessionCustomerCategory2Items[i]===c0){H(Obj2).options[j]=new Option(SessionCustomerCategory2Items[i+1],SessionCustomerCategory2Items[i+1]);j++;if(SessionCustomerCategory2Items[i+1]==="No Subcategories"){l0=true;}}}if(l0){H(Obj2).selectedValue="No Subcategories";H(Obj2).disabled=true;}else{H(Obj2).options[j]=new Option("All Subcategories","All Subcategories");H(Obj2).disabled=false;}};function af(){if(H('SearchPage_SearchQuestion').value===""){alert("You must enter a question or comment.");return false;}return true;};function SearchEnterAspxbutton_Onclick(){if(af()){H('SearchPage_SearchResultsDiv').innerHTML="Searching. Please wait.";var c2=H('SearchPage_SearchQuestion').value;if(c2.length>256){c2=c2.substring(0,256);}H('HomeForm').action="Home.aspx?Id=SearchPage&SpAccountId="+SessionCustomerAccountId+"&SpComment="+c2+"&SpPage=1&SpEnter=1";}return true;};function ServiceSearchRateCallback(c1){bF=false;};function aG(Rating,Type,Source,Score,ScorePre,DocumentId,bo,AccountId,Category1,Category2,Question,Answer,Link){var p1=new SOAPClientParameters();p1.add("Rating",Rating);p1.add("Type",Type);p1.add("Source",Source);p1.add("Score",Score);p1.add("ScorePre",ScorePre);p1.add("DocumentId",DocumentId);p1.add("Ind",bo);p1.add("AccountId",AccountId);p1.add("Category1",Category1);p1.add("Category2",Category2);p1.add("Question",Question);p1.add("Answer",Answer);p1.add("Link",Link);bJ(1,I,"ServiceSearchRate",p1,true,ServiceSearchRateCallback);};function SearchRate_Onclick(Rating,Type,Source,Score,ScorePre,DocumentId,bo,AccountId,Category1,Category2){var Body,c0,c1,Link,o0,o1,o2,o3;c0="SearchGoodButton"+bo;c1="SearchBadButton"+bo;P(c0,"Disabled",true);P(c1,"Disabled",true);o0=H('SearchPage_SearchQuestion');o1=H('SearchTitle'+bo);o2=H('SearchBody'+bo);o3=H('SearchLink'+bo);if(o2){Body=o1.innerHTML+" "+o2.innerHTML;}else{Body=o1.innerHTML;}if(o3){Link=o3.innerHTML;}else{Link="";}aG(Rating,Type,Source,Score,ScorePre,DocumentId,bo,AccountId,Category1,Category2,o0.innerHTML,Body,Link);return false;};function ArchiveEnterAspxbutton_Onclick(Mode,Keywords,CommentShowF){var c0,c1,c2,c3;H('ArchivePage_SearchResultsDiv').innerHTML="Searching. Please wait.";c0=MiscDdlGet(H('ArchivePage_SearchCategory1Aspxdropdownlist'));c1=MiscDdlGet(H('ArchivePage_SearchCategory2Aspxdropdownlist'));if(Keywords===null||Keywords===undefined){c2=H('ArchivePage_KeywordsAspxmemo').value;}else{c2=Keywords;}if(CommentShowF===1){c3="&SpCommentShow=1";}else{c3="";}if(Mode===0){H('HomeForm').action="Home.aspx?Id=ArchivePage&SpAccountId="+SessionCustomerAccountId+"&SpCategory="+c0+"&SpSubcategory="+c1+"&SpKeywords="+c2+"&SpPage=1"+c3;}else{window.location="Home.aspx?Id=ArchivePage&SpAccountId="+SessionCustomerAccountId+"&SpCategory="+c0+"&SpSubcategory="+c1+"&SpKeywords="+c2+"&SpPage=1"+c3;}return true;};function HomeCommentButton_Onclick(){window.location="Home.aspx?Id=Home&SpCommentShow=1";};function BlogEnterAspxbutton_Onclick(Keywords){var c2;H('BlogPage_SearchResultsDiv').innerHTML="Searching. Please wait.";if(Keywords===null||Keywords===undefined){c2=H('BlogPage_KeywordsAspxmemo').value;window.location="Home.aspx?Id=BlogPage&SpAccountId="+SessionCustomerAccountId+"&SpKeywords="+c2+"&SpPage=1";}else{c2=Keywords;window.location="Home.aspx?Id=BlogPage&SpAccountId="+SessionCustomerAccountId+"&SpKeywords="+c2+"&SpPage=1";}return false;};function CommentButton_Onclick(){if(SessionUserUserId===null||SessionUserUserId===""){alert("You must first log in or sign up.");return false;}if(H('ConversationPage_CommentAspxmemo').value===""){alert("You must enter a comment.");return false;}return true;};function aU(){if(SessionUserLevel<=1){alert("This function is disabled for your user level.");return false;}if(MiscDdlGet(H('ManageSearchPage_SearchCategory1Aspxdropdownlist'))===""||MiscDdlGet(H('ManageSearchPage_SearchCategory1Aspxdropdownlist'))===null){alert("You must select a category.");return false;}if(MiscDdlGet(H('ManageSearchPage_SearchCategory2Aspxdropdownlist'))===""||MiscDdlGet(H('ManageSearchPage_SearchCategory2Aspxdropdownlist'))===null){alert("You must select a subcategory.");return false;}if(H('ManageSearchPage_KeywordsAspxmemo').value===""){alert("You must enter one or more keywords.");return false;}return true;};function SearchEnterCallback(c1){bF=false;H('SearchResultsDiv').innerHTML=c1[1];};function aP(){var Function,Mode,UserId;H('SearchResultsDiv').innerHTML="Searching. Please wait.";Mode="User";UserId=SessionUserDnleUserId;Function="ServiceManageSearchEnter";var p1=new SOAPClientParameters();p1.add("Mode",Mode);p1.add("AccountId",SessionCustomerAccountId);p1.add("Category1",MiscDdlGet(H('ManageSearchPage_SearchCategory1Aspxdropdownlist')));p1.add("Category2",MiscDdlGet(H('ManageSearchPage_SearchCategory2Aspxdropdownlist')));p1.add("Keywords",H('ManageSearchPage_KeywordsAspxmemo').value);p1.add("DnleUserId",UserId);p1.add("Page",SearchPage);bJ(1,I,Function,p1,true,SearchEnterCallback);};function ManageSearchEnterAspxbutton_Onclick(){if(aU()){SearchPage=1;aP();}};function SearchPrevA_Onclick(){if(SearchPage>1){SearchPage--;aP();}};function SearchNextA_Onclick(){SearchPage++;aP();};function UserAcceptActionAspxdropdownlist_SelectedIndexChanged(){m(SessionStatusTurn);};function T(DocumentId){H('SearchResultsDiv').innerHTML=H('SearchResultsDiv').innerHTML.replace("SearchUpdate("+aK+", "+aL+")","SearchUpdate("+aK+", "+DocumentId+")");H('SearchResultsDiv').innerHTML=H('SearchResultsDiv').innerHTML.replace("SearchDelete("+aK+", "+aL+")","SearchDelete("+aK+", "+DocumentId+")");};function SearchUpdateCallback(c1){bF=false;switch(c1[1]){case "-1":alert("Unable to update the conversation.");break;case "-2":alert("Unable to update the conversation. The last comment must be from "+SessionUserParseTag.replace("<b>","").replace("</b>",""));break;case "-3":alert("Unable to update the conversation. The first comment must be from "+SessionCustomerParseTag.replace("<b>","").replace("</b>",""));break;default:alert("The conversation has been updated.");T(c1[2]);}};function SearchDeleteCallback(c1){bF=false;if(c1[1]==="-1"){alert("Unable to delete the conversation.");}else{alert("The conversation has been deleted.");}};function L(Mode,bo,DocumentId){aK=bo;aL=DocumentId;var p1=new SOAPClientParameters();p1.add("Mode",Mode);p1.add("AccountId",SessionCustomerAccountId);p1.add("Category1",MiscDdlGet(H('ManageSearchPage_SearchCategory1Aspxdropdownlist')));p1.add("Category2",MiscDdlGet(H('ManageSearchPage_SearchCategory2Aspxdropdownlist')));p1.add("DocumentId",DocumentId);p1.add("Document",H('SearchResultsTextarea'+bo.toString()).value);p1.add("DnleUserId",SessionUserDnleUserId);switch(Mode){case 0:bJ(1,I,"ServiceSearchUpdate",p1,true,SearchUpdateCallback);break;case 1:bJ(1,I,"ServiceSearchUpdate",p1,true,SearchDeleteCallback);break;}};function SearchUpdate(bo,DocumentId){L(0,bo,DocumentId);return false;};function SearchDelete(bo,DocumentId){L(1,bo,DocumentId);return false;};function SelectEnterAspxbutton_Onclick(Keywords){var c0,c1,c2;H('SelectPage_SearchResultsDiv').innerHTML="Searching. Please wait.";c0=MiscDdlGet(H('SelectPage_SearchCategory1Aspxdropdownlist'));c1=MiscDdlGet(H('SelectPage_SearchCategory2Aspxdropdownlist'));if(Keywords===null||Keywords===undefined){c2=H('SelectPage_KeywordsAspxmemo').value;H('HomeForm').action="Home.aspx?Id=SelectPage&SpAccountId="+SessionCustomerAccountId+"&SpCategory="+c0+"&SpSubcategory="+c1+"&SpKeywords="+c2+"&SpPage=1";}else{c2=Keywords;window.location="Home.aspx?Id=SelectPage&SpAccountId="+SessionCustomerAccountId+"&SpCategory="+c0+"&SpSubcategory="+c1+"&SpKeywords="+c2+"&SpPage=1";}return true;};function at(){if(SessionCustomerStatusAction==="Active"){ac();C("Timer()",aS);}else{bc=false;}if(bg<=2){bg++;if(bg===2){aB();}else{C("Timer()",aS);}}};function az(){switch(SessionUserStatusAction){case "Watch":aN++;if(aN>aZ){aN=0;refresh();}ay();C("Timer()",aR);break;case "Ask":aA();C("Timer()",aR);break;case "Accept":if(SessionStatusTurn==="Customer"){ar();C("Timer()",ba);}else{bc=false;}break;default:bc=false;break;}};function Timer(){switch(SessionMode){case "Customer":at();break;case "User":az();break;case "Designer":as();break;}};function OnLoad(){if(H('HomePageDiv')){if(SessionCustomerCategory1!==null&&SessionCustomerCategory1!==""){H('HomePage_CustomerCategory1Aspxdropdownlist').selectedValue=SessionCustomerCategory1;}else{H('HomePage_CustomerCategory1Aspxdropdownlist').options[0]=new Option("","");H('HomePage_CustomerCategory1Aspxdropdownlist').options[1]=new Option("All Categories","All Categories");H('HomePage_CustomerCategory1Aspxdropdownlist').selectedIndex=1;}H('HomePage_CustomerCategory2Aspxdropdownlist').options[0]=new Option("No Subcategories","No Subcategories");H('HomePage_CustomerCategory2Aspxdropdownlist').disabled=true;if(SessionCustomerCategory2!==null&&SessionCustomerCategory2!==""){H('HomePage_CustomerCategory2Aspxdropdownlist').selectedValue=SessionCustomerCategory2;}else{H('HomePage_CustomerCategory2Aspxdropdownlist').selectedIndex=0;}if(SessionCustomerComment!==null&&SessionCustomerComment!==""){H('HomePage_CustomerCommentAspxmemo').value=SessionCustomerComment;}if(H('HomePage_CustomerConversationDiv').innerHTML!==null&&H('HomePage_CustomerConversationDiv').innerHTML!==""){GoogleKeyword=av(aq(H('HomePage_CustomerConversationDiv').innerHTML));}else{G(1,0,1);}}if(H('ArchivePage_SearchCategory2Aspxdropdownlist')){H('ArchivePage_SearchCategory2Aspxdropdownlist').disabled=true;}if(H('SelectPage_SearchCategory2Aspxdropdownlist')){H('SelectPage_SearchCategory2Aspxdropdownlist').disabled=true;}if(SessionProPaid==="-1"){alert("Invalid coupon.");}if(H('CtDiv')){c();}Timer();}