var Time={sc:1000,mn:60000,hr:3600000,dy:86400000,wk:604800000,mo:18144000000,yr:31536000000}; var d=document,w=window; var errmail="qa+JSerror@babycenter.com"; window.onerror=function(message,url,line){ if((Math.random()<0.005)&&(!oBrowser.isGecko||(oBrowser.isGecko&&(oBrowser.buildDate>20020100)))){ var ua=navigator.userAgent; var cgi="/js/jserr.cgi?ur="+escape(url)+"&ln="+escape(line)+"&me="+escape(message)+"&ua="+escape(ua)+"&em="+ escape(errmail); var tmp=new Image();tmp.src=cgi; } return(!(location.port)&&(location.search.indexOf('DEBUGJS')<0))?true:false; } function toString(){var t='';for(var i in this){if(typeof(this[i]=='function'))continue;t+=i+' = '+this[i]+'\n';}return t;} function getW(){return(window.innerWidth)?window.innerWidth:(document.body&&document.body.clientWidth)?document.body.clientWidth:770;} function getH(){return(window.innerHeight)?window.innerHeight:(document.body&&document.body.clientHeight)?document.body.clientHeight:500;} function getDiv(id){ if(document.getElementById&&document.getElementById(id)) return document.getElementById(id); else return false; } function getOffsets(el){ var o={t:el.offsetTop,l:el.offsetLeft}; if (el.offsetParent){var op=getOffsets(el.offsetParent);o.t+=op.t;o.l+=op.l} return o; } var timeline={ showFlash:function(){ if((this.f&&this.g&&FlashMovie.isEnabled)||this.setObj()){ this.g.setStyle("display","none"); this.f.setStyle("display",""); if(oBrowser.isSafari)this.f.innerHTML+=""; } }, showGif:function(){ if((this.f&&this.g&&FlashMovie.isEnabled)||this.setObj()){ this.f.setStyle("display","none"); this.g.setStyle("display",""); } }, setObj:function(){ var f=getDiv("timelineFlash"),g=getDiv("timelineGif"); if(f&&g&&!(oBrowser.isMac&&oBrowser.isIe)){this.f=mdo(f);this.g=mdo(g);return true;} else return false; } } function addLoadEvent(e){ if(!window.loadEvents) window.loadEvents=new Array(); loadEvents[loadEvents.length]=e; } function doLoadEvents(){ if(!window.loadEvents)return; if(loadEvents.reverse)loadEvents.reverse(); var i=loadEvents.length; var e=loadEvents[--i]; while(e){ if(typeof(e)=="function")e(); if(typeof(e)=="string")eval(e); e=loadEvents[--i]; } } window.onload=doLoadEvents; function mdo(arg,isFloat){ if (!document.getElementById)return null; var o; if((typeof(arg)=="string")&&document.getElementById(arg)) o=document.getElementById(arg); else if(typeof(arg)=="string"||typeof(arg)=="undefined"){ if(!document.body||!document.createElement||!document.body.appendChild)return null; o=document.createElement("div"); if(arg)o.id=arg; document.body.appendChild(o); }else if(typeof(arg)=="object") o=arg; else return null; if (!o.style) o.style=o; o.moveTo=function(l,t){this.style.left=l;this.style.top=t;}; o.append=function(o){this.appendChild(o);}; o.show=function(){this.setStyle("visibility","visible");}; o.hide=function(){this.setStyle("visibility","hidden");}; o.floats=function(){this.setStyle("position","absolute");}; o.addText=function(t){this.append(document.createTextNode(t));}; o.addHTML=function(h){this.innerHTML+=h;}; o.setHTML=function(h){this.innerHTML=h;}; o.setStyle=function(n,v){this.style[n]=v;}; o.getStyle=function(n){return this.style[n];}; o.setParam=function(n,v){this[n]=v;}; o.clip=function(t,r,b,l){this.style.clip="rect("+t+","+r+","+b+","+l+")";} if(isFloat)o.floats(); return o } function BrowserInfo() { var n=navigator; var ua=' '+n.userAgent.toLowerCase(); var pl=n.platform.toLowerCase(); var an=n.appName.toLowerCase(); this.isNav=((ua.indexOf('mozilla')>0)&&!(ua.indexOf('compatible')>0)); this.isIe=(ua.indexOf('msie')>0); this.isSafari=(ua.indexOf('safari')>0); this.isGecko=(ua.indexOf('gecko')>0); this.isAol=(ua.indexOf('aol')>0); this.isOpera=(ua.indexOf('opera')>0); if(this.isIe){this.version=parseFloat(ua.substring(ua.indexOf('msie')+5));} else if(this.isNav&&this.isGecko){ var versions=ua.substring(ua.indexOf('netscape')); this.version=parseFloat(versions.substring(versions.indexOf('/')+1)); }else{this.version=parseFloat(n.appVersion);} if(this.isGecko){this.buildDate=parseInt(ua.substring(ua.indexOf('gecko')+6));} this.isWin=(ua.indexOf('win')>0); this.isMac=(ua.indexOf('mac')>0); this.isUnix=(ua.indexOf("x11")>0); this.isOs2=(ua.indexOf('os/2')>0); if(this.isWin){this.winVersion=(ua.indexOf('16')>0)?'16':(ua.indexOf('95')>0)?'95':(ua.indexOf('98')>0)?'98':(ua.indexOf('nt')>0)?'nt':null;} if(this.isMac){this.macVersion=(ua.indexOf('68k')>0||ua.indexOf('68000')>0)?'68k':(ua.indexOf('ppc')>0||ua.indexOf('powerpc')>0)?'ppc':null;} return this; } BrowserInfo.prototype.toString = toString; var oBrowser=new BrowserInfo(); function ChildWindow() { this.width=350; this.height=400; this.resizable=true; this.scrollbars=false; this.menubar=false; this.toolbar=false; this.location=false; this.status=false; this.directories=false; this.left=(document.all)?window.screenLeft+100:window.screenX+100; this.top=(document.all)?window.screenTop+100:window.screenY+100; this.mode=1; this.html=""; this.url=""; this.index=ChildWindow.instances.length; this.name="default_window"; if(arguments.length){ if(typeof(arguments[0])=="string"){this.url=arguments[0];this.mode=0;} else if(typeof(arguments[0])=="object")this.setProperties(arguments[0]); } this.ref=null; ChildWindow.instances[ChildWindow.instances.length]=this; if(this.html||this.url)this.show(); } ChildWindow.allowMultiple=true; ChildWindow.instances=new Array(); ChildWindow.prototype.toString=toString; ChildWindow.prototype.show=function(){ if(!window.open||oBrowser.version<4)return; if(this.mode!=0){ var newChild=!this.isOpen(); var config=""; config+="width="+this.width+","; config+="height="+this.height+","; config+=(this.resizable)?"resizable=yes,":""; config+=(this.scrollbars)?"scrollbars=yes,":""; config+=(this.toolbar)?"toolbar=yes,":""; config+=(this.menubar)?"menubar=yes,":""; config+=(this.location)?"location=yes,":""; config+=(this.status)?"status=yes,":""; config+=(this.directories)?"directories=yes,":""; config+="left="+this.left+","; config+="top="+this.top+","; if((!ChildWindow.allowMultiple&&ChildWindow.countOpen()>0)||(oBrowser.isGecko&&this.mode<0))return; this.ref=window.open("",this.name,config); if(!newChild){this.resizeTo(this.width,this.height);this.moveTo(this.left,this.top);} if(this.mode<0&&this.ref){this.ref.blur();this.ref.opener.focus();} else if(this.ref){this.ref.focus();} if(this.url){this.setUrl();} else if(this.html){this.setHtml();} }else{this.ref=window.open(this.url, this.name);} } ChildWindow.prototype.setProperties=function(prop){ for(key in prop){if(this[key]!='undefined')this[key]=prop[key];} if(prop['url'])this.html=""; } ChildWindow.prototype.isOpen=function(){if(this.ref&&!this.ref.closed)return true;else return false;} ChildWindow.prototype.setUrl=function(url){if(url){this.html="";this.url=url;}if(this.isOpen())this.ref.location.href=this.url;} ChildWindow.prototype.setHtml=function(html){ if(html){this.url="";this.html=html;} if(this.isOpen()){this.ref.document.open("text/html");this.ref.document.write(this.html);this.ref.document.close();} } ChildWindow.prototype.moveBy=function(horiz,vert){ if (this.isOpen()){ var left=(document.all)?this.ref.screenLeft:this.ref.screenX; var top=(document.all)?this.ref.screenTop:this.ref.screenY; this.left=left+horiz; this.top=top+vert; this.ref.moveTo(this.left,this.top); } } ChildWindow.prototype.resizeTo=function(w,h){ var oldW=(this.ref.innerWidth)?this.ref.innerWidth:this.ref.document.body.clientWidth; var oldH=(this.ref.innerHeight)?this.ref.innerHeight:this.ref.document.body.clientHeight; this.resizeBy(w-oldW,h-oldH) } ChildWindow.prototype.resizeBy=function(w,h){ this.width+=w; this.height+=h; this.ref.resizeBy(w,h); } ChildWindow.prototype.moveTo=function(left,top){ if(this.isOpen()){ this.left=left; this.top=top; this.ref.moveTo(this.left,this.top); } } ChildWindow.prototype.focus=function(){if(this.isOpen())this.ref.focus();} ChildWindow.prototype.close=function(){ if(this.isOpen()){ var left=(document.all)?this.ref.screenLeft:this.ref.screenX; var top=(document.all)?this.ref.screenTop:this.ref.screenY; this.left=left;this.top=top;this.ref.close(); } } ChildWindow.countOpen=function(){ var count=0; for(var i=0;i\n'; htmlout+='\n'; htmlout+='\n'; htmlout+=''; } else if (this.altUrl) { htmlout+=(this.altClick)?'':''; htmlout+=''; htmlout+=(this.altClick)?'':''; } return htmlout; } var FLA_iePlugin = false; var FLA_version = 5; if (oBrowser.isIe && oBrowser.isWin && oBrowser.winVersion != "16") { var out = '