//if (location.href.match(/cgi/gi)!=null){ location.replace("http://bventertainment.go.com/tv/buenavista/regisandkelly/index.html"); }

thisMLC=_gmlc+'/Contests/HalloweenCostume';
thisHeader={ t:"Halloween Costume Photo Contest", s:"Spooky!" };

styles=[
["#HALLOWEENDIV","background:#FFB600; border:2px outset #F5F887; color:black;"],
["#HALLOWEENDIV div, #HALLOWEENDIV td, #HALLOWEENDIV input, #HALLOWEENDIV textarea, #HALLOWEENDIV select","color:black;"],
["#HALLOWEENDIV a","color:#943900;"]
];
document.writeln('<style>');  for (sty in styles){ document.writeln(styles[sty][0]+'{ '+styles[sty][1]+' }'); }  document.writeln('</style>');

eee=[
["Name", "Please type in your name."],
["street", "Please type in your street address."],
["city", "Please type in your city."],
["state", "Please select your state or province."],
["zip", "Please type in your zip or postal code."],
["daytime_phone", "Please type in your daytime phone number."],
["evening_phone", "Please type in your evening phone number."],
["E-Mail", "Please type in your e-mail address."],
["MESSAGE", "Please tell us about your costume."],
["file", "Please attach your photo."]
];

doEmailCheck=true;

introCopy='Do you love Halloween?  Do you think you\'ve worn the best costume ever?  Well now\'s your chance to have it seen on our show.  Send us a picture of your favorite costume!  We\'ll be showing some of the best on our show the week of October 23rd, and will give our viewers the chance to vote for the top 10 entries.  Three lucky winners will be flown to New York and brought to our very studio where they\'ll be eligible to enter our annual LIVE Halloween Costume Photo Contest.  Does your costume have what it takes to impress our viewers?\
<br><br>\
"Live with Regis and Kelly" accepts the following formats for photo submission. Please follow these format and size recommendations carefully and properly attach your files to your entry:\
<ul class="even">\
<li>Format your digital photo as a .JPG or .GIF.\
<li>The size of your formatted photo file should be 100K or smaller.\
<li><b>Photos will NOT be returned.</b>\
</ul>';

lowerCopy='<div style="height:1px; background-color:#1F3984;"><spacer/></div><br>\
"Live With Regis And Kelly" can provide no further technical support and accepts no responsibility for insuring the receipt of your e-mail and photo.  Submissions become the property of "Live" and may be broadcast on the air.<br>';

/*---VOTING STUFF---*/
votebase="costume";

var entrants=[
["chiara-abbriano", "Chiara Abbriano", "Twain Harte, California", 400, 400],
["cell-davis", "Cell Davis", "Yorkton, Saskatchewan", 400, 262],
["hope-foley", "Hope Foley", "Hawthorne, New Jersey", 268, 400],
["kathy-hanson", "Kathy Hanson", "Dover, New Hampshire", 300, 400],
["evan-killeen", "Evan Killeen", "Lincoln, Nebraska", 312, 400],
["ryan-lee", "Ryan Lee", "Atlanta, Georgia", 189, 400],
["chuck-lewis", "Chuck Lewis", "Jacksonville, Florida", 268, 400],
["nicholas-lorenzini", "Nicholas Lorenzini", "Palm Bay, Florida", 400, 310],
["stan-madray", "Stan Madray", "Orlando, Florida", 280, 400],
["sergio-santoianni", "Sergio Santoianni", "Maple, Ontario", 400, 236]
];

styles=[
["form","padding:0px; margin:0px;"],
["#pl","padding-left:5px;"],
["#f14","font-size:14px;"],
["#f16","font-size:16px;"],
["#datetable td","padding:8px; font:12px arial; color:#001467; vertical-align:top;"],
[".main a","color:#7A558A; padding:0 2px 0 2px;"],
[".main a:hover","color:#6A457A; background:#d4e2eF;"],
[".butter","font:bold 12px arial;"],
[".overbutter","font:bold 12px arial;"]
];
document.writeln('<style>');  for (sty in styles){ document.writeln(styles[sty][0]+'{ '+styles[sty][1]+' }'); }  document.writeln('</style>');

function writeEntryCopy(){
document.writeln('It\'s up to you, America! These are our Halloween Costume Finalists.  Now it\'s time for you to choose our lucky winner!  After reviewing each of the 10 costume photos below, you must choose your <b>three (3) favorites</b> to vote for!<br><br>\
\
Here\'s how to vote: Select your three (3) favorite costumes by checking the box underneath their pictures <br>(<img src="https://tvplex.go.com/buenavista/regisandkelly/contests/images/checkbox.gif" alt="" border="0" align="absmiddle"> Contestant\'s Name).  <b>After you\'ve picked your three (3) favorites</b>, click the VOTE NOW button. <b>You must click VOTE NOW at the bottom of the page to register your vote.</b><br><br>');
}

function writeSuccess(){
document.writeln('<div align="center"><span style="font-size:16px;"><b>Thanks for voting!</b></span><br><br>Be sure to tune in to "Live with Regis and Kelly"<br> <b>Monday, October 30th</b><br> as we announce our 3 Halloween Costume Finalists!<br><br><br><br><a href="http://liveregisandkelly.com">Return to the <b>LIVE with Regis and Kelly</b> homepage</a><br></div>');
}
function writeAlreadyTaken(){
document.writeln('<div align="center"><span style="font-size:16px;"><b>Thanks!</b></span><br><br>You\'ve already voted, but be sure to tune in to "Live with Regis and Kelly"<br> <b>Monday, October 30th</b><br> as we announce our 3 Halloween Costume Finalists!!<br><br><br><br><a href="http://liveregisandkelly.com">Return to the <b>LIVE with Regis and Kelly</b> homepage</a><br></div>');
}


function writeNotLoggedIn(){
document.writeln('<br>It\'s up to you America! It\'s time for you to choose our lucky winner!  Login or register and cast your vote!<br><br><br><br>');
}

numsel=0; numberToSelect=3;
function setChoice(_num){
if (gid(votebase+_num).checked==true){ numsel++;} else { numsel--;}
if (numsel==numberToSelect){ gid('SUBMIT').disabled=false; gid('SUBMIT').style.color='black'; gid('NOTYET').style.visibility='hidden'; }
else { gid('SUBMIT').disabled=true; gid('SUBMIT').style.color='#666'; gid('NOTYET').style.visibility='visible'; }
}

function popPhoto(pic,w,h,_name){
elliot=centerIt(w,h+14,'','_blank');
elliot.document.writeln('<html><head><title>'+_name+'</title><style>td{font-family:arial,helvetica; font-size:10px; font-weight:bold;}</style></head><body bgcolor="#B4D4FA" text="#6192D4" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><img src="images/'+pic+'-lg.jpg" alt=""><br><table width="100%" border="0" cellspacing="0" cellpadding="1"><tr><td>&nbsp;</td><td align="right"><a href="javascript:window.close()">close window</a>&nbsp;</td></tr></table></body></html>');
elliot.document.close();
}


function writeForm(){
//document.writeln('<div align="center"><b>Click a photo to see the full version</b></div>');
document.writeln('<table align="center" id="datetable">');

for (d=1; d<=entrants.length; d++){
if (d%2==1){ document.writeln('<tr>'); }
document.writeln('<td bgcolor="'+((d==1 || d==4 || d==5 || d==8 || d==9)?'#000000':'#efa600')+'">\
<div id="pl" style="color:'+((d==1 || d==4 || d==5 || d==8 || d==9)?'#ffffff':'#000000')+'"><b id="f16">'+entrants[d-1][1]+'</b><br><b>Hometown:</b> '+entrants[d-1][2]+'<br></div>\
<a href="javascript:popPhoto(\''+entrants[d-1][0]+'\','+entrants[d-1][3]+','+entrants[d-1][4]+',\''+entrants[d-1][1]+'\')"><img src="'+_imgroot+'/'+entrants[d-1][0]+'.jpg" width="200" height="200" border="0" alt=""></a><br>\
</td>');
if (d%2==0){ document.writeln('</tr>'); }
}

document.writeln('</table><br><br>');
document.writeln('<form name="voteform" action="index" method="post">\
<table cellspacing="0" cellpadding="10" align="center"><tr>');

for (d=1; d<=entrants.length; d++){
mi=addZero(d);
document.writeln('<td align="center" width="20%"><img src="'+_imgroot+'/'+entrants[d-1][0]+'-sm.jpg" width="50" height="50" border="0" alt="" style="border:1px solid #8f4600;"><br><input type="checkbox" name="'+votebase+mi+'" id="'+votebase+mi+'" value="Y" onclick="setChoice(\''+mi+'\')"><label for="'+votebase+mi+'"><b>'+entrants[d-1][1].substring(0,entrants[d-1][1].indexOf(' '))+'</b></label></td>');
if (d==5){ document.writeln('</tr><tr>'); }
}

document.writeln('</tr></table>\
<div align="center" style="font:bold 14px arial;" id="NOTYET">Please select your three favorite costumes before voting.</div><br>\
<div align="center"><input type="SUBMIT" name="SUBMIT" id="SUBMIT" value="VOTE NOW" style="font:bold 14px arial; width:210px; height:24px; color:#666;" class="input" disabled></div></form>');
document.writeln('<br><br><div align="center"><b><i><a href="http://bventertainment.go.com/tv/buenavista/regisandkelly/contests/halloweencostume/rules.html">CLICK HERE FOR OFFICIAL RULES</a></i></b></div>');
}

function writeVoteHeader(){
document.writeln('<div align="center"><img src="'+_imgroot+'/header.jpg" width="550" height="75" border="0" alt="Live\'s Halloween Costume Photo Contest"></div><br>');
}


function clearAll(){ for (d=1; d<=entrants.length; d++){ gid(votebase+addZero(d)).checked=false; }}


var _proto='http://'; try{ if (window.location.protocol == "https:"){_proto='https://'; } } catch(rudy){}
_imgroot=_proto+"bventertainment.go.com/tv/buenavista/regisandkelly/contests/halloweencostume/images";