if(polopoly){throw ("Initialized twice")}var polopoly={};polopoly.service={};polopoly.user={init:function(){this.data=this._initCookie("cata");this.sessionData=this._initCookie("data")},_initCookie:function(c){var a=polopoly.cookie.get(c);if(!a){return}var d=polopoly.base64.stringDecode(a);if(!d){return}try{var b=polopoly.json.parse(d)}catch(f){return}return b},getServiceSettings:function(b,a){if(!this.data||!this.data[b]){return}return this.data[b][a]},setServiceSettings:function(c,a,b){if(!this.data){this.data={}}if(!this.data[c]){this.data[c]={}}this.data[c][a]=b;this._persistDataInCookie()},getSessionServiceSettings:function(b,a){if(!this.sessionData||!this.sessionData[b]){return}return this.sessionData[b][a]},setSessionServiceSettings:function(c,a,b){if(!this.sessionData){this.sessionData={}}if(!this.sessionData[c]){this.sessionData[c]={}}this.sessionData[c][a]=b;this._persistSessionDataInCookie()},_persistDataInCookie:function(){var a=polopoly.json.stringify(this.data);var b=polopoly.base64.stringEncode(a);polopoly.cookie.set("cata",b)},_persistSessionDataInCookie:function(){var a=polopoly.json.stringify(this.sessionData);var b=polopoly.base64.stringEncode(a);polopoly.cookie.setForSession("data",b)},isLoggedIn:function(){return polopoly.cookie.get("sessionKey")!=null&&polopoly.cookie.get("loginName")!=null&&polopoly.cookie.get("userId")!=null},isOnPlant:function(){return polopoly.cookie.get("OP")!=null},isOptimumUser:function(){return polopoly.cookie.get("ValidatedOptimumUserID")!=null},isNewsdaySubscriber:function(){var a=polopoly.base64.stringDecode(polopoly.cookie.get("NDAL"));return(a!=null&&((a=="Premium1")||(a=="Both")))},isSubscriber:function(){var a=polopoly.base64.stringDecode(polopoly.cookie.get("NDAL"));return(polopoly.user.isOptimumUser()||polopoly.user.isNewsdaySubscriber()||(a=="CompAccount"))},isSubscriberAll:function(){return(polopoly.user.isOptimumUser()&&polopoly.user.isNewsdaySubscriber())},isMigratedUser:function(){return polopoly.cookie.get("MigratedUser")},name:function(){return polopoly.base64.stringDecode(polopoly.cookie.get("loginName"))},displayName:function(){return polopoly.base64.stringDecode(polopoly.cookie.get("displayName"))},popMessageCookie:function(a){var f=polopoly.cookie.get(a);var b=polopoly.base64.stringDecode(f);if(b.length){var c;try{c=polopoly.json.parse(b)}catch(d){}return c}},refreshUserData:function(b,a){jQuery.ajax({cache:false,error:b,success:a,timeout:3000,type:"GET",url:"/membership/refresh"})}};polopoly.cookie={clear:function(a){document.cookie=a+"= ; expires=01 Jan 1970 00:00:00 UTC; path=/"},set:function(a,b){document.cookie=a+"="+b+"; expires=01 Jan 2038 00:00:00 UTC; path=/"},setForSession:function(a,b){document.cookie=a+"="+b+"; expires=-1; path=/"},get:function(a){return polopoly.util.stringAsHashValue(a,document.cookie,";")}};polopoly.comments={get:function(b,d,a,c){jQuery.get(b,{comments:d,ajax:"true",ot:"example.AjaxPageLayout.ot"},function(e){$(a).html(e);if(c){c(a)}},"html")}};polopoly.json={_cx:/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_escapable:/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_gap:null,_indent:null,_meta:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},_rep:null,_f:function(a){return a<10?"0"+a:a},init:function(){if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(a){return this.getUTCFullYear()+"-"+this._f(this.getUTCMonth()+1)+"-"+this._f(this.getUTCDate())+"T"+this._f(this.getUTCHours())+":"+this._f(this.getUTCMinutes())+":"+this._f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()}}},_quote:function(a){this._escapable.lastIndex=0;return this._escapable.test(a)?'"'+a.replace(this._escapable,function(b){var d=this._meta[b];return typeof d==="string"?d:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'},_str:function(h,e){var c,b,j,a,f=this._gap,d,g=e[h];if(g&&typeof g==="object"&&typeof g.toJSON==="function"){g=g.toJSON(h)}if(typeof this._rep==="function"){g=this._rep.call(e,h,g)}switch(typeof g){case"string":return this._quote(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g){return"null"}this._gap+=this._indent;d=[];if(Object.prototype.toString.apply(g)==="[object Array]"){a=g.length;for(c=0;c>4);k=((j&15)<<4)|(g>>2);h=((g&3)<<6)|f;a=a+String.fromCharCode(m);if(g!=64){a=a+String.fromCharCode(k)}if(f!=64){a=a+String.fromCharCode(h)}}while(b>2;g=((k&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+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}};polopoly.loginBox={_login:{auth:"authError",perm:"permError",down:"downError","default":"defaultError"},init:function(){document.__ppUseDefLogin=false;try{this.defLogin=p_l_i18n.defaultLoginName}catch(n){this.defLogin="E-mail"}defLogin=this.defLogin;window.setTimeout(this._tryAutoFill,500);jQuery(".clearable").focus(function(){n=jQuery(this);if(document.__ppUseDefLogin&&n.val()==defLogin){n.val("")}});jQuery(".clearable").blur(function(){n=jQuery(this);if(document.__ppUseDefLogin&&n.val()==""){n.val(defLogin)}});jQuery(".not-loggedin .submit").click(function(){var t=jQuery(this).parents(".not-loggedin");var u=t.find(".loginname");var e=t.find(".password");if(u.val()==defLogin&&e.val()==defLogin){u.val("");e.val("")}});jQuery(".clearable").blur();var f=polopoly.cookie.get("loginName");var a=polopoly.cookie.get("sessionKey");if(polopoly.user.isLoggedIn()){jQuery(".loggedin").show();jQuery(".loggedin .user-name").append(polopoly.user.displayName())}else{if(polopoly.user.isMigratedUser()){jQuery(".migrated-resetpassword").show()}else{jQuery(".not-loggedin").show()}}if(polopoly.user.isNewsdaySubscriber()){var s=1000;var p="tnd";var i=846970;var b=new Date();var j=b.getFullYear();var o=b.getMonth();var l=b.getDate();var h=b.getHours();var k=b.getMinutes();var q=b.getSeconds();yearStr=j.toString();o+=1;if(o<10){monthStr="0"+o.toString()}else{monthStr=o.toString()}if(l<10){dayStr="0"+l.toString()}else{dayStr=l.toString()}if(h<10){hourStr="0"+h.toString()}else{hourStr=h.toString()}if(k<10){minuteStr="0"+k.toString()}else{minuteStr=k.toString()}if(q<10){secondStr="0"+q.toString()}else{secondStr=q.toString()}var c=yearStr+monthStr+dayStr+hourStr+minuteStr+secondStr;var g=s+new Number(c)+i;var m="http://www.liveedition.net/newsday/login_tnds.aspx?u="+s.toString()+"&t="+c+"&cs="+g;var d='e-Edition';jQuery(".loggedin .eelink").append(d)}else{var r='Subscribe to e-Edition';jQuery(".loggedin .eelink").append(r)}this._trySetError(".not-loggedin .form-error",polopoly.util.querystringValue("login_formerror"));if(polopoly.util.querystringValue("login_formerror")){jQuery("#loginForm").show()}},_trySetError:function(a,b){if(!b){return}var c=p_l_i18n[this._login[b]]||p_l_i18n[this._login["default"]];jQuery(a).css("display","block").text(c)},_tryAutoFill:function(){if(jQuery(".loginname").val()==""&&jQuery(".password").val()==""){jQuery(".loginname").val(this.defLogin);jQuery(".password").val(this.defLogin);document.__ppUseDefLogin=true}}};polopoly.util.lrumap=function(b,a){if(b){myMap=b}else{myMap=[]}if(!a){a=10}return{map:myMap,size:a,get:function(e){var d=this._findId(e);if(d){var c=this.map[d][1];this._setLeader(d);return c}},rawMap:function(){return this.map},put:function(e,d){var c=this._findId(e);if(c){this.map[c]=[e,d]}else{this.map.unshift([e,d])}if(this.map.length>this.size){this.map.splice(this.size)}},remove:function(d){var c=this._findId(d);if(c){this.map.splice(c,1)}},_findId:function(c){for(key in this.map){if(this.map[key][0]==c){return key}}},_setLeader:function(d){var c=this.map[key];this.map.splice(key,1);this.map.unshift(c)}}};polopoly.newslist={create:function(g,a,b,f,e){var d=polopoly.newslist._getNameFromId(g,a);if(!polopoly.newslist.allListIds){polopoly.newslist.allListIds=[]}polopoly.newslist.allListIds[a]=b;if(!polopoly.newslist.defaultListIds){polopoly.newslist.defaultListIds=[]}polopoly.newslist.defaultListIds[a]=f;jQuery("#edit_"+d+" .button").click(function(){jQuery("#"+d+" .settings").slideToggle(100)});var c=this.getSelection(g,a,e);jQuery("#"+d+" :checkbox").removeAttr("checked");for(checked in c){checkedValue="#c"+a.replace(".","_")+"-"+c[checked].replace(".","_");jQuery("#"+d+" "+checkedValue).attr("checked","checked")}if(e&&polopoly.user.isLoggedIn()||!e){jQuery("#edit_"+d).show()}var h=jQuery("#"+d+" input.save");if(e){h.click(function(){polopoly.newslist.storeOnServer(g,a)})}else{h.click(function(){polopoly.newslist.storeInCookie(g,a)})}this.updateList(g,a,e)},getSelection:function(c,a,d){var b;if(d){b=polopoly.user.getSessionServiceSettings(c,a)}else{b=polopoly.user.getServiceSettings(c,a)}return b?b:polopoly.newslist.defaultListIds[a]},_storeInCookie:function(d,a,c){var e=jQuery("#"+c+" input:checkbox:checked");var b=[];jQuery.each(e,function(){b[b.length]=this.value});polopoly.user.setServiceSettings(d,a,b);this.updateList(d,a,false)},_storeInSessionCookie:function(d,a,c){var e=jQuery("#"+c+" input:checkbox:checked");var b=[];jQuery.each(e,function(){b[b.length]=this.value});polopoly.user.setSessionServiceSettings(d,a,b);this.updateList(d,a,true)},storeInCookie:function(c,a){var b=polopoly.newslist._getNameFromId(c,a);polopoly.newslist._storeInCookie(c,a,b);jQuery("#"+b+" .settings").hide(100)},storeOnServer:function(c,a){var b=polopoly.newslist._getNameFromId(c,a);jQuery("#error_"+b).hide();polopoly.newslist._storeInSessionCookie(c,a,b);jQuery.ajax({cache:false,data:{sdid:c,siid:a},error:function(e,f,d){jQuery("#error_"+b+"").show()},success:function(e,d){jQuery("#"+b+" .settings").hide(100)},timeout:2000,type:"POST",url:"/membership/persist"})},updateList:function(d,l,a){var b=polopoly.newslist._getNameFromId(d,l);var k=this.getSelection(d,l,a);if(k.length==0){jQuery("#"+b+" .lists").html("

customize my news and stay on top of what matters to you

Get a quick view of the news and information that is most important to you. Click the 'edit my settings' button below and get started now.
");return}var f=polopoly.newslist.allListIds[l];var c=[];for(var g=0;g");var e=jQuery(f).width();var c=function a(g,h){return function(j){var l=jQuery(d).val();var k=g(l);var i=k>0?Math.ceil(k/4*e):(l.length>0?0.01*e:0);jQuery("#"+b).css("width",i+"px");jQuery("#"+b).css("background-color",h[k])}}(this._testPassword,this._colors);jQuery(d).keyup(c)},_testPassword:function(a){score=0;if(a.length<5){score+=3}else{if(a.length>4&&a.length<8){score+=6}else{if(a.length>7&&a.length<16){score+=12}else{if(a.length>15){score+=18}}}}if(a.match(/[a-z]/)){score+=1}if(a.match(/[A-Z]/)){score+=5}if(a.match(/\d+/)){score+=5}if(a.match(/(.*[0-9].*[0-9].*[0-9])/)){score+=5}if(a.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)){score+=5}if(a.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)){score+=5}if(a.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){score+=2}if(a.match(/([a-zA-Z])/)&&a.match(/([0-9])/)){score+=2}if(a.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)){score+=2}if(score<5){return 0}else{if(score>=5&&score<15){return 1}else{if(score>=15&&score<30){return 2}else{if(score>=30&&score<35){return 3}else{return 4}}}}}};jQuery().ready(function(){return function(b){for(var a=0;a