var MyGlobal=new function(){function r(n){if(JShareable.hideLoading(),n.success){var t=JShareable.getUrl();t.contains("logout")&&(t="../?");JShareable.gotoUrl(t)}else n.activationRequired?JShareable.gotoUrl("../main/page.aspx?sid=55&skey=user_activation&user_id="+n.user.id+"&email="+n.user.email):(setHTML("divLoginStatus","
Invalid Login<\/center><\/small><\/font>"),JShareable.showElementById("divLoginStatus"))}var t="Mike_CMS_Site_Id",i="MikeMailingCompanyId",n;this.startLiveChat=function(){openNewWin("../main/page.aspx?sid=22&skey=chat_question&compact=true","live_chat",550,400)};this.processDYKForum=function(n,t,i){this.processWSRequest("+hH6OR/rhih3Eqk80FnPMw==",n,t,i)};this.processSE123=function(n,t,i){this.processWSRequest("aj0UJQNbO4YQPV1+K9RndA==",n,t,i)};this.processWSRequest=function(n,t,i,r){var u={};u.serviceName=n;u.methodName=t;u.args=i;MyWebService.processWSRequest(u,processWSRequestResult,failedCallback,r)};this.processMyService=function(n,t,i){MyGlobal.processWSRequest("oCxis/DGHPLIsXqeLaVSOg==",n,t,i)};this.processMe=function(n,t,i){this.processMyService(n,t,i)};this.processLiveChat=function(n,t,i,r){r||(r=failedCallback);var u={};u.serviceName="LiveChatService";u.methodName=n;u.args=t;MyWebService.processRequest(u,this.processLiveChatResult,r,i)};this.processLiveChatResult=function(n,t){var i=n.statusCode;i==200?t(n):serverOffline()};this.processRequest=function(n,t,i,r,u){u||(u=failedCallback);var f={};f.serviceName=n;f.methodName=t;f.args=i;MyWebService.processRequest(f,this.processRequestResult,u,r)};this.processRequestResult=function(n,t){var u=n.statusCode,i=null,r;u==200?n.resultType=="RAW"?(r=JSON.parse(n.result),i=r.result):i=n.result:alert(n.errorMessage);t(i)};this.processForum=function(n,t,i){processService("ForumService",n,t,i)};this.processSoftwareService=function(n,t,i){processService("SoftwareService",n,t,i)};this.processMailing=function(n,t,i){processService("MailingService",n,t,i)};this.processMikeService=function(n,t,i){processService("MikeService",n,t,i)};this.processCMSService=function(n,t,i){processService("CMSService",n,t,i)};this.getProUrl=function(n){var t=[];t.push(n);processService("MikeService","getProUrlByProductId",t,getProUrlResult)};this.getCurrentUser=function(n){processService("MikeService","getCurrentUser",null,n)};this.setLoading=function(n){var t=document.getElementById(n);t&&(t.innerHTML="Loading... Please wait...<\/b>")};this.sendEmail=function(n,t,i,r,u,f){var e=[];e.push(n);e.push(t);e.push(i);e.push(r);e.push(u);e.push(f);this.processMikeService("sendEmail",e,sendEmailResult)};this.autoFillObject=function(n){var i,t;for(i in n){t=i;t.startsWith("m_")&&(t=t.replace("m_",""));t=JShareable.ucfirst(t);var r="txt"+t,u="chk"+t,f="lbl"+t;document.getElementById(r)!=null?n[i]=JShareable.getTextByElementId(r):document.getElementById(u)!=null&&(n[i]=JShareable.isChecked(u))}};this.autoFillPage=function(n){var i,t;for(i in n){t=i;t.startsWith("m_")&&(t=t.replace("m_",""));t=JShareable.ucfirst(t);var r="txt"+t,u="chk"+t,f="lbl"+t;document.getElementById(r)!=null?JShareable.setTextBox(r,n[i]):document.getElementById(u)!=null?JShareable.setCheckBox(u,n[i]):document.getElementById(f)!=null&&JShareable.setHTML(f,n[i])}};this.setCMSSiteId=function(n){n>0?JShareable.setCookie(t,n):JShareable.deleteCookie(t)};this.getCMSSiteId=function(){return JShareable.getCookie(t)};this.setMailingCompanyId=function(n){JShareable.setCookie(i,n)};this.getMailingCompanyId=function(){return JShareable.getCookie(i)};this.closeAndReload=function(){window.opener.location.reload();self.close()};this.reloadPage=function(){window.location.reload()};this.buttonOnOff=function(n,t,i){var r=document.getElementById(n);r.disabled=!t;i&&(r.value=i)};this.showMessageBox=function(n,t){JS.msgbox(n,t,400,300)};this.showConfirm=function(n,t,i,r){t||(t="Are you sure you want to delete?");i||(i=400);r||(r=150);JS.msgbox("Confirmation",t,i,r,["Yes","No"],n,!0,!0)};this.msgboxFull=function(n,t){var r=["height="+screen.height,"width="+screen.width,].join(","),i=window.open(n,t,r);i.moveTo(0,0);i.focus()};this.msgbox500=function(n,t){this.msgbox(550,500,n,t)};this.msgbox=function(n,t,i,r){r||(r="_blank");var u=(screen.width-n)/2,f=(screen.height-t)/2,e=window.open(i,r,"top="+f+",left="+u+",height="+t+",width="+n+",toolbar=no,directories=no,status=no,linemenubar=no,scrollbars=yes,resizable=yes,modal=no");e.focus()};this.getDateTimeNow=function(){var n=new Date;return n.format("dd/mm/yyyy hh:MM TT")};this.playMp3=function(n){var t=document.createElement("audio");t.setAttribute("src",n);t.load();t.addEventListener("canplay",function(){t.play()})};this.logout=function(){JS.gotoUrl("../main/logout.aspx")};n="";this.processLogout=function(t){n=t;n||(n="../default.aspx");MyGlobal.processRequest("7hv58YLNBRBkAQkY32XBnw==","MkMnsuG35y77329x0j49TA==",null,this.processLogoutResult)};this.processLogoutResult=function(){JS.gotoUrl(n)};this.processUserLoginDefault=function(){var i=blank("txtLoginUsername","Username is required."),n,t;isEmpty(i)||(n=blank("txtLoginPassword","Password is required."),isEmpty(n))||(t=!1,document.getElementById("chkSaveLogin")!=null&&document.getElementById("chkSaveLogin").checked&&(t=!0),JShareable.showLoading(),this.processUserLogin(i,n,t,r))};this.processUserLogin=function(n,t,i,r){MyGlobal.processRequest("+6q8oV5ZMZUB84ZV/LtPhA==","WN2I17bUhVM=",[n,t,i],r)};this.submitUserLogin=function(){var n=[],r=blank("txtLoginUsername","Username is required."),t,i;isEmpty(r)||(t=blank("txtLoginPassword","Password is required."),isEmpty(t))||(i=!1,document.getElementById("chkSaveLogin").checked&&(i=!0),n.push(r),n.push(t),n.push(i),pleaseWait("btnLoginSubmit","Processing..."),processService("MikeService","userLogin",n,this.submitUserLoginResult))};this.submitUserLoginResult=function(n){var u=n.status,t,i,r;u=="ok"?(t=n.item,t==""?(i=getUrl(),instr(i,"logout")&&(i="../?"),gotoUrl(i)):t.contains("approved")?(r=t.split("|"),gotoUrl("../main/page.aspx?sid=55&skey=user_activation&user_id="+r[1]+"&email="+r[2])):(setHTML("divLoginStatus","
"+t+"<\/center><\/small><\/font>"),JShareable.showElementById("divLoginStatus"))):alert(n.message);enableButton("btnLoginSubmit","Submit")};this.showAskAQuestion=function(){MsgBox.showUrl("Question","../main/page.aspx?skey=ask_a_question&sid=22&compact=true")};this.showSignInForm=function(){MsgBox.showUrl("Sign In","../main/page.aspx?skey=form_login&sid=22&compact=true")};this.showDialog=function(n,t,i,r,u,f,e,o){var s;i||(i=350);r||(r=300);e==null&&(e=!0);o==null&&(o=!0);var l=$('
'+t+"<\/div>"),c="",h={};if(u)for(s=0;s