window.onerror=function(){ return true; };

try{ var addMe=(document.location.href.indexOf('.go.com')==-1)?'tsdev-studio.online.disney.com':'bventertainment.go.com'; }
catch(add){var addMe='tsdev-studio.online.disney.com';}
var _proto='http://';
try{ if (window.location.protocol == "https:"){ _proto='https://'; } } catch(lockpee){}
var root=_proto+addMe+'/tv/buenavista/ebertandroeper';

try{ _gpn=/([\w-~]*)(\.htm|$|\?|\#|\.cgi)/i.exec(location.href)[1]; } catch(pn){ _gpn='index'; } if (_gpn==""){_gpn="index";}
try{ _submlc=new RegExp("ebertandroeper(2|)(.*|)/"+_gpn,"i").exec(location.href)[2]; } catch(m){ _submlc=''; }
var _gmlc="/TVPlex/EbertAndRoeper"+_submlc;
var _gacct="DM510312C3MA38EN3;DM51030813MR38EN3;DM5103083LCA38EN3";
function hitIt(_hbpn,_hbmlc){
try{ hitbox.Set_hbPageView(_hbpn,_hbmlc,_gacct); }catch(hb){}
if (_hbpn=="playAdRefresh"){ ad_refresh(_hbmlc); }
}

document.writeln('<scr'+'ipt language="javascript" src="//studio.go.com/chrome/chrome.js"><\/scr'+'ipt>');

document.writeln('<scr'+'ipt language="javascript" src="'+_proto+'global.go.com/detect/scripts/master_flash_light.js"><\/scr'+'ipt>');

function writeEbertChrome(){
cWid='100%'; cBGcolor='#000000'; cTcolor='white';
cBreadcrumb='<a href="http://bventertainment.go.com" class="bcb">BV Entertainment</a> <a class="bc">&gt;</a> <a href="http://www.atthemoviestv.com" target="_top" class="bc">Ebert & Roeper</a>';
//writeNBChrome(cWid,cBGcolor,cBreadcrumb,cTcolor,true);
}

styles=[
[".subheader","background:#2b0301; font-family:arial; font-size:14px; color:#e4c498; font-weight:bold;"],
[".stateheader","color:#fcebd2; font-family:arial; font-size:16px; font-weight:bold;"],
[".even","background:#650a00;"],
[".odd","background:#3f0600;"],
[".text","font-family: verdana, helvetica; font-size:14px; font-weight:bold; color:#e4c498;"],
[".listing","font-family: verdana, helvetica; font-size:12px; font-weight:bold; color:#ffffff; padding:5px 0 5px 0;"],
[".padleft","padding-left:5px;"],
[".padright","padding-right:5px;"],
["a, a:link","color:#c88100;"],
[".footer","font-family: verdana, helvetica; font-size:9px; color:#9a6c41;"],
["input.field","font-family: verdana, helvetica; font-size:12px; color:#000000; width:140px;"]
];

document.writeln('<style>');  for (sty in styles){ document.writeln(styles[sty][0]+'{ '+styles[sty][1]+' }'); }  document.writeln('</style>');

function params(wut,qp,dflt){ dflt=(dflt==null)?'':dflt; try{r=unescape(wut.replace(new RegExp("&amp;","gi"),"&").match(new RegExp(qp+"=+([^&;]*)"))[1]);}catch(qp){r=dflt;} return r; }
function addZero(vNumber){ return ((vNumber<10)?"0":"")+vNumber; }
function gid(_id){ return document.getElementById(_id); }
function inner(_gid,_text){ gid(_gid).innerHTML=_text; }

function centerIt(popW,popH,urlToCenter,centeredWinName){
leftPos=(screen.availWidth-popW)/2; topPos=(screen.availHeight-popH)/2;
return window.open(urlToCenter,centeredWinName,"width="+popW+",height="+popH+",left="+leftPos+",top="+topPos+",statusbar=0,scrollbars=0")
}

function writePositioned(_code,_left,_top,_width,_height,_id){
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;" '+((_id==null)?'':'id="'+_id+'"')+'>'+_code+'</div></div>');
}

// link disclaimer
function popDisclaimer(url){
	win = window.open('http://bventertainment.go.com/tv/buenavista/ebertandroeper/disclaimer.html?'+ url, 'disclaimer', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=270');
	win.focus();
}
// end link disclaimer
function GOurl(url){ popDisclaimer(url); }

function $flash(ef){ //new $flash({ movie:'', w:'100%', h:'173', bgcolor:'', base:'', vars:'', id:'' }).render();
ef.w=(ef.w==null)?'590':ef.w; ef.h=(ef.h==null)?'450':ef.h; ef.id=(ef.id==null)?'flashmovie':ef.id; ef.wmode=(ef.wmode==null)?'opaque':ef.wmode;
sendback={}
flashstr='<object id="'+ef.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+_proto+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ef.w+'" height="'+ef.h+'"><param name="movie" value="'+ef.movie+((ef.vars!=null)?'?'+ef.vars:'')+'"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="'+ef.wmode+'"><param name="scale" value="noscale"><param name="allowScriptAccess" value="always"><param name="show" value="#ffffff">';
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 name="'+ef.id+'" id="'+ef.id+'" 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="'+ef.wmode+'" scale="noscale" allowScriptAccess="always"';
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>';
sendback.toString=function(){ return flashstr; }
sendback.render=function(){ document.writeln(flashstr); }
sendback.inner=function(targetgid){ gid(targetgid).innerHTML=flashstr; }
return sendback;
}

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 writeHeader(hdr){
hvars='';
if (hdr!=null){
if (hdr.p!=null && hdr.p!=''){ hvars+="p="+hdr.p+"&"; }
if (hdr.t!=null && hdr.t!=''){ hvars+="t="+hdr.t+"&"; }
if (hdr.current_page!=null && hdr.current_page!=''){ hvars+="current_page="+hdr.current_page+"&"; }
if (hdr.s!=null){
hvars+="s="+hdr.s.replace(/<b>/gi,'').replace(/<\/b>/gi,'')+"&";
bstart=hdr.s.indexOf('<b>');
if (bstart!=-1){ bstop=hdr.s.replace(/<b>/gi,'').indexOf('</b>'); if (bstop!=-1){ hvars+="b="+bstart+"&e="+bstop; }}
}}
new $flash({ movie:root+'/topflash.swf', w:'100%', h:'163', base:root+"/", vars:hvars }).render();
}

function doTimeShift(){ //USAGE= doTimeShift(["July 4, 2005","alert('whatever')"], ["July 5, 2005","alert(today)"], ["July 6, 2005","alert('6th')"]);
offset=(today.toString().match(/(DT|Daylight|700)/gi)!=null)?7:8;
for (tim=doTimeShift.arguments.length-1; tim>=0; tim--){
thistime=new Date(doTimeShift.arguments[tim][0]+" GMT-0"+offset+"00");
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>');
}

function setScrollColor(_facecolor,_id){
faceup=''; facedown=''; _facecolor=_facecolor.replace(/\#/g,'');
R=parseInt(_facecolor.substring(0,2),16); G=parseInt(_facecolor.substring(2,4),16); B=parseInt(_facecolor.substring(4,6),16);
if(R<240){R+=16;} else if(R<255){R=255;} R=R.toString(16); R=(R.length==1)?R='0'+R:R;
if(G<240){G+=16;} else if(G<255){G=255;} G=G.toString(16); G=(G.length==1)?G='0'+G:G;
if(B<240){B+=16;} else if(B<255){B=255;} B=B.toString(16); B=(B.length==1)?B='0'+B:B;
faceup=''+R+G+B;
R=parseInt(_facecolor.substring(0,2),16); G=parseInt(_facecolor.substring(2,4),16); B=parseInt(_facecolor.substring(4,6),16);
if(R>15){R-=16;} else if(R>0){R=0;} R=R.toString(16); R=(R.length==1)?R='0'+R:R;
if(G>15){G-=16;} else if(G>0){G=0;} G=G.toString(16); G=(G.length==1)?G='0'+G:G;
if(B>15){B-=16;} else if(B>0){B=0;} B=B.toString(16); B=(B.length==1)?B='0'+B:B;
facedown=''+R+G+B;
document.writeln('<style>'+((_id==null)?'body':_id)+'{ scrollbar-shadow-color:#000000; scrollbar-track-color:#666666; scrollbar-3dlight-color:#666666; scrollbar-arrow-color:#ffffff; scrollbar-base-color:#000000; scrollbar-highlight-color:#'+faceup+'; scrollbar-darkshadow-color:#'+facedown+'; scrollbar-face-color:#'+_facecolor+'; }</style>');
}

function DoFlashDetection(){
CreateInterface(); DetectFlash("8",root+"/noflash.html");
}

var copyright = '&copy; Disney * ABC Domestic Television. All rights reserved.'

function writePrivacy(elcolor,txtcolor){
elcolor=(elcolor==null)?'#c88100':elcolor;
document.writeln('<div align="center" style="font:11px verdana; color:'+((txtcolor==null)?'#fff':txtcolor)+'">');
document.writeln('<br><a href="https://register.go.com/studio/atthemovies/index" style="color:'+elcolor+';">Register</a> | <a href="https://register.go.com/studio/atthemovies/lists" style="color:'+elcolor+';">Guest Services</a> | <a href="http://bventertainment.go.com/tv/buenavista/ebertandroeper/registration_faq.html" style="color:'+elcolor+';" target="_blank">Help</a><br>');
writeNBFooterSmall(copyright,null,elcolor);
document.writeln('</div>');
}

function writeCopyright(elcolor,txtcolor){
elcolor=(elcolor==null)?'#c88100':elcolor;
document.writeln('<span style="font:11px verdana; color:'+((txtcolor==null)?'#fff':txtcolor)+'">');
document.writeln('<div align="center">'+ copyright +'</div>');
}

alwaysHideAds=false;
function writeBannerAd(){
if (window.location.protocol=="file:" || alwaysHideAds){
document.writeln('<img src="'+root+'/images/spacer.gif" width="728" height="90" border="0" alt=""><br>');
} else {
document.writeln('<a href="'+root+'/index.html"><img src="'+root+'/ads/728x90_rk-redesign.gif" width="728" height="90" border="0" alt="Check it out!  We redesigned our website! The new liveregisandkelly.com is here!"></a><br>');
}
}

function writeSkyscraperAd(){
if (window.location.protocol=="file:" || alwaysHideAds){
document.writeln('<img src="'+root+'/images/spacer.gif" width="160" height="600" border="0" alt=""><br>');
} else {

skyscraperads=[
'<a href="'+root+'/show_idea.html"><img src="'+root+'/ads/160x600_great-idea-for-show.gif" width="160" height="600" border="0" alt="Have a great idea for the show? Click here to tell us about it."></a>',
'<a href="'+root+'/hostchat.html"><img src="'+root+'/ads/160x600_great-live-moments.gif" width="160" height="600" border="0" alt="Great Live Moments - Relive them today! Host Chat Central!"></a>'
];

try{ adindy=(location.href.match(/(get_tickets|local_listings|recipes)/gi)!=null)?0:1; }catch(ai){ adindy=0; }
document.writeln(skyscraperads[adindy]+'<br><br><br>');

}
}

function writeSquareAd(){
if (window.location.protocol=="file:" || alwaysHideAds){
document.writeln('<img src="'+root+'/images/spacer.gif" width="300" height="250" border="0" alt=""><br>');
} else {

squareads=[
'<a href="'+root+'/show_idea.html"><img src="'+root+'/ads/300x250_great-idea-for-show.gif" width="300" height="250" border="0" alt="Have a great idea for the show? Click here to tell us about it."></a>',
'<a href="'+root+'/hostchat.html"><img src="'+root+'/ads/300x250_great-live-moments.gif" width="300" height="250" border="0" alt="Great Live Moments - Relive them today! Host Chat Central!"></a>',
'<a href="http://disneyparks.disney.go.com/" target="_blank"><img src="'+root+'/ads/300x250-disneyparks-family.gif" width="300" height="250" border="0" alt="Discover your dream. DisneyParks.com"></a>',
'<a href="http://disneyparks.disney.go.com/" target="_blank"><img src="'+root+'/ads/300x250-disneyparks-woody.gif" width="300" height="250" border="0" alt="Discover your dream. DisneyParks.com"></a>',
'<a href="javascript:recipes();"><img src="'+root+'/ads/300x250_recipe-archive.gif" width="300" height="250" border="0" alt="Recipe Archive - Click here to see what\'s cookin\'"></a>'
];

try{
if (location.href.match(/(regis\.|room=regis|kelly_trivia)/gi)!=null){ adindy=3; }
else if (location.href.match(/(kelly\.|room=kelly|regis_trivia|regis_music)/gi)!=null){ adindy=2; }
else { adindy=4; }
}catch(ai){ adindy=4; }
document.writeln(squareads[adindy]);

}
}

states=["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District of Columbia", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming" ];
daysOfWeek=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
monthsOfYear=["January","February","March","April","May","June","July","August","September","October","November","December"];


function boxIt(_id,_shade,_wide){

_shade=(_shade==null)?'dark':_shade;  _bgcolor=(_shade=='dark')?((_wide)?'#EDEDED':'#f0f1f1'):'#f9f9f9'; _width=(_wide)?'712':'445';

output='<table width="100%" border="0" cellspacing="0" cellpadding="0">\
<tr><td colspan="3"><img src="'+root+'/images/'+_shade+'-box'+((_wide)?'-wide':'')+'_top.gif" alt="" border="0"></td></tr>\
<tr><td style="background:url('+root+'/images/'+_shade+'-box'+((_wide)?'-wide':'')+'_left.gif) repeat-y; width:10px;"><spacer/></td><td bgcolor="'+_bgcolor+'" width="'+_width+'">';
output+=gid(_id).innerHTML;
output+='</td><td style="background:url('+root+'/images/'+_shade+'-box'+((_wide)?'-wide':'')+'_right.gif) repeat-y; width:10px;"><spacer/></td></tr>\
<tr><td colspan="3"><img src="'+root+'/images/'+_shade+'-box'+((_wide)?'-wide':'')+'_bottom.gif" alt=""></td></tr></table>';
inner(_id,output);

}


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
}}}


function ad_refresh(hbmlc){
var cb=Math.round(Math.random()*10000000000);
try{ document.getElementById("ad_728x90").src="http://3ps.go.com/DynamicAd?srvc=bvtv&itype=Banner&url="+hbmlc+"?rand="+cb; }catch(e){}
try{ document.getElementById("ad_160x600").src="http://3ps.go.com/DynamicAd?srvc=bvtv&itype=Skyscraper&url="+hbmlc+"?rand="+cb; }catch(e){}
try{ document.getElementById("ad_300x250").src="http://3ps.go.com/DynamicAd?srvc=bvtv&itype=Rectangle&url="+hbmlc+"?rand="+cb; }catch(e){}
}
// id in getElementById matches the iframe id being refreshed
