/* FILE ARCHIVED ON 14:59:17 Jan 12, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 3:57:31 Jul 28, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ if(!("console"in window)||!("firebug"in console)){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;ilngth){chrAfter=headline.charCodeAt(lngth);headline=headline.substring(0,lngth);if(cutWord==true&&chrAfter!=32){headline=headline.replace(/\w+$/,'');}if(!cutWord==true&&chrAfter!=32){headline=headline+"...";}else{headline=headline+" ...";}}return headline;},commaCrop: function(comString){comma=comString.indexOf(',');allcaps=comString.indexOf('TODAY');if(comma>-1){comString=comString.substr(0,comma);}else if(allcaps>-1){comString="Today";}return comString;},cleanDate: function(str){str=str.replace(/-na-/g,'');return str;},dbx_Local: function(){var s=document.fgl.txtZip.value;s=Utils.trim(s);var re=/\d{5}/g;if(s.length==0){document.fgl.txtZip.value="";alert("Please enter a ZIP code or city name.");document.fgl.txtZip.focus();}else if(s.length==5&&s.match(re)){location="https://webarchive.library.unt.edu/eot2008/20090112145917/http://www.msnbc.com/pfp/saveset.asp?section=QuickNews&origin=cover&tQSZip="+s+"&return="+window.location;}else{alert(s+" did not match a major metro area. Please try your ZIP code again.");location="https://webarchive.library.unt.edu/eot2008/20090112145917/http://www.msnbc.com/pfp/choices3.asp?section=weather&CityZip="+s+"&return="+window.location;}return false;},dbx_Change: function(s){if(s!="0"){var l="https://webarchive.library.unt.edu/eot2008/20090112145917/http://www.msnbc.com/pfp/choices4.asp";return l;}return'#';},dbx_Remove: function(s){if(s!="0"){var l="https://webarchive.library.unt.edu/eot2008/20090112145917/http://www.msnbc.com/pfp/remove.asp?section="+s+"&return="+window.location+"#"+s;return l;}return'#';},trim: function(inValue){if(inValue){inValue=inValue.replace(/^\s*/g,"");inValue=inValue.replace(/\s*$/g,"");}return inValue;}};var DataboxService= function(){};DataboxService.EVENT_LOAD="onLoad";DataboxService.DEFAULT_DB="23283610";DataboxService.COOKIED_DB="23301549";var rex=/\w+\:\/\/([^\/]+)/;var rootUri=rex.exec(window.location)[0];DataboxService.SVC=rootUri+'/databox/data.aspx';DataboxService.prototype={$listeners:[],$data:null,addListener: function(c,e,b){this.$listeners.push({context:c,event:e,callback:b});},dispatchEvent: function(context,eventName,msg){for(var i=this.$listeners.length-1;i>=0;i--){if(this.$listeners[i].context==context&&this.$listeners[i].event==eventName)this.$listeners[i].callback(msg);};},parse: function(result){this.evaluate(result);},evaluate: function(parsed_result){try{this.$data=eval('('+parsed_result+')');this.dispatchEvent(this,DataboxService.EVENT_LOAD,true);}catch(e){dbxErr="true";if(DebugMode==true){console.log("Databox validity error. Please send the XMLHttpRequest paths and the GET response to isiteui. Please also check IE6/7 for any JavaScript errors and send those as well. Thanks!");}this.$data=undefined;this.dispatchEvent(this,DataboxService.EVENT_LOAD,false);}},load: function(id,param){var url=DataboxService.SVC+"?dbid="+id+"&s="+param+"&";var request=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");var self=this;request.open("GET",url);request.onreadystatechange= function(){if(request.readyState==4&&request.status==200){if(request.responseText){self.parse(request.responseText);}}};request.send(null);},getData: function(){return this.$data;}};var CookieDS= function(){arguments.callee.superclass.constructor.call(this);};Utils.subclass(CookieDS,DataboxService);CookieDS.prototype.parse= function(result){result=result.replace(/\n/g,'');result=result.replace(/,"headlines"\:\[\{"foo"\:"null"\}\}/g,'}');result=result.replace(/"leagues"\:\[\{"foo"\:"null"\}"error"\:\{"msg"\:"Score data not available"\}\]\}\]/,'"error":{"msg":"Score data not available"}');result=result.replace(/\{"foo"\:"null"\},?/g,'');this.evaluate(result);};var DefaultDS= function(){arguments.callee.superclass.constructor.call(this);};Utils.subclass(DefaultDS,DataboxService);DefaultDS.prototype.parse= function(result){result=result.replace(/\n/g,'');result=result.replace(/"error":\{"msg"\:"Weather data not available"\}\]\}/g,'"error":{"msg":"Weather data not available"}');result=result.replace(/\{"foo"\:"null"\},?/g,'');this.evaluate(result);};var DBMgr={};( function(){var cookiedDB=new CookieDS();var defDB=new DefaultDS();var DEFAULT_ZIP=94101;var activeDB={};var flavor='';var callbacks=[];var toLoad=0;var loaded=0; function init(ignore_personalization){if(ignore_personalization){flavor="default";return;}if(Utils.isPersonalized()){var pz=Utils.getPersonalization();if(pz.locCode!=null&&pz.locCode!=""){flavor="cookied";}else{flavor="default";}}else{flavor="default";}if(flavor=="default"){var geoObj=getGeoFromCookie();if(geoObj.isocountry=="us"&&geoObj.zipcode!=""){var p1Mark=readCookie("p1Mark");if(p1Mark==""){var expDate=new Date();expDate.setDate(expDate.getDate()+14);SetCookie("p1Mark","1",expDate);location="/id/25632630?tqszip="+geoObj.zipcode+"&return=/";}}}} function onLoad(e){loaded++;if(loaded==toLoad){notify();}} function start(){if(flavor!="default"){cookiedDB.addListener(cookiedDB,DataboxService.EVENT_LOAD,onLoad);toLoad++;};defDB.addListener(defDB,DataboxService.EVENT_LOAD,onLoad);toLoad++;defDB.load(DataboxService.DEFAULT_DB,DEFAULT_ZIP);if(flavor!="default")cookiedDB.load(DataboxService.COOKIED_DB,'');} function getFlavor(){return flavor;} function subscribe(c){callbacks.push({callback:c});} function notify(){for(var i=callbacks.length-1;i>=0;i--){callbacks[i].callback();}} function hasLoaded(){return(loaded==toLoad);}DBMgr.hasLoaded=hasLoaded;DBMgr.subscribe=subscribe;DBMgr.getFlavor=getFlavor;DBMgr.start=start;DBMgr.init=init;DBMgr.cookied=cookiedDB;DBMgr.def=defDB;})();