if(!String.prototype.trim)String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};if(!String.prototype.capitalize)String.prototype.capitalize=function(){return this.charAt(0).toLocaleUpperCase()+this.substring(1)};if(!String.prototype.includes)String.prototype.includes=function(a,b){typeof b!=="number"&&(b=0);return b+a.length>this.length?!1:this.indexOf(a,b)!==-1}; String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(a,b){var c=b>0?b|0:0;return this.substring(c,c+a.length)===a}});if(!String.prototype.endsWith)String.prototype.endsWith=function(a,b){if(b===void 0||b>this.length)b=this.length;return this.substring(b-a.length,b)===a};if(!Array.isArray)Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"}; if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a,b){var c;if(this===null)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(e===0)return-1;c=+b||0;Math.abs(c)===Infinity&&(c=0);if(c>=e)return-1;for(c=Math.max(c>=0?c:e-Math.abs(c),0);c>>0;if(d===0)return-1;b=d-1;arguments.length>1&&(b=Number(arguments[1]),b!==b?b=0:b!==0&&b!==1/0&&b!==-(1/0)&&(b=(b>0||-1)*Math.floor(Math.abs(b))));for(b=b>=0?Math.min(b,d-1):d-Math.abs(b);b>=0;b--)if(b in c&&c[b]===a)return b;return-1}; if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){var c,d;if(this===null)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if(typeof a!=="function")throw new TypeError(a+" is not a function");arguments.length>1&&(c=b);for(d=0;d>>0,d=arguments.length>=2?arguments[1]:void 0,e=0;e>>0;if(typeof a!=="function")throw new TypeError(a+" is not a function");arguments.length>1&&(c=b);d=Array(g);for(e=0;e>>0,d=0,e;if(arguments.length===2)e=arguments[1];else{for(;d=c)throw new TypeError("Reduce of empty array with no initial value");e=b[d++]}for(;d>>0;if(typeof a!=="function")throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;f1;)a.setDate(a.getDate()-1);var b=new Date(a.getISOYear(),0,1),a=Math.ceil(((a-b)/864E5+b.getMonday()+1)/7);b.getMonday()>3&&--a;return a}; Date.prototype.getTimeString=function(){var a=this.getHours(),b=this.getMinutes(),b=b<10?"0"+b:b;if($WC.useAMPM){var c=a>11?translate("PM"):translate("AM");return((a<10||a>21&&a!==0?"0":"")+a>12?a-12:a===0?"12":a)+":"+b+" "+c}else return a+":"+b};Date.prototype.getMonday=function(){return(this.getDay()+6)%7};Date.prototype.getISOYear=function(){return(new Date(this.getFullYear(),this.getMonth(),this.getDate()+3-this.getMonday())).getFullYear()}; Date.prototype.toMidnight=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0)};Date.prototype.toJustBeforeMidnight=function(){this.setHours(23);this.setMinutes(59);this.setSeconds(59);this.setMilliseconds(999)};Date.prototype.toUTCMilliseconds=function(){return Date.UTC(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())}; Date.prototype.toEndOfMonth=function(){this.setDate(1);this.toJustBeforeMidnight();this.setMonth(this.getMonth()+1);this.setDate(this.getDate()-1)};Date.prototype.daysBetweenDates=function(a){var b=0,c=new Date(Math.min(this.getTime(),a.getTime())),a=new Date(Math.max(this.getTime(),a.getTime()));c.toJustBeforeMidnight();for(a.toJustBeforeMidnight();c56?(this.setHours(this.getHours()+1),this.setMinutes(0)):this.setMinutes(Math.round(this.getMinutes()/5)*5%60)};Date.prototype.numDaysInThisMonth=function(){var a=this.getFullYear(),b=this.getMonth();return[31,a%4===0&&a%100!==0||a%400===0?29:28,31,30,31,30,31,31,30,31,30,31][b]}; Date.prototype.setDateToNthWeekDayFromThisDate=function(a){var b=0;if(a<0)return this.toString();a===0&&(b=this.getDay()===0?1:this.getDay()===6?2:0,this.setDate(this.getDate()+b));for(;a--;)b=this.getDay()<5?1:this.getDay()===5?3:2,this.setDate(this.getDate()+b);return this.toString()}; Date.prototype.setDateToNthDayOfWeek=function(a,b){var c=0,d=1;if(isNaN(a)||isNaN(b)||a<1||b<0||b>6)return this.toString();for(this.setDate(1);cthis.numDaysInThisMonth()){if(this.getDay()===b)break;for(;this.getDay()!==b;)this.setDate(this.getDate()-1);break}this.setDate(d++);this.getDay()===b&&c++}return this.toString()}; Date.prototype.setDateToNthWeekendDayOfMonth=function(a){var b=0,c=1;if(isNaN(a)||a<1)return this.toString();for(this.setDate(1);bthis.numDaysInThisMonth()){if(this.getDay()===0||this.getDay()===6)break;this.setDate(this.getDate()-this.getDay());break}this.setDate(c++);this.getDay()!==0&&this.getDay()!==6||b++}return this.toString()}; Date.prototype.setDateToNthWeekDayOfMonth=function(a){var b=0,c=1;if(isNaN(a)||a<1)return this.toString();for(this.setDate(1);bthis.numDaysInThisMonth()){if(this.getDay()!==0&&this.getDay()!==6)break;this.setDate(this.getDate()-(this.getDay()===0?2:1));break}this.setDate(c++);this.getDay()===0||this.getDay()===6||b++}return this.toString()}; Date.prototype.toDateTimeLocalString=function(){var a="Y-M-DTh:m:s.ms".replace("Y",this.getFullYear()),b=(this.getMonth()+1<10?"0":"")+(this.getMonth()+1),c=(this.getDate()<10?"0":"")+this.getDate(),d=(this.getHours()<10?"0":"")+this.getHours(),e=(this.getMinutes()<10?"0":"")+this.getMinutes(),f=(this.getSeconds()<10?"0":"")+this.getSeconds(),g=(this.getMilliseconds()<100?"0":"")+(this.getMilliseconds()<10?"0":"")+this.getMilliseconds();return a.replace("M",b).replace("D",c).replace("h",d).replace("ms", g).replace("m",e).replace("s",f)};if(typeof jQuery!=="undefined")jQuery.cachedScript=function(a,b){b=$.extend(b||{},{dataType:"script",cache:!0,url:a});return $.ajax(b)};String.prototype.getPhoneNumberHref=function(){var a=this.toLowerCase();return"tel:"+(a.indexOf("+")===-1?"+":"")+a.replace(/\s/g,"").replace(/-/g,"").replace(/\./g,"").replace(/,/,"").replace("ext","p").replace("x","p")};function hasTouchSupport(){return navigator.msMaxTouchPoints>0}function isTabletDevice(){var a=document.createElement("div");a.setAttribute("ongesturestart","return;");return typeof a.ongesturestart==="function"?!0:!1}if(typeof window.$WC!=="object")window.$WC={};var VF_SINGLE=0,VF_DOUBLE=1,VF_RIGHT=2,agt=navigator.userAgent.toLowerCase();window.parseInt=parseInt||window.parent.parseInt; var is_major=window.parseInt(navigator.appVersion,10),is_minor=parseFloat(navigator.appVersion,10),is_opera=agt.indexOf("opera")!==-1,is_chrome=agt.indexOf("chrome")!==-1,is_gecko=agt.indexOf("gecko")!==-1&&!is_chrome,is_safari=agt.indexOf("safari")!==-1,is_nav=agt.indexOf("mozilla")!==-1&&agt.indexOf("spoofer")===-1&&agt.indexOf("compatible")===-1&&agt.indexOf("opera")===-1&&agt.indexOf("webtv")===-1&&agt.indexOf("hotjava")===-1,is_nav2=is_nav&&is_major===2,is_nav3=is_nav&&is_major===3,is_nav4=is_nav&& is_major===4,is_nav4up=is_nav&&is_major>=4,is_navonly=is_nav&&(agt.indexOf(";nav")!==-1||agt.indexOf("; nav")!==-1),is_nav6=is_nav&&is_major===5,is_nav6up=is_nav&&is_major>=5;is_ff30Plus=agt.split("/")[2].indexOf("firefox")!==-1&&parseInt(agt.split("/")[3])>=30; var is_ie=agt.indexOf("msie")!==-1&&!is_opera&&!is_nav,isIE=is_ie,ie=is_ie,is_ie3=is_ie&&is_major<4,is_ie4=is_ie&&is_major===4&&agt.indexOf("msie 5.0")===-1&&agt.indexOf("msie 5.5")===-1&&agt.indexOf("msie 6.0")===-1&&agt.indexOf("msie 6.5")===-1,is_ie4up=is_ie&&is_major>=4,is_ie5=is_ie&&is_major===4&&agt.indexOf("msie 5.0")!==-1,is_ie5up=is_ie&&is_major>=5,is_ie55=is_ie&&is_major===4&&agt.indexOf("msie 5.5")!==-1,is_ie55up=is_ie&&!is_ie3&&!is_ie4&&!is_ie5,is_ie6=is_ie&&is_major===4&&agt.indexOf("msie 6.0")!== -1,is_ie7=is_ie&&is_major===4&&agt.indexOf("msie 7.0")!==-1,is_ie7up=is_ie&&is_major>=7,is_ie8=is_ie&&is_major===4&&agt.indexOf("msie 8.0")!==-1||is_ie7&&agt.indexOf("trident")!==-1,is_ie8up=is_ie&&is_major>=8,is_ie9=is_ie&&agt.indexOf("msie 9.0")!==-1,is_ie9up=!1,is_ie10=is_ie&&agt.indexOf("msie 10.0")!==-1,is_ie11=agt.indexOf("rv:11")!==-1&&!is_opera,is_edge=/x64|x32/ig.test(agt),is_ie=is_ie||is_ie11;if(is_ie7||is_ie8)is_ie7up=is_ie55up=!0;if(is_ie8||is_ie9||is_ie10||is_ie11||is_edge)is_ie8up=!0; if(is_ie9||is_ie10||is_ie11||is_edge)is_ie9up=!0;is_standard=is_gecko||is_ie8; var is_mac=agt.indexOf("mac")!==-1,agt=navigator.userAgent.toLowerCase(),moz=navigator.product==="Gecko"&&!/Safari/.test(navigator.userAgent),isOpera=agt.indexOf("opera")!==-1,isSafari=/Safari/.test(navigator.userAgent),isWin=navigator.appVersion.toLowerCase().indexOf("win")!==-1,isMac=/Mac/.test(navigator.userAgent),is_iPhone=/iPhone/.test(navigator.userAgent),is_ipad=/ipad/.test(agt),is_playbook=/playbook/.test(agt),is_tablet=is_ipad||is_playbook||isTabletDevice(); g_ENDLESS_PAGE_HEIGHT=(g_IS_TOUCH_ENABLED=is_tablet||hasTouchSupport())?2E3:1E3;window.ONE_YEAR_AGO=(new Date).getTime()-31536E6; try{if(!is_opera){Event.prototype.__defineGetter__("srcElement",function(){if(typeof window.event!=="undefined"){var a=window.event.target;if(a.nodeType)for(;a.nodeType!==1;)a=a.parentNode;return a}});Event.prototype.__defineGetter__("offsetX",function(){return typeof window.event==="undefined"?void 0:window.event.layerX});Event.prototype.__defineGetter__("offsetY",function(){return typeof window.event==="undefined"?void 0:window.event.layerY});for(var eventLoop=function(a){if(typeof window.event!== "undefined")window.event=a},events=["mousemove","contextmenu"],i=2;i--;)document.addEventListener(events[i],eventLoop,!0)}}catch(exception){}var CLASS=is_ie?"className":"class";function getEl(a){return document.getElementById(a)}function encodeHTML(a){return a.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""")}function decodeHTML(a){return a.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/ /gi," ").replace(/&/gi,"&")} function unencodeJSON(a){return decodeHTML(a)}function jsEncodeBreaks(a){return a.replace(//gmi,"\r")}function stripHTML(a){return a.replace(/<[^>]*>/gm,"")}function stripStyles(a){return a.replace(/([\s\S]*)<\/style>/igm,"")}function preventXSS(a){return stripHTML(decodeHTML(jsEncodeBreaks(a)))} function stripScripts(a){for(var b=RegExp(/<\s*script\s*[^<]*(?:(?!<\s*\/script\s*>)<[^<]*)*<\s*\/script\s*>/igm),c=RegExp(/onmouseover=|onclick=|onmouseout=|onblur=|onerror=|onfocus=|onload=|onresize=|onscroll=|onunload=/igm);b.test(a)||c.test(a);)a=a.replace(b,"").replace(c,"");return a}function StatusMsg(a){a&&(a=decodeHTML(a));try{a?top.showStatusMessage(sStatusMesg):getEl("StatusMesg")&&getEl("StatusMesg").innerHTML.length>0&&top.showStatusMessage(getEl("StatusMesg").innerHTML)}catch(b){}} function Mesg(a){StatusMsg();a.length>0&&(typeof newAlert==="function"?newAlert(a):alert(a))}function Post(a,b,c){document.forms[c?c:0].action+="&"+(a?a:"No")+"="+(b?b:"Yes");if(typeof Validate==="undefined"||Validate())document.forms[c?c:0].submit()}function Get(a,b,c){document.location=document.forms[c?c:0].action+"&"+a+"="+(b?b:"Yes")} function SetOption(a,b){if(typeof a==="string"){typeof b==="number"&&(b=b.toString());for(var b=b?b.toString():"",c=document.forms.length,d=0,e,f=null,g=null;c--;){g=document.forms[c];for(d=e=g.length;d--;)if(g.elements[d].name===a){f=g.elements[d];break}if(f!==null)break}if(f!==null)switch(f.type){case "checkbox":f.checked=f.value===b;break;case "radio":for(d=e;d--;)if(g.elements[d].name===a&&g.elements[d].value===b)g.elements[d].checked=!0;break;case "select-one":for(d=f.length;d--;)if(f.options[d].value.toLowerCase()=== b.toLowerCase())f.selectedIndex=d;break;case "select-multiple":for(d=f.length;d--;)if(f.options[d].value.toLowerCase()===b.toLowerCase())f.options[d].selected=!0;break;case "text":f.value=b;break;case "hidden":f.value=b}}}function EnableFormFields(a,b){for(var c=b.length,d;c--;){if(!b[c])break;d=b[c];if(d.tagName!=="FIELDSET"){if(d.tagName!=="TEXTAREA"&&d.type!=="text")d.disabled=a?!1:!0;d.readOnly=a?!1:!0}}} function SetCookie(a,b,c,d,e){c||(c=365);c=new Date((new Date).getTime()+c*864E5);if(document.cookie.indexOf(a+"=")!==-1){for(var f=document.cookie.split(";"),g=0,h=f.length;g0?Math.floor(a/3):0}();k=function(){var a=screen.availWidth+window.screenX*2-c,a=Math.floor(a/2);return a>window.screenX?a:0}();b=b.replace(/=/g,"").replace(/&/g,"").replace(/\s+/g,"");e=e?e.toLowerCase():"";a=window.open(a,b+(e==="compose"?top.composeWindowCount++:""),"directories=no,location=no,menubar=no,status=no,scrollbars="+ (e==="yes"||e==="compose"?"yes":"no")+",resizable="+(e==="yes"||e==="compose"?"yes":"no")+",titlebars=no,toolbar=no,width="+f+",height="+g+",left="+k+",top="+h);try{a.focus();if(!a.opener)a.opener=window;if(!is_ie)return a}catch(j){console.log("window.open did not return a window object: "+(j.description?j.description:j))}} function openModalWin(a,b,c,d,e,f,g){e||(e="no");f||(f="no");d||(d="yes");var h=function(){var a=screen.availHeight-c;return a>0?Math.floor(a/3):0}(),k=function(){var a=screen.availWidth+window.screenX*2-b,a=Math.floor(a/2);return a>window.screenX?a:0}();if(is_ie){if(!g)g=window.self;d="dialogHeight:"+c+"px;dialogWidth:"+b+"px;edge:Raised;center:Yes;help:No;resizable:"+d+";status:"+e+";scroll:"+f+";dialogLeft:"+k+"dialogTop:"+h+";";a.substring(a.indexOf("=")+1,a.indexOf("&"));a=a.substring(0,a.indexOf("View="))+ "View=ModalFrame&file="+a.substring(a.indexOf("View=")+5);return window.showModalDialog(a,g,d)}else g="modal,width="+(b?b:screen.availWidth*0.75)+",height="+(c?c-30:screen.availHeight*0.75)+",status="+e+",resizable="+d+",scrollbars="+f+",menubar=no,toolbar=no,left="+k+",top="+h,window.open(a,Math.random(),g)}function openHelp(){if(!opener)return top.openHelp(),!1} function replaceURLVar(a,b,c){if(!a)return"";if(!b)return"";var d="";b.charAt(b.length)!=="="&&(b+="=");start=a.indexOf(b);start!==0&&(start=a.indexOf("&"+b));start===-1?(d=a,c!==null&&(d+=a.indexOf("?")===-1&&a.indexOf("&")===-1?"?":"&",d+=b,d+=encodeURIComponent(c))):(c!==null&&(a.charAt(start)==="&"&&start++,start+=b.length),d=a.substring(0,start),d+=encodeURIComponent(c),b=a.indexOf("&",start),b!==-1&&(d+=a.substring(b,a.length)));return d} function findURLVar(a,b){var c,d;c="";b.charAt(b.length)!=="="&&(b+="=");c=a.indexOf(b);c!==0&&(c=a.indexOf("&"+b),c===-1&&(c=a.indexOf("?"+b)));return c!==-1?((a.charAt(c)==="&"||a.charAt(c)==="?")&&c++,c+=b.length,d=a.indexOf("&",c),c=unescape(d===-1?a.substring(c):a.substring(c,d)),c.indexOf("#")!==-1&&(c=c.substring(0,c.indexOf("#"))),c):""} function removeURLVar(a,b){var c=a.indexOf("?");if(c===-1)return a;for(var d=a.substr(0,c+1),c=a.substr(c+1).split("&"),e=0;e0?jQuery.post(a,b,c?c:afterPost,d?"xml":"text"):jQuery.get(a,"",c?c:afterPost,d?"xml":"text")}function ieremoveChildren(a){for(var b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])}function removeChildren(a){if(a)is_ie?ieremoveChildren(a):a.innerHTML=""} function validateIntKey(a){if(!a)a=window.event;return a.keyCode===8||a.keyCode===9||a.keyCode===46||a.keyCode>=48&&a.keyCode<=57||a.keyCode>=96&&a.keyCode<=105?(typeof setIsDirty!=="undefined"&&setIsDirty(),!0):!1}function getTopOffset(a){for(var b=a.offsetTop;a.offsetParent!==null;)b+=a.offsetParent.offsetTop,a=a.offsetParent;return b}function getLeftOffset(a){for(var b=a.offsetLeft;a.offsetParent!==null;)b+=a.offsetParent.offsetLeft,a=a.offsetParent;return b} try{var liObj=document.createElement("li"),ulObj=document.createElement("ul"),aObj=document.createElement("a"),divObj=document.createElement("div"),spanObj=document.createElement("span"),imgObj=document.createElement("img"),inputObj=document.createElement("input"),labelObj=document.createElement("label"),tableObj=document.createElement("table"),theadObj=document.createElement("thead"),tfootObj=document.createElement("tfoot"),tbodyObj=document.createElement("tbody"),trObj=document.createElement("tr"), thObj=document.createElement("th"),tdObj=document.createElement("td"),iconObj=document.createElement("i")}catch(ex$$3){}function clone(a){return a.cloneNode(1)}var bodyWidth,bodyHeight,g_scrollBarWidth=20,bScrollBarTested=0; function detectScrollBarDimensions(){if(!(bScrollBarTested++>50)){try{var a=$('');$("body").append(a);g_scrollBarWidth=a[0].offsetWidth-a[0].clientWidth;$(a).remove()}catch(b){g_scrollBarWidth=20}g_scrollBarWidth>20&&(g_scrollBarWidth=20)}} function getPageDimensions(){if(self.innerHeight)bodyWidth=self.innerWidth,bodyHeight=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)bodyWidth=document.documentElement.clientWidth,bodyHeight=document.documentElement.clientHeight;else if(document.body)bodyWidth=document.body.clientWidth,bodyHeight=document.body.clientHeight;detectScrollBarDimensions()} var dotsHandler=function(){var a=null,b=function(){clearInterval(a);a=null};return{start:function(c,d){b();if(d.indexOf("...")!==d.length-3)c.html(d);else{var e=d.replace("...","   "),f=0;a=setInterval(function(){f++;f>3&&(f=0);for(var a=e,b=f;b--;)a=a.replace(" ",".");c.empty().html(a)},500);c.html(e)}},clear:b}},statusIndicator=function(){function a(a){$("#statusIndicator").length>0?$("#statusIndicator").replaceWith(d):$("#container").append(d);b.start($("#statusIndicator span"), a)}var b=dotsHandler(),c=null,d='
';return{init:function(b,d){d?c=setTimeout(function(){a(b)},d):(a(b),intialized=!0)},hide:function(){c&&(clearTimeout(c),c=null);b&&b.clear();$("#statusIndicator").remove()}}}(); function disableSelection(a){a.onselectstart=function(a){if(!a)a=window.event;var c=a.srcElement?a.srcElement.tagName:a.target.tagName;return c==="INPUT"||c==="TEXTAREA"||$(a.target).hasClass("selectable")?!0:!1};$(a).addClass("noSelection");a.unselectable="on";a.style.MozUserSelect="none";a.style.webkitUserSelect="none";a.style.cursor="default"} function enableSelect(a){a.onselectstart=function(){var a=window.event.srcElement.tagName;return a==="INPUT"||a==="TEXTAREA"?!0:!1};a.unselectable="off";a.style.MozUserSelect="normal";a.style.cursor=""}function opacity(a,b,c,d){var d=Math.round(d/100),e=0,f=0;if(b>c)for(f=b;f>=c;f--)setTimeout("changeOpacity("+f+",'"+a+"')",e*d),e++;else if(b0;){for(var c=!1,d=0;d0&&b.push(c)}return b} function getNameAndEmailFieldsFromEmail(a){var b={name:"",email:""},a=a.trim(),a=a.replace('','"').replace("",'"'),c=a.lastIndexOf("<"),d=a.lastIndexOf(">");c===-1||d0?a[c]=a[c].replace(getNameAndEmailFieldsFromEmail(a[c]).name,'"'+getNameAndEmailFieldsFromEmail(a[c]).name+'"'):a[c].indexOf("(")!==-1&&(a[c]=a[c].replace("(",'"').replace(")",'"')),a[c].indexOf("<")===-1&&(b=a[c].match(/(\S+@\S+.\w+)/g),a[c]=a[c].replace(b,"<"+b+">"))),a[c].indexOf("'")!==-1&&(a[c]=a[c].replace(/'/g,"")),a[c].indexOf("<")=== 0&&(b=a[c].match(/(<\S+@\S+.\w+>)/g),a[c]=a[c].substring(a[c].indexOf(">")+1)+" "+b);return a}function createEmailContextTriggers(a){a=formatEmailAddresses(a);sHTML="";for(var b=0,c=a.length;b'+encodeHTML(a[b++])+""+(b');$("#popupMenu2").append(a);$("#popupMenu2").css("right",g_statusMessageRight+($("#jsxc_roster").length> 0?$("#jsxc_roster").width():0));$("#popupMenu2").css("display","block");$("#popupMenu2").attr("title",d?d:"");typeof c==="number"&&(statusTimeout=setTimeout(function(){hideStatusMessage()},c))} function addContact(a,b,c){var d=getNameAndEmailFieldsFromEmail(b),b=wcLink+"&View=ContactEdit&Create=1&ReturnJSON=1&Save=Yes&FolderID=",d="&guid=&mail="+encodeURIComponent(d.email)+"&cn="+encodeURIComponent(d.name),e={blacklist:g_BLACKLIST_FOLDERID,whitelist:g_WHITELIST_FOLDERID,"default":g_DEFAULT_CONTACTS_FOLDER},f={blacklist:translate("Address added to Blocked Senders folder"),whitelist:translate("Address added to Allowed Senders folder"),"default":translate("Address added to default contacts folder")}; $.ajax({url:b+e[a],data:d,type:"post",dataType:"json",scriptCharset:"utf-8"}).fail(function(c,b,d){writeToDebugLog(b+": "+a+" error: "+d)}).done(function(b){b&&b.error?showStatusMessage(g_STATUS_URGENT,b.error,3E3):(showStatusMessage(g_STATUS_SAVE,b&&b.message?b.message:f[a],3E3),c&&b&&b.guid&&c(b))})}function addToBlacklist(a){addContact("blacklist",a)}function addToWhitelist(a){addContact("whitelist",a)} function openContactByGUID(a){openStackedModal(wcLink+"&View=ContactEdit&External=1&CanEdit=1&Contact="+a+"&GUID="+a+"&FolderID="+g_DEFAULT_CONTACTS_FOLDER,{height:600,width:600})}if(typeof window.console==="undefined")window.console={log:function(){}};if(typeof window.testLog==="undefined")window.testLog=function(a){console.log(a)};var g_Browser_Prefix="";is_ie?g_Browser_Prefix="Ms":moz?g_Browser_Prefix="Moz":is_safari?g_Browser_Prefix="Webkit":is_opera&&(g_Browser_Prefix="O"); function browserSupports(a){if(this[a])return this[a];var b=document.createElement("div"),c=g_Browser_Prefix+a.substr(0,1).toUpperCase()+a.substr(1);this[a]=a in b.style||c in b.style;return this[a]}var bUseTransforms=browserSupports("transform"); function getCheckedRadioButtonValue(a,b){var c;if(!a)return console.log("You silly goose. You forgot to pass the name of the radio button"),"";c=b?document[b][a]:document.forms[0][a];for(var d=0,e=c.length;d