function handleError() { return true; } window.onerror=handleError;
try{ var addMe=(document.location.href.indexOf('.go.com')==-1)?'tsdev-studio.online.disney.com:92/tv':'bventertainment.go.com/tv'; }
catch(add){var addMe='tsdev-studio.online.disney.com:92/tv';}
var _proto='http://';
try{ if (window.location.protocol == "https:"){ _proto='https://'; } } catch(lockpee){}
try{ var _gpn=document.location.href.match(new RegExp("\/([^\/\?\.]*)\.htm"))[1]; } catch(peein){ var _gpn='index'; }  if (_gpn==""){_gpn="index";}
var _gacct="DM510312C3MA38EN3;DM51030813MR38EN3;DM5103083LCA38EN3";
function hitIt(_hbpn,_hbmlc){ try{ hitbox.Set_hbPageView(_hbpn,_hbmlc,_gacct); }catch(hb){}}

function params(wut,qp,dflt){ dflt=(dflt==null)?'':dflt; try{r=unescape(wut.match(new RegExp(qp+"=+([^&;]*)"))[1]);}catch(qp){r=dflt;} return r; }
function gid(_id){ return document.getElementById(_id); }  /*---DOCUMENT GET ELEMENT BY ID---*/
function inner(_gid,_text){ gid(_gid).innerHTML=_text; } /*---WRITE TO INNERHTML---*/

document.writeln('<scr'+'ipt language="javascript" src="http://global.go.com/secure/studio/chrome.js"></scr'+'ipt>'); /*---WRITE CHROME JS---*/

leftPos=1, topPos=1, popW=1, popH=1, popDimensions = ""; /*---CENTERING FUNCTION---*/
function centerIt(popW,popH,urlToCenter,centeredWinName){
var w=800, h=600; if (document.all || document.layers || document.getElementById) { w=screen.availWidth; h=screen.availHeight; }
leftPos=(w-popW)/2, topPos=(h-popH)/2; popDimensions='width='+popW+',height='+popH+',left='+leftPos+',top='+topPos;
if (urlToCenter != null){ winner=window.open(urlToCenter,centeredWinName,popDimensions); return winner; }
}

function getFlash(ef){ //{ movie:'', w:'', h:'', bgcolor:'', base:'', vars:'' }
ef.w=(ef.w==null)?'590':ef.w; ef.h=(ef.h==null)?'450':ef.h;
flashstr='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+_proto+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ef.w+'" height="'+ef.h+'"><param name="movie" value="'+ef.movie+'"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="opaque">';
if (ef.base!=null){flashstr+='<param name="base" value="'+ef.base+'">'; }
if (ef.bgcolor!=null){flashstr+='<param name="bgcolor" value="'+ef.bgcolor+'">'; }
if (ef.vars!=null){flashstr+='<param name="flashvars" value="'+ef.vars+'">'; }
flashstr+='<embed src="'+ef.movie+((ef.vars!=null)?'?'+ef.vars:'')+'" menu="false" quality="high" pluginspage="'+_proto+'www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ef.w+'" height="'+ef.h+'" swLiveConnect="true" wmode="opaque"';
if (ef.base!=null){flashstr+=' base="'+ef.base+'"'; }
if (ef.bgcolor!=null){flashstr+=' bgcolor="'+ef.bgcolor+'"'; }
if (ef.vars!=null){flashstr+=' FlashVars="'+ef.vars+'"'; }
flashstr+='></embed></object>';
return flashstr;
}

function writePositioned(_code,_left,_top,_width,_height){
document.writeln('<div style="position:relative; height:1px; overflow:visible;">\
<div style="position:absolute; left:'+_left+'px; top:'+_top+'px; width:'+_width+'px; height:'+_height+'px; overflow:hidden;">'+_code+'</div></div>');
}

var today=new Date(); var xml=''; var _timeflip=false;
function getToday(){
if (params(location.search,'time','')!=''){
today=new Date(params(location.search,'time')); document.cookie='time='+today+'; path=/;';
document.writeln('<div style="position:absolute; top:0px; left:0px; width:250px; height:16px; font:bold 11px arial; color:white; background:#072B5E; border:1px solid white; overflow:hidden; z-index:100;">&nbsp; time: '+today.toString()+'</div>');
} else if (params(document.cookie,'time','')!=''){ today=new Date(params(document.cookie,'time'));
document.writeln('<div style="position:absolute; top:0px; left:0px; width:250px; height:16px; font:bold 11px arial; color:white; background:#072B5E; border:1px solid white; overflow:hidden; z-index:100;">&nbsp; time: '+today.toString()+'</div>');
} else { document.writeln('<scr'+'ipt language="javas'+'cript" src="http://dolutils.go.com/dolutils/tv/funct'+'ions?vars=today"></scr'+'ipt>'); }
}

function doTimeShift(){ //USAGE= doTimeShift(["July 4, 2005","alert('whatever')"], ["July 5, 2005","alert(today)"], ["July 6, 2005","alert('6th')"]);
for (tim=doTimeShift.arguments.length-1; tim>=0; tim--){
thistime=new Date(doTimeShift.arguments[tim][0]); offset=(today.toString().match(/(DT|Daylight)/gi)!=null)?7:8;
thistime.setHours(thistime.getHours()+(offset-(thistime.getTimezoneOffset()/60))); //ALL TIMES PACIFIC
if (today>=thistime){ eval(doTimeShift.arguments[tim][1]); _timeflip=true; break; }
}}

function flipCSS(){
styles=[ ["#SHOWER, #OLDER","display:none;"],["#STEALTH, #NEWER","display:block;"] ];
document.writeln('<style>');  for (sty in styles){ document.writeln(styles[sty][0]+'{ '+styles[sty][1]+' }'); }  document.writeln('</style>');
}

function setShowHide(dt,id,act){ //setShowHide("February 11, 2006 0:01","RERUNS","hide")
notyet='none'; nowisok='block'; try{ if (act.match(/(0|hid|none)/gi)!=null){ notyet='block'; nowisok='none'; }}catch(ssh){}
document.writeln('<style>#'+id+'{ display:'+((today<new Date(dt))?notyet:nowisok)+' }</style>');
}

/*---XML IMPORT/PARSING FUNCTIONS---*/
isMacIE=(navigator.appName.indexOf('Microsoft')!=-1 && navigator.appVersion.indexOf('Mac')!=-1);
function gid(_id){ return document.getElementById(_id); }
function find(_wut,_tag){ _wut=_wut.replace(/\<\!\[CDATA\[/g,'').replace(/\]\]\>/g,''); f=0; output=[];
while (f!=-1){ f=_wut.indexOf('<'+_tag); if (_wut.charAt(f+1).match(/(\>| )/)==null){ f==-1; }
if (f!=-1){ endo=_wut.indexOf('</'+_tag); output[output.length]=_wut.substring(f+2+_tag.length,endo); _wut=_wut.substring(endo+2); }}
return output; }
function nval(_wut,_v){ try{ return ((navigator.appName=="Netscape")?_wut.textContent:((isMacIE)?_wut:_wut.text)); }catch(nov){ return ''; }}
function gtnexp(_wut,_tag){ return (_tag==null)?/<.{2,}>(.*)<\/.{2,}>/gi.exec(_wut)[1]:((!isMacIE)?_wut.match(new RegExp("<"+((_tag!=null)?_tag:'')+".*>(.*)</"+((_tag!=null)?_tag:'')+">","gi")):find(_wut,_tag)); }
function gtn(_wut,_tag,index){ rt=(isMacIE)?gtnexp(_wut,_tag):_wut.getElementsByTagName(_tag);
return ((rt.length>1)?((index!=null)?nval(rt[index]):rt):((rt.length==0)?'':((index!=null)?rt:nval(rt[0])))); }
function gtn0(_wut,_tag){ tempgtn=gtn(_wut,_tag); if (typeof(tempgtn)=='string'){ tempgtn=gtn(_wut,_tag,0); }  return tempgtn; }
function importXML(xmlobj){
srcID=xmlobj.srcID; _xmlfile=xmlobj.url; _xmlRtn=xmlobj.obj; _act=xmlobj.action;
if (gid(srcID).innerHTML==''){
if (document.implementation && document.implementation.createDocument){
xmlDoc=document.implementation.createDocument("","",null); xmlDoc.onload=function(){ eval(_xmlRtn+"=xmlDoc"); eval(_act); }
} else if (window.ActiveXObject){
xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.onreadystatechange=function(){ if (xmlDoc.readyState==4){ eval(_xmlRtn+"=xmlDoc"); eval(_act); }}
} else { return; }
xmlDoc.load(_xmlfile);
} else { eval(_xmlRtn+"=gid(srcID).innerHTML"); eval(_act); }
}
function paramsAtt(wut,att){ try{r=unescape(wut.match(new RegExp(att+"=(\"|\')([^&;\"]*)(\"|\')"))[2]);}catch(att){r='';} return r; }
function getAtt(_wut,_att){ return (!isMacIE)?_wut.getAttribute(_att):paramsAtt(_wut,_att); }
function getIndexByAttribute(_wut,_att,_val){ ri=-1; if (_wut.length>0){ for (i=0; i<_wut.length; i++){ if (getAtt(_wut[i],_att)==_val){ ri=i; break; }}} return ri; }
/*---END XML IMPORT/PARSING FUNCTIONS---*/

function rollins(e){ /*---ROLLOVER FUNCTIONS---*/
if (window.event) { thislink = window.event.srcElement; } else if (e.target) { thislink = e.target; } else { return; }
for (j=0;j<myArraySet.length;j++){ if (myArraySet[j][0]==thislink.id+'_over'){document.getElementById(thislink.id).src=myArraySet[j][1].src; break;}}}
function unrollins(e){
if (window.event) { thislink = window.event.srcElement; } else if (e.target) { thislink = e.target; } else { return; }
for (k=0;k<myArraySet.length;k++){ if (myArraySet[k][0]==thislink.id){ document.getElementById(thislink.id).src=myArraySet[k][1].src; break;}}}
function rolloverInit(){
myArraySet=new Array(); myImages=new Array(); count=-1;
for (i=0;i<document.links.length;i++){
elk=document.links[i];
if (elk.id!=""){
bob=document.getElementById('i'+elk.id); unName=bob.src; count++;
c3=bob.src.replace(/_off\./gi,'_ovr.').replace(/_on\./gi,'_ovr.').replace(/-off\./gi,'-on.');
thisImage=new Image(); thisImage.src=c3; myArraySet[count]=new Array(bob.id+'_over',thisImage);
elk.onmouseover=rollins; count++; thisImage=new Image(); thisImage.src=unName; myArraySet[count]=new Array(bob.id,thisImage);elk.onmouseout=unrollins;
bob.src=c3; bob.src=unName; //FLIP REAL QUICK TO PRELOAD
}}}
