
/*
Popup 2.1 : June 25, 2001
copyright 2000, 2001 Time, Inc.
design, code: Gary Poster
if collapsed, see [full_filename].bak.js on staging server for original version
*/
var G_=new Object();G_.loc=self.location.href.toLowerCase();G_.dest="";G_.now=new Date();G_.nowN=G_.now.getTime();G_.seed=Math.random();G_.imageLoad=new Image();G_.horizMargin=10;G_.vertMargin=25;G_.horizBorder=4;G_.topBorder=15;G_.mo=2678400000;G_.popFeatures="";G_.popURL="";G_.positioning="";G_.countdown="";{var agt=navigator.userAgent.toLowerCase();G_.appName=navigator.appName.toLowerCase();G_.major=parseInt(navigator.appVersion);G_.minor=parseFloat(navigator.appVersion);G_.nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(G_.appName.indexOf('netscape')!=-1));G_.nav4=(G_.nav&&G_.major==4&&G_.minor>4.05);G_.nav6up=(G_.nav&&(G_.major>=5));if(typeof navigator.vendorSub!="undefined"){G_.navMajor=parseInt(navigator.vendorSub);}else G_.navMajor=0;G_.ie=(agt.indexOf("msie")!=-1);G_.ieMinor=G_.ie?parseFloat(agt.slice(agt.indexOf("msie")+4)):0;G_.ieMajor=parseInt(G_.ieMinor);G_.aol=(agt.indexOf("aol")!=-1);G_.aolMinor=G_.aol?parseInt(agt.slice(agt.indexOf("aol")+3)):0;G_.aol7up=G_.aolMinor>=7;G_.win2000=(agt.indexOf("windows nt 5.0")!=-1);G_.win31=((agt.indexOf("windows 3.1")!=-1)||(agt.indexOf("win16")!=-1)||(agt.indexOf("windows 16-bit")!=-1));G_.win=((agt.indexOf("win")!=-1)||(agt.indexOf("16bit")!=-1));G_.mac=(agt.indexOf("mac")!=-1);var host=self.location.hostname.toLowerCase().split(".");if(host.length>2){var myX=host[host.length-1];if(myX=="com"||myX=="edu"||myX=="net"||myX=="org"||myX=="gov")G_.domain=host.slice(host.length-2).join(".");else if(host.length>3)G_.domain=host.slice(host.length-3).join(".");}};G_.compPath='http://i.timeinc.net/subs/popup2/comp/';if(!document.cookie)document.cookie="PopUpCalls=0;path=/;";var P_execute;if(document.cookie){var P_execute=true;if(G_.nav4)document.write('<scr'+'ipt language="JavaScript1.2" type="text/javascript" src="'+G_.compPath+'ns4_1.js"></scr'+'ipt>');else if(G_.ie&&G_.mac&&G_.ieMinor>=5&&G_.ieMinor<5.5)document.write('<scr'+'ipt language="JavaScript1.2" type="text/javascript" src="'+G_.compPath+'macie_1.js"></scr'+'ipt>');else if(G_.major>=5||(G_.ie&&G_.ieMajor>=5))document.write('<scr'+'ipt language="JavaScript1.4" type="text/javascript" src="'+G_.compPath+'moz5_1.js"></scr'+'ipt>');else if(!G_.mac&&G_.ie)document.write('<scr'+'ipt language="JavaScript1.2" type="text/javascript" src="'+G_.compPath+'ie4_1.js"></scr'+'ipt>');else P_execute=false;};function G_instOf(constr){var obj=this.constr;while(obj){if(obj==constr)return true;obj=obj.prototype.constr;};return false;};Object.prototype.instanceOf=G_instOf;function G_readString(delineators){if(delineators&&delineators.constructor==Array){var theArray=this.split(delineators[0]);if(delineators.length>1)for(var i=0;i<theArray.length;i++)theArray[i]=theArray[i]._read(delineators.slice(1));return theArray;};return false;};String.prototype._read=G_readString;function G_packArray(delineators){var theString="";for(var i=0;i<this.length;i++){var temp=this[i];if(typeof(temp)=="object"&&temp.constructor==Array)temp=temp._pack(delineators.slice(1));if(temp)theString+=temp+delineators[0];};return theString.slice(0,-(delineators[0].length));};Array.prototype._pack=G_packArray;function argToArr(a){var r=[];for(var i=0; i<a.length; i++)r[r.length]=a[i];return r;};function gPopUp(){if(G_.popURL){window.open(G_.popURL,"POPUP",G_.popFeatures);}else if(G_.aolURL)window.location.href=G_.aolURL;else if(G_.flashDiv){window.document.body.appendChild(G_.flashDiv);window.document.body.appendChild(G_.trackingGIF);}};function P__ruleSet(){function update(){if(this.instanceOf(P__meta)||this.instanceOf(P__seq)){G_._c[this.chipId][1]=G_.nowN;G_._c[this.chipId][2]=parseInt(G_._c[this.chipId][2])+1;};this.par._updated[this.par._updated.length]=this.name;};function test(){if(P_execute&&this.cycle*3600000+parseInt(G_._c[this.chipId][1])<=G_.nowN&&(this.impression<0||parseInt(G_._c[this.chipId][2])<this.impression)){if(this.rules)return eval(this.rules);return true;};return false;};this.constr=P__ruleSet;this._test=test;this.update=update;};function P__ruleSet_i(o,a){o.name=a[0];o.rules=a[1];o.cycle=a[2]||0;o.start=a[3]||0;o.impression=isNaN(a[4])?-1:a[4];o.par=a[5];o.chipId=0;if(o.par){while(o.chipId<G_._c.length&&G_._c[o.chipId][0]&&G_._c[o.chipId][0]!=o.name)o.chipId++;if(o.chipId==G_._c.length)G_._c[o.chipId]=[o.name,0,0];else if(!G_._c[o.chipId][1]||parseInt(G_._c[o.chipId][1])<o.start)G_._c[o.chipId][2]=0;}};function P__meta(){this.constr=P__meta;P__ruleSet_i(this,argToArr(arguments))};P__meta.prototype=new P__ruleSet();function P__popup(){function test(){return this._test();};function launch(){if(this._test()){this.update();return this;};return false;};function pre(time){if(this._test()){if(this.image){if(time)setTimeout("G_.imageLoad.src=\""+this.image+"\"",time);else G_.imageLoad.src=this.image;};return true;};return false;};function pop(noC){var popA=this.source.split("?");var popAb=popA[1]?popA[1]._read(["&","="]):[];popAb=popAb.concat([["LOC",escape(document.location.host+document.location.pathname)],["NOWN",G_.nowN],["UPDATED",escape(this.par._updated.join("~"))],["_T",escape(G_._t)]]);G_.popURL=popA[0]?popA[0]+"?"+popAb._pack(["&","="]):0;G_.positioning=(G_.ie?",left=":",screenX=")+Math.max(((screen.width-this.width-2*G_.horizMargin)*this.pLeft/100+G_.horizMargin-G_.horizBorder),0)+(G_.ie?",top=":",screenY=")+Math.max(((screen.height-this.height-2*G_.vertMargin)*this.pTop/100+G_.vertMargin-G_.topBorder),0);if(G_.win2000&&G_.ie&&G_.ieMajor<=6&&!G_.aol7up)G_.positioning="";G_.popFeatures=this.winOpts+(this.winOpts?",":"")+(G_.ie||G_.nav6up?"height=":"innerHeight=")+this.height+(G_.ie||G_.nav6up?",width=":",innerWidth=")+this.width+G_.positioning;if(this.delay){this.delay*=1000;var start_of_countdown=new Date().getTime();var list=document.cookie._read([/;\s*/,"="]);for(var i=0; i<list.length; i++){if(list[i][0]==("PopUpCalls"+G_._t+"_DELAYED")){this.delay-=(start_of_countdown-parseInt(list[i][1],10));start_of_countdown=parseInt(list[i][1],10);break;}};var kill=new Date(new Date().getTime()+this.delay);document.cookie="PopUpCalls"+G_._t+"_DELAYED="+start_of_countdown+"; expires="+kill.toUTCString()+"; path=/"+(G_.domain?"; domain=."+G_.domain:"");G_.countdown=window.setTimeout('gPopUp();',this.delay);}else gPopUp();self.focus();var then=new Date(G_.nowN+3*G_.mo);var newMix="";for(var i=0; i<G_._c.length; i++){if(G_._c[i][1]&&parseInt(G_._c[i][1])>(G_.nowN-3*G_.mo)){if(!G_.popURL&&G_._c[i][1]<G_.nowN){for(var j=0; j<this.par._updated.length; j++){if(G_._c[i][0]==this.par._updated[j]){G_._c[i][1]=G_.nowN;G_._c[i][2]++;}}};newMix+=G_._c[i].join("|")+"~";}};if(!G_.popURL){for(i=0; i<this.par._updated.length; i++){if(newMix.indexOf(this.par._updated[i])==-1){newMix+=this.par._updated[i]+"|"+G_.nowN+"|1|~";}}};var cookie_instr='document.cookie="PopUpCalls'+G_._t+'='+escape(newMix.slice(0,-1))+'; expires='+then.toGMTString()+'; path=/'+(G_.domain?'; domain=.'+G_.domain:'')+'"';if(!noC){if(this.delay)var cookie_countdown=window.setTimeout(cookie_instr,this.delay);else eval(cookie_instr);}};this.constr=P__popup;this.launch=launch;this.pre=pre;this.test=test;this.pop=pop;};P__popup.prototype=new P__ruleSet();function P__popup_i(o,a){P__ruleSet_i(o,a.slice(8));o.source=a[0];o.delay=a[1];o.width=a[2];o.height=a[3];o.image=a[4];o.pLeft=isNaN(a[5])||a[5]<0||a[5]>100?50:a[5];o.pTop=isNaN(a[6])||a[6]<0||a[6]>100?50:a[6];o.winOpts=a[7];};function P_popup(){this.constr=P_popup;P__popup_i(this,argToArr(arguments));};P_popup.prototype=new P__popup();function P__group(){function itemChance(item,chance){this.i=item;this.c=chance;};function addItems(children){for(var i=0;i<children.length;i++)this.items[this.items.length]=new itemChance(children[i],isNaN(children[i+1])?1:children[++i]);};function test(){if(this._test()&&this.items.length)for(var i=0;i<this.items.length;i++)if(this.par[this.items[i].i].test())return true;return false;};function getItem(){if(this._test()&&this.items.length){var temp=[];var totalChances=0;for(var i=0;i<this.items.length;i++)if(this.par[this.items[i].i].test()){temp[temp.length]=this.items[i];totalChances+=this.items[i].c;};if(temp.length==0)return false;if(totalChances==0)return this.par[temp[0].i];var choice=Math.floor(G_.seed*totalChances);var count=0;for(var i=0;i<temp.length;i++)if(choice<(count+=temp[i].c))return this.par[temp[i].i];};return false;};function launch(){var theItem=this.getItem();if(theItem){this.update();return theItem.launch();};return false;};function pre(time){var theItem=this.getItem();if(theItem)return theItem.pre(time);return false;};this.constr=P__group;this.add=addItems;this.getItem=getItem;this.launch=launch;this.test=test;this.pre=pre;};P__group.prototype=new P__ruleSet();function P__group_i(o,a){P__ruleSet_i(o,a);o.items=[];o.chances=[];};function P_group(){this.constr=P_group;P__group_i(this,argToArr(arguments));};P_group.prototype=new P__group();function P__seq(){function addItems(children){this.items=this.items.concat(children);};function launch(){if(this.par.meta._test()&&this._test()&&this.items.length){var i=0;var theItem;while(i<this.items.length&&!(theItem=this.par[this.items[i]].launch()))i++;if(theItem){this.update();this.par.meta.update();theItem.pop((this.name=="unload"&&G_.nav4));return true;}};return false;};function pre(time){if(!this.par.meta._test()||!this._test()||!this.items.length)return false;var i=0;while(i<this.items.length&&!this.par[this.items[i]].pre(time))i++;return(i<this.items.length);};this.constr=P__seq;this.add=addItems;this.launch=launch;this.pre=pre;};P__seq.prototype=new P__ruleSet();function P__seq_i(o,a){P__ruleSet_i(o,a);o.items=[];};function P_seq(){this.constr=P_seq;P__seq_i(this,argToArr(arguments));};P_seq.prototype=new P__seq();function P__(){function addPop(source,delay,width,height,image,pLeft,pTop,winOpts,name,rules,cycle,start,impression){this[name]=new P_popup(source,delay,width,height,image,pLeft,pTop,winOpts,name,rules,cycle,start,impression,this);};function addGrp(name,rules,cycle,start,impression){this[name]=new P_group(name,rules,cycle,start,impression,this);};function addSeq(name,rules,cycle,start,impression){this[name]=new P_seq(name,rules,cycle,start,impression,this);};function add(name,children){this[name].add(children);};if(!G_._c)P_getCookie();this._p=addPop;this._g=addGrp;this._s=addSeq;this._add=add;this._updated=[];this.meta=new P__meta("meta","",0,0,-1,this);this._s("load");this._s("unload");this.meta.rules='!P_locIs("cp.","/privacy","cnn=yes") && !(P_locIs("/time/subscriber/"))';this.meta.cycle=0;this.meta.start=0;this.meta.impression=-1;this._p("http://www.time.com/time/interstitials/rd.html?rdURL=http%3A//subs.timeinc.net/CampaignHandler/tdofips%3Fsource_id%3D15%26random%3Dtrue%26html%3Dtrue",0,416,415,"",50,50,"scrollbars,status,resizable","tdofips15",'',168,0,-1);this._p("http://www.time.com/time/web/cm/inter_td_archive.html",0,300,364,"",50,50,"","archive",'P_crtnDetect("NEWSUB")||P_crtnDetect("CURRENTSUB")',48,0,-1);this._p("",0,0,0,"",50,50,"","layerPopup1",'(document.cookie.indexOf("tdofips15")==-1)&&!P_detect("AOL")&&!P_detect("NRB")&&!P_crtnDetect("NEWSUB")&&!P_crtnDetect("CURRENTSUB")&&!P_crtnDetect("MAGICDN")&&(G_.seed*100>=50)&&P_formLayer("lpopup1",100,100,416,477,"subs2/prodhtml/TD/tdgrey_6mo.html?la=1",1,"subs2/images/shared/topbar375.gif", 416, 21, 396,2,416,21,"CCCCCC",10000,0)',168,0,-1);this._g("1stPosWeb",'!P_detect("AOL")&&!P_detect("NRB")&&!P_crtnDetect("NEWSUB")&&!P_crtnDetect("CURRENTSUB")&&!P_crtnDetect("MAGICDN")&&(document.cookie.indexOf("layerPopup1")==-1)',168,0,-1);this._add("1stPosWeb",["tdofips15",1]);this._add("load",["layerPopup1"]);this._add("unload",["archive","1stPosWeb"]);this.load.rules='';this.load.cycle=168;this.load.start=0;this.load.impression=-1;this.unload.rules='!P_destIs("cnn.com","pathfinder.com","timeinc.net","time.com","secure.customersvc.com","ads.web.aol.com","time-planner.com", "timemediakit.com")';this.unload.cycle=0;this.unload.start=0;this.unload.impression=-1;};G_._t="TD";G_.ignoreFrames=true;function P_destIs(){for(var i=0;i<arguments.length;i++)if(G_.dest.toLowerCase().indexOf(arguments[i].toLowerCase())>-1)return true;return false;};function P_detect(msk){if(msk=="AOL"&&G_.aol)return 1;var m=new Object();m.AOLbasic=1;m.AOLtv=64;m.AOLatSchool=512;m.CSbasic=2;m.CSgateway=4;m.NRB=16384;m.AOL=m.AOLbasic|m.AOLtv;m.CS=m.CSbasic|m.CSgateway;m.AOL_CS=m.AOL|m.CS;var c=document.cookie._read([/;\s*/,"="]);var pf_t;for(var i=0;i<c.length;i++)if(unescape(c[i][0])=="PF_TARGET"){pf_t=c[i][1];break;};if(!pf_t||!msk)return null;else return pf_t&m[msk];};function P_locIs(){for(var i=0;i<arguments.length;i++)if(G_.loc.toLowerCase().indexOf(arguments[i].toLowerCase())>-1)return true;return false;};function P_crtnDetect(userType){var c=document.cookie._read([/;\s*/,"="]);var crtnString;for(var i=0;i<c.length;i++)if(unescape(c[i][0])=="ITG_CUR"){crtnString=unescape(c[i][1]);break;};if(!crtnString)return null;if(userType=="CURRENTSUB"){if(!crtnString.match(/NEWSUB|NEWSSTAND/)||crtnString.match(/MAGICDN/))return true;}else if(crtnString.indexOf(userType)>-1)return true;return null;};var CM_t1;var TimeoutID;var prevLayer;function closeFofie(){if(G_.nav6up||(G_.ie&&G_.mac))G_.ofieDiv.style.left="-1000px";else document.body.removeChild(G_.ofieDiv);window.clearInterval(CM_t1);};function hover(startTop){var newY=document.body.scrollTop+startTop;G_.ofieDiv.style.top=newY+"px";};function P_formLayer(layerId,xPos,yPos,lWidth,lHeight,fofieSrc,SecDelay,imgSrc,imgW,imgH,xLeftMap,yUpperMap,xRightMap,yLowerMap,tbgColor,lzIndex,bHover){if(document.getElementById){if(document.getElementById(prevLayer)){document.body.removeChild(G_.ofieDiv);window.clearTimeout(TimeoutID);window.clearInterval(CM_t1);}}else if(document.all){if(document.all[prevLayer]){document.body.removeChild(G_.ofieDiv);window.clearTimeout(TimeoutID);window.clearInterval(CM_t1);}};prevLayer=layerId;if(G_.nav&&(!(G_.major>=4)))return 0;if(G_.ie&&(!(G_.ieMajor>=4)))return 0;G_.ofieDiv=document.createElement("div");G_.ofieDiv.setAttribute("id",layerId);G_.ofieDiv.style.position="absolute";G_.ofieDiv.style.left="-1000px";G_.ofieDiv.style.top=yPos+"px";G_.ofieDiv.style.zIndex=lzIndex;var area1=document.createElement("area");area1.href="javascript:closeFofie()";area1.shape="rect";area1.coords=xLeftMap+","+yUpperMap+","+xRightMap+","+yLowerMap;var ofieMap=document.createElement("map");if(G_.nav6up)ofieMap.setAttribute("name","Map"+layerId);else ofieMap.setAttribute("id","Map"+layerId);ofieMap.appendChild(area1);window.document.body.appendChild(ofieMap);table=document.createElement("table");table.cellSpacing=0;table.style.padding=0;table.style.backgroundColor="#"+tbgColor;tbody=document.createElement("tbody");tr=document.createElement("tr");td=document.createElement("td");var topbarImg=document.createElement("img");topbarImg.src="https://a248.e.akamai.net/f/1016/606/1d/image.timeinc.net/"+imgSrc;topbarImg.style.width=imgW+"px";topbarImg.style.height=imgH+"px";topbarImg.style.border="0px";topbarImg.useMap="#Map"+layerId;if(G_.ie&&G_.mac){var anchor1=document.createElement("a");anchor1.href="javascript:closeFofie()";anchor1.appendChild(topbarImg);td.appendChild(anchor1);}else td.appendChild(topbarImg);var br1=document.createElement("br");td.appendChild(br1);var iframe1=document.createElement("iframe");iframe1.setAttribute("id","if"+layerId);iframe1.src="https://subs.timeinc.net/"+fofieSrc;iframe1.style.width=lWidth+"px";iframe1.style.height=lHeight+"px";iframe1.scrolling="auto";td.appendChild(iframe1);tr.appendChild(td);tbody.appendChild(tr);table.appendChild(tbody);G_.ofieDiv.appendChild(table);window.document.body.appendChild(G_.ofieDiv);if(SecDelay<=0)SecDelay=1;TimeoutID=setTimeout("G_.ofieDiv.style.left = '"+xPos+"px';",SecDelay*1000);if(G_.ie&&(!G_.mac))CM_t1=bHover?window.setInterval('hover('+yPos+');',40):0;return 1;};function P_getCookie(){var c=document.cookie._read([/;\s*/,"="]);G_._c=[];for(var i=0;i<c.length;i++)if(unescape(c[i][0])=="PopUpCalls"+G_._t&&c[i][1]){G_._c=unescape(c[i][1])._read(["~","|"]);break;};P_cC=setTimeout("P_getCookie();",2000);};

