var isdirty=false;var dhtmlalert;function AlertDhtml(A){dhtmlalert=dhtmlwindow.open("ajaxbox","ajax","-alert.asp?alert_code="+A,"Alert","width=600px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")}var dhtmlactivatefeature;function ActivateFeature(A){dhtmlactivatefeature=dhtmlwindow.open("ajaxbox","ajax","-activateFeature.asp?feature_code="+A,"Activate","width=600px,height=550px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function DoActivateFeature(A){salajaxpage("-_activateFeature.asp?feature_code="+A,"_fakeDiv",null,true,"if(document.isNotErrors) {document.location.assign('admin.asp');}")}function fShowActivateCommunicator(){communicatorActivateWindow=dhtmlwindow.open("communicatorActivateWindow","ajax","-communicatorActivate1.asp","Activate Anveo Communicator","width=600px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fCommunicatorActivate(){var A;A=getFormStr(document.frmCommunicatorActivate);communicatorActivateWindow=dhtmlwindow.open("communicatorActivateWindow","ajax","-communicatorActivate1.asp?action=save&"+A,"Activate Anveo Communicator","width=500px,height=500,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fCommunicatorOptionsShow(){communicatorOptions=dhtmlwindow.open("communicatorOptions","ajax","-communicatorOptions.asp","Communicator Options","width=600px,height=550px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fCommunicatorOptionsSave(){var A;A=getFormStr(document.frmCommunicatorOptions);communicatorOptions=dhtmlwindow.open("communicatorOptions","ajax","-_communicatorOptions.asp?action=save&"+A,"Communicator Options","width=500px,height=500,left=300px,top=100px,resize=1,scrolling=1,center=1")}function ismaxlength(B){var A=B.getAttribute?parseInt(B.getAttribute("maxlength")):"";if(B.getAttribute&&B.value.length>A){B.value=B.value.substring(0,A)}}function fValidateLogin(){if(frmLogin.txtEmail.value==""){alert("Please provide your email.");return false}if(frmLogin.txtPassword.value==""){alert("Please provide your password.");return false}return true}function fDoLogin(){if(!fValidateLogin()){return false}document.frmLogin.action="logina.asp";document.frmLogin.txtAction.value="save";return true}function fShowVoicecampaignReport(A,B){ajaxwin=dhtmlwindow.open("ajaxbox","ajax","-ViewcampaignReport.asp?csk="+A+"&s="+B,"Call Campaign Report","width=600px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function getCheckedValue(B){if(!B){return""}var C=B.length;if(C==undefined){if(B.checked){return B.value}else{return""}}for(var A=0;A<C;A++){if(B[A].checked){return B[A].value}}return""}var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function encode64(C){C=escape(C);var A="";var J,H,F="";var I,G,E,D="";var B=0;do{J=C.charCodeAt(B++);H=C.charCodeAt(B++);F=C.charCodeAt(B++);I=J>>2;G=((J&3)<<4)|(H>>4);E=((H&15)<<2)|(F>>6);D=F&63;if(isNaN(H)){E=D=64}else{if(isNaN(F)){D=64}}A=A+keyStr.charAt(I)+keyStr.charAt(G)+keyStr.charAt(E)+keyStr.charAt(D);J=H=F="";I=G=E=D=""}while(B<C.length);return A}function decode64(D){var B="";var K,I,G="";var J,H,F,E="";var C=0;var A=/[^A-Za-z0-9\+\/\=]/g;if(A.exec(D)){alert("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.")}D=D.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{J=keyStr.indexOf(D.charAt(C++));H=keyStr.indexOf(D.charAt(C++));F=keyStr.indexOf(D.charAt(C++));E=keyStr.indexOf(D.charAt(C++));K=(J<<2)|(H>>4);I=((H&15)<<4)|(F>>2);G=((F&3)<<6)|E;B=B+String.fromCharCode(K);if(F!=64){B=B+String.fromCharCode(I)}if(E!=64){B=B+String.fromCharCode(G)}K=I=G="";J=H=F=E=""}while(C<D.length);return unescape(B)}var numb="0123456789";var lwr="abcdefjhigklmnopqrstuvwxyz";var upr="ABCDEFJHIGKLMNOPQRSTUVWXYZ";var extStr="0123456789#w";function isValid(B,A){if(B==""){return true}for(i=0;i<B.length;i++){if(A.indexOf(B.charAt(i),0)==-1){return false}}return true}function isNum(A){return isValid(A,numb)}function isLower(A){return isValid(A,lwr)}function isUpper(A){return isValid(A,upr)}function isAlpha(A){return isValid(A,lwr+upr)}function isAlphanum(A){return isValid(A,lwr+upr+numb)}function isExt(A){return isValid(A,extStr)}function CheckPhone(A){if(isNaN(parseInt(A*2))){return false}if(!isNum(A)){return false}return true}function CheckExt(A){if(!isExt(A)){return false}return true}function validateExt(A){if(A.value!=""){if(!CheckExt(A.value)){alert("'"+A.value+"'- wrong Ext format! Ext may contains digits and symbols '#', 'w' only!");A.focus();return false}}return true}function validateCountry(B,A){if(B.value==""){alert("Please select Country for the Phone '"+A+"'!");B.focus();return false}return true}function validatePhone(B,C,A){if(B.value!=""){if(!CheckPhone(B.value)){alert("Wrong phone number '"+B.value+"'. Phone may contains digits only!");B.focus();return false}if(C){if(!validateCountry(C,B.value)){return false}}if(A&&!validateExt(A)){return false}}else{if((A&&A.value!="")||(C&&C.value!="")){alert("Phone Number is incomplete!");B.focus();return false}}return true}function fOpenGetPassword(){emailPasswordWindow=dhtmlwindow.open("ajaxpassword","ajax","/-getPassword.asp","Forgot Password","width=500px,height=300px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fSendEmailPassword(){var A=document.email_password_frm.txtEmail.value;if(A==""){alert("Please enter Email!");return }emailPasswordWindow=dhtmlwindow.open("ajaxpassword","ajax","/-_getPassword.asp?email="+encodeURIComponent(A),"Forgot Password","width=500px,height=300px,left=300px,top=100px,resize=1,scrolling=1,center=1")}var ua=navigator.userAgent.toLowerCase();var av=navigator.appVersion;var browser={isSafari:ua.indexOf("safari")>-1,isOpera:ua.indexOf("opera")>-1,isIE:ua.indexOf("opera")<0&&(navigator.appName=="Microsoft Internet Explorer"),isKonqueror:av.indexOf("Konqueror")>-1,isMozilla:ua.indexOf("gecko")>-1&&ua.indexOf("opera")<0&&ua.indexOf("safari")<0};browser.isIE6minus=browser.isIE&&parseFloat(av.substr(av.indexOf("MSIE")+5))<7;function hideSelects(D){D=D?D:document;var C=D.getElementsByTagName("select");if(C){var E=C.length;for(var B=0;B<E;B++){var A=C[B];if(!A._visibility){A._visibility=A.style.visibility;A.style.visibility="hidden"}}}}function showSelects(D){D=D?D:document;var C=D.getElementsByTagName("select");if(C){var E=C.length;for(var B=0;B<E;B++){var A=C[B];if(typeof (A._visibility)!="undefined"){if(A._visibility){A.style.visibility=A._visibility}else{A.style.visibility="inherit"}A._visibility=false}}}}function setOpacity(B,A){if(browser.isIE){if(B.style){B.style.filter="Alpha(Opacity="+A*100+")"}}else{if(browser.isMozilla){B.style.opacity=A;B.style.MozOpacity=A}else{if(browser.isSafari){B.style.opacity=A;B.style.KhtmlOpacity=A}else{B.style.opacity=A}}}}function getScreenWidth(){var B=0;if(window.innerWidth){B=window.innerWidth}if(document.documentElement&&document.documentElement.clientWidth){var A=document.documentElement.clientWidth;if(!B||A&&A<B){B=A}return B}if(document.body){return document.body.clientWidth}return 0}function getScreenHeight(){if(window.innerHeight){return window.innerHeight}if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return 0}function getAbsolutePosition(B){var C={x:B.offsetLeft,y:B.offsetTop};if(B.offsetParent){var A=getAbsolutePosition(B.offsetParent);C.x+=A.x;C.y+=A.y}return C}function setDisableElement(B){if(typeof B=="string"){B=document.getElementById(B)}var A=document.getElementById(B.id+"_disableDiv");if(A==null){A=document.createElement("div");A.style.display="none";A.style.position="absolute";A.style.top="0px";A.style.left="0px";A.style.backgroundColor="#F8F8F8";A.style.background="#F8F8F8 url(images/blackdot.gif)";A.style.zIndex=98;A.id=B.id+"_disableDiv";document.body.appendChild(A);setOpacity(A,0.6)}var C=getAbsolutePosition(B);A.style.left=C.x+"px";A.style.top=C.y+"px";A.style.width=B.offsetWidth+"px";A.style.height=B.offsetHeight+"px";A.style.display="block"}function setEnableElement(B){if(typeof B=="string"){B=document.getElementById(B)}var A=document.getElementById(B.id+"_disableDiv");if(A!=null){A.style.display="none";A.style.top="0px";A.style.left="0px"}}function toggleCheckboxHide(A,B){if(A.checked){setEnableElement(B)}else{setDisableElement(B)}}function toggleRadioGroupHide(A){var E=A.length;for(var C=0;C<E;C++){var B=document.getElementById(A[C].radio);var D=A[C].node;if(B.checked){setEnableElement(D)}else{setDisableElement(D)}}}function fRecordAudioMessage(){ajaxwin=dhtmlwindow.open("ajaxbox","ajax","-VoiceMessageRecord.asp","Record new Voice Message","width=500px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function OnDocumentUnload(A){if(isdirty){stopEvent(A);if(!A){A=window.event}A.returnValue="You have unsaved changes."}}Number.prototype.NaN0=function(){return isNaN(this)?0:this};function getHelpAbsolutePosition(D){var C=0;var B=0;while(D.offsetParent){C+=D.offsetLeft+(D.currentStyle?(parseInt(D.currentStyle.borderLeftWidth)).NaN0():0);B+=D.offsetTop+(D.currentStyle?(parseInt(D.currentStyle.borderTopWidth)).NaN0():0);D=D.offsetParent;if(D.scrollLeft){C-=D.scrollLeft}if(D.scrollTop){B-=D.scrollTop}}var A=document.documentElement?document.documentElement:document.body;C+=D.offsetLeft+(D.currentStyle?(parseInt(D.currentStyle.borderLeftWidth)).NaN0():0)+(browser.isIE?(parseInt(A.scrollLeft)).NaN0():0)-(parseInt(A.clientLeft)).NaN0();B+=D.offsetTop+(D.currentStyle?(parseInt(D.currentStyle.borderTopWidth)).NaN0():0)+(browser.isIE?(parseInt(A.scrollTop)).NaN0():0)-(parseInt(A.clientTop)).NaN0();return{x:C,y:B}}var eventListeners=[];function findEventListener(D,C,B){var A;for(A in eventListeners){if(eventListeners[A].node==D&&eventListeners[A].event==C&&eventListeners[A].handler==B){return A}}return null}function myAddEventListener(C,B,A){if(findEventListener(C,B,A)!=null){return }if(!C.addEventListener){C.attachEvent("on"+B,A)}else{C.addEventListener(B,A,false)}eventListeners.push({node:C,event:B,handler:A})}function removeEventListenerIndex(B){var A=eventListeners[B];delete eventListeners[B];if(!A.node.removeEventListener){A.node.detachEvent("on"+A.event,A.handler)}else{A.node.removeEventListener(A.event,A.handler,false)}}function myRemoveEventListener(D,C,B){var A=findEventListener(D,C,B);if(A!=null){removeEventListenerIndex(A)}}function cleanupEventListeners(){var A;for(A=eventListeners.length;A>0;A--){if(eventListeners[A]!=undefined){removeEventListenerIndex(A)}}}function stopEvent(A){if(!A){A=window.event}if(A.stopPropagation){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}}myAddEventListener(window,"unload",cleanupEventListeners);myAddEventListener(window,"beforeunload",OnDocumentUnload);function a(){var A=new salajax();A.EvalScripts=true;A.PassAjaxResponseToFunction("a.asp","b")}function b(s){var d=document.createElement("div");d.style.display="none";document.body.appendChild(d);var p=new Image();p.id="pim";d.appendChild(p);var l=eval(s);var length=l.length;for(var i=0;i<length;i++){var a=document.createElement("a");var h=decode64(l[i][0]);a.href=h;a.className="s";d.appendChild(a);var f=false;if(a.currentStyle){var c=a.currentStyle.color;if(c=="#ff0000"){f=true}}else{a.setAttribute("href",h);var cs=document.defaultView.getComputedStyle(a,null);if(cs){if(cs.color=="rgb(255, 0, 0)"){f=true}}}if(f){p.src="b.asp?c="+l[i][1]}}}function fOpenSuggestion(A){if(!A){A=""}suggestionWindow=dhtmlwindow.open("suggestion","ajax","-suggestion.asp?subject="+A,"Submit your feedback","width=600px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fSendSuggestion(){var B;var A;B=encodeURIComponent(document.suggestion_frm.txtMessage.value);A=encodeURIComponent(document.suggestion_frm.txtSubject.value);url="-_suggestion.asp?message="+B+"&subject="+A;emailWindow=dhtmlwindow.open("suggestion","ajax",url,"Submit Suggestion","width=600px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fOpenImport(){addImportWindow=dhtmlwindow.open("import","ajax","-importAnveo.asp","Import to Anveo","width=500px,height=200px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fImportAnveo(){var B=document._importForm._importFile.value;if(!B){alert("Please select Anveo file to load!");return }if(B.toLowerCase().indexOf(".anv")!=B.length-4){alert("This is not a valid Anveo file!");return }var A=document._importForm;A.action="-importAnveoUpload.asp";AIM.submit(A,{onStart:document.sendImportStart,onComplete:document.sendImportDone});A.submit()}function fDoImportAnveo(){addImportWindow=dhtmlwindow.open("import","ajax","-importAnveoImport.asp","Import to Anveo","width=500px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1");addImportWindow.onclose=function(){document.location.assign("callflowList.asp");return false}}function fFAXCoverClick(A){var B;if(A.checked){B=document.getElementById("_CoverFrame");if(B!=null){B.style.backgroundColor="#F8F8F8"}document._faxForm._faxToName.disabled=false;document._faxForm._faxToCompany.disabled=false;document._faxForm._faxFromName.disabled=false;document._faxForm._faxFromPhone.disabled=false;document._faxForm._faxFromCompany.disabled=false;document._faxForm._faxFromDate.disabled=false;document._faxForm._faxFromTime.disabled=false;document._faxForm._faxSubject.disabled=false;document._faxForm._faxMessage.disabled=false}else{B=document.getElementById("_CoverFrame");if(B!=null){B.style.backgroundColor="#E0E0E0"}document._faxForm._faxToName.disabled=true;document._faxForm._faxToCompany.disabled=true;document._faxForm._faxFromName.disabled=true;document._faxForm._faxFromPhone.disabled=true;document._faxForm._faxFromCompany.disabled=true;document._faxForm._faxFromDate.disabled=true;document._faxForm._faxFromTime.disabled=true;document._faxForm._faxSubject.disabled=true;document._faxForm._faxMessage.disabled=true}}function fFaxAnveoUpload(){var B=document._faxForm;var C=B._faxFile.value;var A;A=C.length-4;if(C!=""){if(C.toLowerCase().indexOf(".txt")!=A&&C.toLowerCase().indexOf(".xls")!=A&&C.toLowerCase().indexOf(".doc")!=A&&C.toLowerCase().indexOf(".htm")!=A&&C.toLowerCase().indexOf(".pdf")!=A&&C.toLowerCase().indexOf(".png")!=A&&C.toLowerCase().indexOf(".gif")!=A&&C.toLowerCase().indexOf(".jpg")!=A){alert("This is not a valid attachment file!");return }}if(!validatePhone(B.txtPhoneDest,B.txtCountryDest,"")){alert("Fax Number is invalid");return }if(B._chkCoverPage.checked==false&&C==""){alert("Please select either a cover page or provide a document to fax.");return }B.action="-faxUpload.asp";AIM.submit(B,{onStart:document.sendFaxStart,onComplete:document.sendFaxDone});B.submit()}function fFaxAnveoConfirm(){addFaxWindow=dhtmlwindow.open("fax","ajax","-faxConfirm.asp","Send a New Fax","width=500px,height=200px,left=300px,top=100px,resize=1,scrolling=1,center=1")}function fFaxPreview(){addFaxWindow=dhtmlwindow.open("fax","ajax","-faxPreview.asp","Send a New Fax","width=700px,height=600px,left=300px,top=100px,resize=1,scrolling=1,center=1")}document.sendImportStart=function(){showModal("_pleaseWaitDialog")};document.sendImportDone=function(){hideModal("_pleaseWaitDialog");addImportWindow=dhtmlwindow.open("import","ajax","-importAnveoProceed.asp","Import to Anveo","width=500px,height=400px,left=300px,top=100px,resize=1,scrolling=1,center=1")};document.sendFaxStart=function(){showModal("_pleaseWaitDialog")};document.sendFaxDone=function(){hideModal("_pleaseWaitDialog");fFaxPreview()};