function handleError() { return true; }  window.onerror=handleError;
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); }
function addZero(vNumber){ return ((vNumber<10)?"0":"")+vNumber; }

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" ];
var flipper=false;

function popGame(){ game=centerIt(505,425,'game/index.html','millionairetv_game'); }

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+',scrollbars=0,statusbar=0';
if (urlToCenter != null){ winner=window.open(urlToCenter,centeredWinName,popDimensions); return winner; }
}

cWid='770'; cColor='002d6c';
cBreadcrumb='<a href="http://bventertainment.go.com" class="bcb">BV Entertainment</a> <a class="bc">&gt;</a> <a href="http://millionairetv.com/" target="_top" class="bc">Who Wants to Be a Millionaire</a>';
fCopyright='&copy; Valleycrest Productions Ltd. and Buena Vista Television'; fFont='<FONT face="verdana, helvetica, arial" size="1" color="#ffffff">'; fColor='#35CEF7';

//hitbox vars
var _gmlc="/TVPlex/millionaire"; var _gacct="DM510312C3MA38EN3;DM51030813MR38EN3;DM5103083LCA38EN3";
var _gpn = document.location.href.substring(document.location.href.lastIndexOf("/")+1,document.location.href.lastIndexOf("."));
if (_gpn==""){_gpn="index";}

function writeFooter(){
document.writeln('<br><div style="position:relative; width:770px; height:45px;">\
<div style="position:absolute; left:0px; top:18px; width:770px; height:1px; background-color:#35CEF7;"><spacer/></div>\
<div style="position:absolute; left:215px; top:0px; width:340px; height:36px; overflow:hidden; background-color:#00417d; color:#35CEF7; border:1px solid #35CEF7;"><div style="margin-top:-14px;">');
writeNBFooterSmall(fCopyright,fFont,fColor);
document.writeln('</div></div><br></div>');
}

function rollins(e){
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,'-on.'); //OR WHATEVER YOUR IMAGE ROLLOVER NAME VARIATION IS
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;
}}}

function GOurl(url) {
height=170;
if (navigator.appName == "Netscape"){ height+=13;}
var pip=window.open("","disclaimer","width=350,height="+height+",top=1,left=1,screenX=1,screenY=1,statusbar=0,scrollbars=0"); pdiddy=pip.document;
pdiddy.write('<html><head><title>Disclaimer</title>');
pdiddy.write('<scr'+'ipt type="text/javascript" language="javascript">');
pdiddy.write('sendTimer = setTi'+'meout("sendToClientSide()",1500);closeTimer = setTi'+'meout("window.close()",15000);');
pdiddy.write('function sendToClientSide(){window.open("'+url+'");}');
pdiddy.write('</scr'+'ipt></head>');
pdiddy.write('<body bgcolor="black" text="#ffffff" link="#ff9900" vlink="#ff9900" alink="#ffb920" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/disclaimer-bg.jpg">');
pdiddy.write('<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" style="border:2px solid #6ABDE7;"><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="8"><tr><td><p align="justify" style="margin-top:10px"><font style="font:bold 11px arial,helvetica;">The web site you are about to link to is not controlled by "Who Wants to Be a Millionaire" and different terms of use and privacy policy will apply. By proceeding you agree and understand that "Millionaire" is not responsible for the site you are about to access.<br><div style="height:15px"><block type="spacer" width="1" height="1"><br></div>If your page does not load within a few seconds, please <nobr><a href="javascript:sendToClientSide();">click here</a> </nobr>to open it.<div align="center" style="font:bold 10px arial; margin-top:10px;"><a href="javascript:window.close();">close this window</a></div></td></tr></table></td></tr></table></body></html>');
pdiddy.close();
}

function writeNav(loc){
if (_gpn!='index'){
document.writeln('<a href="index.html"><img src="images/nav-logo.jpg" width="182" height="183" border="0" alt="Who Wants To Be A Millionaire"></a><br>');
} else {
document.writeln('<div style="height:5px;"><spacer/></div>');
document.writeln('<img src="images/nav-logo.jpg" width="182" height="183" border="0" alt="Who Wants To Be A Millionaire"><br>');
}
document.writeln('<a href="javascript:popGame();" id="online"><img id="ionline" src="images/nav-online-off.jpg" width="182" height="25" border="0" alt="Play Online"></a><br>');
if (_gpn!='tunein' && loc!='index'){
document.writeln('<a href="tunein.html" id="tunein"><img id="itunein" src="images/nav-tunein-off.jpg" width="182" height="29" border="0" alt="Tune-In"></a><br>');
} else {
document.writeln('<img src="images/nav-tunein-on.jpg" width="182" height="29" border="0" alt="Tune-In"><br>');
}
document.writeln('<a href="tickets.html" id="tickets"><img id="itickets" src="images/nav-tickets-off.jpg" width="182" height="29" border="0" alt="Tickets"></a><br>\
<a href="tickets.html" id="auditions"><img id="iauditions" src="images/nav-auditions-off.jpg" width="182" height="26" border="0" alt="Auditions"></a><br>\
<img src="images/nav-bottom.jpg" width="182" height="152" border="0" alt=""><br>');
rolloverInit();
}

function writeItemTitle(title){
document.writeln('<div style="position:relative; height:16px;">\
<div style="position:absolute; left:0px; top:8px; width:530px; height:1px; background-color:#35CEF7;"><spacer/></div>\
<div style="position:absolute; left:0px; top:0px; width:530px; height:16px; overflow:hidden;" align="left">\
<b style="background-color:#01619D; color:#35CEF7; padding-left:1px;">'+title+'&nbsp;</b></div><br></div><div style="height:5px;"><spacer/></div>');
}

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>');
}

function writeCSS(){
styles=[
["body","margin:0px 0px 10px 0px; padding:0px; background-color:#0A3D7C; text-align:center;"],
["td","vertical-align:top; font:12px arial,helvetica; color:white;"],
[".list","padding:0px; margin:2px 0px 2px 18px;"],
[".blue","color:#35CEF7;"],
[".clr","color:#F1E6B0;"],
["#WRAPPER","background-color:#01619D;"],
["#CONTENT","padding:0px 20px 20px 20px; text-align:left;"],
["#CONTENT a","color:#35CEF7;"],
["#CONTENT a:hover","color:#55eeff;"],
["#STEALTH, #NEWER","display:none;"], ["#SHOWER, #OLDER","display:block;"],
["#paddle","padding-left:20px;"]
];
document.writeln('<style name="stylish" id="stylish">');  for (sty in styles){ document.writeln(styles[sty][0]+'{ '+styles[sty][1]+' }'); }  document.writeln('</style>');
}

var today=new Date(); var xml='';
function getToday(){ document.writeln('<scr'+'ipt language="javas'+'cript" src="http://register.go.com/regisandkelly/func'+'tions?vars=today"></scr'+'ipt>'); }
function doTimeShift(){ //USAGE= doTimeShift(["July 4, 2005","alert('whatever')"], ["July 5, 2005","alert(today)"], ["July 6, 2005","alert('6th')"]);
if (params(location.search,'time','')!=''){
today=new Date(params(location.search,'time'));
document.writeln('<div style="position:absolute; top:0px; left:0px; width:210px; height:16px; font:bold 11px arial; color:white; background:#33333F; border:1px solid white; overflow:hidden;">&nbsp; time: '+today.toString()+'</div>');
}
for (tim=doTimeShift.arguments.length-1; tim>=0; tim--){
thistime=new Date(doTimeShift.arguments[tim][0]); thistime.setHours(thistime.getHours()+(8-(thistime.getTimezoneOffset()/60))); //ALL TIMES PACIFIC
if (today>=thistime){ eval(doTimeShift.arguments[tim][1]); _timeflip=true; break; }
}}

function writePhotos(_which){
switch(_which){
case 'tickets': document.writeln('<img src="images/tickets-title.gif" width="425" height="44" border="0" alt="About the Show - Request Tickets"><br><img src="images/tickets-photo.gif" width="425" height="110" border="0" alt="">'); break;
case 'auditions': document.writeln('<img src="images/auditions-title.gif" width="425" height="44" border="0" alt="About the Show - Be a Contestant"><br><img src="images/auditions-photo.gif" width="425" height="110" border="0" alt="">'); break;
default: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){
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>');
}