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<ChildWindow.instances.length;i++){if(ChildWindow.instances[i].isOpen())count++;}
return count;
}
function FlashMovie(o) {
for (var k in o) this[k] = o[k];
if (!this.quality) this.quality = 'autohigh';
if (!this.bgcolor) this.bgcolor = '#ffffff';
if (oBrowser.isIe) {
if (!this.id) this.id = 'flashId' + FlashMovie.instances.length;
if (!this.wmode) this.wmode = 'opaque';
}
FlashMovie.instances[FlashMovie.instances.length] = this;
}
var prot = window.location.protocol;
FlashMovie.prototype.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
FlashMovie.prototype.codebase = prot + '//active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0';
FlashMovie.prototype.type = 'application/x-shockwave-flash';
FlashMovie.prototype.pluginspage = prot + '//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash';
FlashMovie.instances = new Array();
FlashMovie.isEnabled = false;
FlashMovie.prototype.toString = toString;
FlashMovie.prototype.getHtml = function() {
var htmlout='';
if (!this.url || !this.width || !this.height)
return htmlout;
else if (FlashMovie.isEnabled) {
htmlout+='<object classid="'+this.classid+'" codebase="'+this.codebase+'" id="'+this.id+'" width="'+this.width+'" height="'+this.height+'">\n';
htmlout+='<param name=movie value="'+this.url+'"><param name="wmode" value="'+this.wmode+'"><param name="quality" value="'+this.quality+'"><param name=bgcolor value="'+this.bgcolor+'">\n';
htmlout+='<embed src="'+this.url+'" quality="'+this.quality+'" bgcolor="'+this.bgcolor+'" width="'+this.width+'" height="'+this.height+'" type="'+this.type+'" pluginspage="'+this.pluginspage+'"></embed>\n';
htmlout+='</object>';
}
else if (this.altUrl) {
htmlout+=(this.altClick)?'<a href="'+this.altClick+'">':'';
htmlout+='<img src="'+this.altUrl+'" width="'+this.width+'" height="'+this.height+'" alt="" border="0">';
htmlout+=(this.altClick)?'</a>':'';
}
return htmlout;
}
var FLA_iePlugin = false;
var FLA_version = 5;
if (oBrowser.isIe && oBrowser.isWin && oBrowser.winVersion != "16") {
var out = '<script language=VBScript>'+'\n';
out+='dcmaxversion = 10\n';
out+='dcminversion = 1\n';
out+='Do'+'\n';
out+='On Error Resume Next'+'\n';
out+='FLA_iePlugin = (IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" & dcmaxversion & \"\")))'+'\n';
out+='If FLA_iePlugin = true Then Exit Do'+'\n';
out+='dcmaxversion = dcmaxversion - 1'+'\n';
out+='Loop While dcmaxversion >= dcminversion'+'\n';
out+='<\/script>';
document.write(out);
}
if (oBrowser.isNav && oBrowser.version >= 4
&& navigator.javaEnabled() && navigator.mimeTypes
&& navigator.mimeTypes["application/x-shockwave-flash"]
&& navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin ) {
var pluginname=navigator.plugins['Shockwave Flash'].description;
var pluginvers=pluginname.substring(pluginname.indexOf(".")-1);
if(parseFloat(pluginvers) >= FLA_version) {
FlashMovie.isEnabled = true;
}
FlashMovie.version = pluginvers;
}
else if (FLA_iePlugin) {
FlashMovie.isEnabled = (dcmaxversion >= FLA_version) ? true : false;
FlashMovie.version = dcmaxversion;
}
else if (oBrowser.isGecko || oBrowser.isMac) FlashMovie.isEnabled = true;
if(oBrowser.isMac)FlashMovie.isEnabled=false;// Temporary fix for Mac / Flash loading problem
function Cookie(name, expInMs, path, domain, secure) {
if (!name) name = "default";
this.$name = name;
if (expInMs) this.$expiration = new Date((new Date()).getTime() + expInMs);
else if (expInMs != 0) this.$expiration = new Date((new Date()).getTime() + Time.yr);
if (path) this.$path = path;
else this.$path = null;
if (domain) this.$domain = domain;
else this.$domain = null;
if (secure) this.$secure = true;
else this.$secure = false;
if (this.load()) this.$saved = true;
else this.$saved = false;
}
Cookie.isEnabled = true;
Cookie.prototype.isSet = function(key) {
key=''+key;
if (key) return (this[key]) ? true : false;
else return this.$saved;
}
Cookie.prototype.set = function (key, val, noSave) {
if (typeof(key)=='undefined') return;
key=''+key;
if (typeof(val)=='undefined') {
this.$value = key;
} else {
this[key] = { value: val, time: new Date().getTime() };
}
if (!noSave) {
this.save();
if (this.load()) this.$saved = true;
}
}
Cookie.prototype.get = function (key) {
if ((typeof(key)=='undefined') || (this.$value)) {
if (this.$value) return this.$value;
else return null;
} else {
key=''+key;
if (this[key]) return this[key];
else return null;
}
}
Cookie.prototype.save = function () {
var cookieval = "";
if (this.$value)
cookieval = escape(this.$value);
else {
for(var key in this) {
key=''+key;
if ((key.charAt(0) == '$') || ((typeof this[key]) == 'function'))
continue;
if (cookieval != "") cookieval+='&';
cookieval+=key + ':' + escape(this[key].value) + "/" + this[key].time;
}
}
var cookie = this.$name + '=' + cookieval;
if (this.$expiration) cookie+='; expires=' + this.$expiration.toGMTString();
if (this.$path) cookie+='; path=' + this.$path;
if (this.$domain) cookie+='; domain=' + this.$domain;
if (this.$secure) cookie+='; secure';
document.cookie = cookie;
}
Cookie.prototype.load = function() {
this.remove(false);
var cookies = document.cookie;
var start = cookies.indexOf(this.$name + '=');
if (cookies == "" || start == -1) return false;
start+=this.$name.length + 1;
var end = cookies.indexOf(';', start);
if (end == -1) end = cookies.length;
var cookieval = cookies.substring(start, end);
var a = cookieval.split('&');
if ((a.length == 1) && (a[0].indexOf('/') == -1)) {
this.$value = a[0];
} else {
for(var i=0; i < a.length; i++){
a[i] = a[i].split(':');
a[i][1] = a[i][1].split('/');
}
for(var i = 0; i < a.length; i++) {
this[''+a[i][0]] = { value: unescape(a[i][1][0]), time: parseInt(a[i][1][1]) };
}
}
return true;
}
Cookie.prototype.remove = function(key, noSaveFlag) {
if (key) {
key=''+key;
if (this[key]) delete(this[key]);
if (!noSaveFlag) this.save();
var kill = true;
for (var k in this) {
k=''+k;
if ((k.charAt(0) != '$') && ((typeof this[k]) != 'function'))
kill = false;
}
}
if (!key || kill) {
for(var k in this) {
k=''+k;
if ((k.charAt(0) == '$') || ((typeof this[k]) == 'function'))
continue;
delete(this[k]);
}
if (this.$value) delete(this.$value);
if (key == false) return;
var cookie;
cookie = this.$name + '=';
if (this.$path) cookie+='; path=' + this.$path;
if (this.$domain) cookie+='; domain=' + this.$domain;
cookie+='; expires=Fri, 02-Jan-1970 00:00:00 GMT';
document.cookie = cookie;
this.$saved = false;
}
}
Cookie.prototype.update = function() { if (!this.load()) this.remove(false); }
Cookie.prototype.toString = function() {
var cv = "";
if (this.$value)
cv = this.$value;
else {
for(var k in this) {
k=''+k;
if ((k.charAt(0) == '$') || ((typeof this[k]) == 'function'))
continue;
if (cv != "") cv+='\n';
cv+=k + ' = ' + escape(this[k].value) + " (" + new Date(parseInt(this[k].time)) + ")";
}
}
return cv;
}
Cookie.prototype.isExpired = function (k, nt) {
k=''+k;
var n = parseInt(nt);
var t = (nt.indexOf("s")!=-1) ? Time.sc
: (nt.indexOf("m")!=-1) ? Time.mn
: (nt.indexOf("h")!=-1) ? Time.hr
: (nt.indexOf("w")!=-1) ? Time.wk : Time.dy;
if (this.$value) return false;
else if (!this[k] || !this[k].time) return true;
return ( (this[k].time + (n * t)) < new Date().getTime() );
}
function DObj(id){this.o=mdo(id,true);}
DObj.winX=function(){return getW();}
DObj.winY=function(){return getH();}
DObj.prototype.left=function(){if(this.o)return this.o.getStyle("left");}
DObj.prototype.top=function(){if(this.o)return this.o.getStyle("top");}
DObj.prototype.setHtml=function(html){if(this.o)this.o.setHTML(html);}
DObj.prototype.show=function(){if(this.o)this.o.show();}
DObj.prototype.hide=function(){if(this.o)this.o.hide();}
DObj.prototype.moveTo=function(x,y){if(this.o)this.o.moveTo(x,y);}
DObj.prototype.moveBy=function(dX,dY){if(this.o)this.o.moveTo(parseInt(this.o.getStyle("left"))+dX,parseInt(this.o.getStyle("top"))+dY);}
DObj.prototype.clip=function(t,r,b,l){if(this.o)this.o.clip(t,r,b,l);}
function Survey(o){
this.status={DISABLED:-1,ONSITE:1,OFFSITE:0,VIEWED:100,COMPLETED:200};
this.wRef=null;
this.counter=0;
this.dir=o.dir;
this.name=o.name;
this.cookie=o.cookie;
this.launchPage='bye.ahtml';
this.jumpPage='survey.ahtml';
this.delay=5;
this.viewDelay='1w';
}
Survey.prototype.doLaunch=function() {
var status=(this.cookie.get(this.name))?parseInt(this.cookie.get(this.name).value):false;
if(oBrowser.isGecko)return;
if(!status||((status==this.status.VIEWED)&&this.cookie.isExpired(this.name,this.viewDelay))){
this.wRef=new ChildWindow({
url:'/survey/'+this.dir+'/'+this.launchPage,
width:360,
height:400,
scrollbars:true,
name:this.name,
mode:-1
});
this.onsite();
}
}
Survey.prototype.doLoad=function(){
this.cookie.update();
if(this.cookie.get(this.name)&&parseInt(this.cookie.get(this.name).value)==this.status.OFFSITE)
this.onsite();
}
Survey.prototype.doUnload=function(){
this.cookie.update();
if(this.cookie.get(this.name)&&parseInt(this.cookie.get(this.name).value)==this.status.ONSITE)
this.offsite();
}
Survey.prototype.testCookie=function(recurse){
if(recurse){
this.cookie.update();
if(this.cookie.get(this.name)&&(this.cookie.get(this.name).value==this.status.DISABLED)){
window.close();
return;
}
if(this.cookie.get(this.name) && parseInt(this.cookie.get(this.name).value)==this.status.OFFSITE){
if(this.counter++ > this.delay){
location.href='/survey/'+this.dir+'/'+this.jumpPage;
return;
}
}else{
this.counter=0;
}
}
setTimeout('survey.testCookie(true)',Time.sc);
}
Survey.prototype.completed=function(){this.cookie.set(this.name,this.status.COMPLETED);}
Survey.prototype.disabled=function(){this.cookie.set(this.name,this.status.DISABLED);}
Survey.prototype.viewed=function(){this.cookie.set(this.name,this.status.VIEWED);}
Survey.prototype.offsite=function(){this.cookie.set(this.name,this.status.OFFSITE);}
Survey.prototype.onsite=function(){this.cookie.set(this.name,this.status.ONSITE);}
function doNAV(el){
if(!document.getElementById||!el)return;
var par;
if(typeof(el)=="string"){
par=document.getElementById(el);if(!par)return;
el=par.firstChild;while(el.tagName.toLowerCase()!="img"&&!el.className){el=el.nextSibling;}
} else {
par=el.parentNode;while(!par.id){par=par.parentNode;}
}
var menu=mdo(par.id+"Sub");
if(!menu)return;
if (menu.getStyle("display").toLowerCase()=="none") {
eval("el.src="+el.className+".IMG_ON.src");
menu.setStyle("display","");
}
else{
eval("el.src="+el.className+".IMG_OFF.src");
menu.setStyle("display","none");
}
}
var tn={
txtDef:"1177BB",
txtOvr:"00AACC",
delay:100,
width:120,
TO:null,
OB:null,
enabled:(document.getElementById&&!(oBrowser.isMac&&oBrowser.isIe))
};
tn.over=function(el){
if(!el||!this.enabled)return;
if(this.TO){clearTimeout(this.TO);this.TO=null;}
if(el.className.indexOf("Child")>-1){
with(el.style){color="#"+this.txtOvr;textDecoration="underline";}
}
var els=el.childNodes;
for(var i=0;i<els.length;i++){
if(els[i].className=="topNavMenuLink"){window.status="http://"+window.location.host+els[i].innerHTML;break;}
}
}
tn.out=function(el){
if(!el||!this.enabled)return;
with(el.style){color="#"+this.txtDef;textDecoration="none";}
window.status="";
this.hide();
}
tn.show=function(el){
if(!el||!this.enabled)return;
this.iOffsets=getOffsets(document.getElementById("topnavimg"));
var area=el.coords.split(",");for(var i=0; i<area.length; i++){area[i]=parseInt(area[i]);}
var top=area[3],left=this.iOffsets.l+area[0]+((area[2]-area[0]-this.width)/2);
if(this.TO){clearTimeout(this.TO);this.hide(true);}
this.OB=mdo(el.id+"Menu")
this.OB.setStyle("top",this.iOffsets.t+area[3]);
this.OB.setStyle("left",left);
this.OB.setStyle("zIndex",99);
this.OB.setStyle("width",this.width);
if (timeline.show) { clearTimeout(timeline.show); }
if (FlashMovie.isEnabled) { timeline.showGif(); }
this.OB.show();
return true;
}
tn.hide=function(force){
if(!this.enabled)return;
if(force||this.TO){
this.TO=null;
timeline.show = setTimeout('timeline.showFlash();', 500);
this.OB.hide();
}
else{this.TO=setTimeout("tn.hide()",this.delay);}
return true;
}
tn.click=function(to){
var els=to.childNodes;
for(var i=0; i<els.length; i++){
if(els[i].className=="topNavMenuLink"){
window.location.href=els[i].innerHTML;
return;
}
}
}
tn.init=function(id){
if(!this.enabled)return;
var el=mdo(id);
var menus=(el.children)?el.children:(el.childNodes)?el.childNodes:null;
for (var i=0; i<menus.length; i++){
if (!menus[i].id) continue;
menus[i].onmouseover=function(evt){var el=(evt)?evt.target.parentNode:(event)?event.srcElement:null;tn.over(el);};
menus[i].onmouseout=function(evt){var el=(evt)?evt.target.parentNode:(event)?event.srcElement:null;tn.out(el);};
menus[i].onmouseup=function(evt){var el=(evt)?evt.target.parentNode:(event)?event.srcElement:null;tn.click(el);};
}
}
addLoadEvent(function(){tn.init('tn');});
function roll(img){
if(!document.images)return;
var s=img.src;
if(s.indexOf("_o.gif")>-1){
img.src=s.substring(0,s.indexOf("_o.gif"))+".gif";
}else{
img.src=s.substring(0,s.indexOf(".gif"))+"_o.gif";
}
}
function imgCache(){
if(!document.images)return;
var imgs=document.images;
for(var i=0; i<imgs.length; i++){
if(imgs[i].onmouseover&&(imgs[i].src.indexOf("_o.gif")==-1)){
var img=new Image();img.src=imgs[i].src.substring(0,imgs[i].src.indexOf(".gif"))+"_o.gif"
}
}
}
addLoadEvent(imgCache);
var cTest=new Cookie('ct');cTest.set('test',1);
if(cTest.$saved)cTest.remove();
else Cookie.isEnabled=false;
