var sweepssubpath="snoglobetriviaagogo";
var sweepsname="Live\'s Sno Globe Trivia A Go Go Sweepstakes";
var date18="December 26, 2008";
var datend="February 16, 2009";

thisMLC=_gmlc+'/contests/'+sweepssubpath;
templatedate=new Date();

styles=[
["fieldset","border:1px solid #516C7D; width:400px;"],
["legend, .butter, .overbutter","font:bold 12px arial;"],
["legend","color:#EE7000;"],
[".error","font:bold 16px arial; color:#EE7000;"],
["body","color:#3963a4;"],
["#MANDY","font-size:11px; padding-top:20px;"],
["#loginbutton, #enterbutton","width:100px;"]
];
document.writeln('<style>');  for (sty in styles){ document.writeln(styles[sty][0]+'{ '+styles[sty][1]+' }'); }  document.writeln('</style>');

rulesURL="http://bventertainment.go.com/tv/buenavista/regisandkelly/contests/"+sweepssubpath+"/rules.html";
thisHeader={ t:sweepsname, s:"" , w:530, h:70 };
returntohomepage='<a href="http://liveregisandkelly.com/">Return to the <b>"Live with Regis and Kelly"</b> homepage</a><br><br><br><br><br>';

function goRules(){ window.location.href=rulesURL; }

function writeTravelTriviaTop(){
}


entryCopy='<img src="http://bventertainment.go.com/tv/buenavista/regisandkelly/contests/snoglobetriviaagogo/images/SnoGlobeTrivia145x110.jpg" width="145" height="110" border="0" align="right" style="margin:0 0 10px 10px;" alt="">\
Complete the following online entry form for a chance to play \
<b>'+sweepsname+'!</b> \
If your name is randomly selected you may be called to answer a trivia question for a chance to win a prize valued up to $22,000! Remember you must be at least 18 years of age or older as of <b>the date of entry</b> to enter. Only one online entry per user per day. All online entries must also be received by 12 noon ET February 16th, 2009.\
<br/><a href="javascript:goRules()">Click here for the official rules.</a><br><br><br>';

entryCopyLogged='<img src="http://bventertainment.go.com/tv/buenavista/regisandkelly/contests/snoglobetriviaagogo/images/SnoGlobeTrivia145x110.jpg" width="145" height="110" border="0" align="right" style="margin:0 0 10px 10px;" alt="">\
Complete the following online entry form for a chance to play \
<b> Live’s Sno Globe Trivia A Go Go!</b> \
If your name is randomly selected you may be called to answer a trivia question for a chance to win a prize valued up to $22,000! Remember you must be at least 18 years of age or older as of <b>the date of your entry</b> to enter. Only one online entry per user per day. All online entries must also be received by 12 noon ET February 16th, 2009.\
<br/><a href="javascript:goRules()">Click here for the official rules.</a><br><br><br>';

successCopy='<b>Thanks for entering '+sweepsname+'<br>\
You can enter once a day through February 16th!\
</b><br><br><br><br>\
'+returntohomepage;

mandatory='<span style="font-size:9pt;"><b>NO PURCHASE NECESSARY.</b> Void in Quebec and where prohibited. Open to permanent legal residents of the fifty states of the U.S., D.C. and Canada (excluding Quebec), who are 18 years of age or older as of <b>the date of entry</b>. Entries must be received by 12:00 P.M. (ET) on 2/16/09. For details/Official Rules\
<a href="javascript:goRules()"> click here</a>.  Prize restrictions apply.</span>';

loginbutton='<input type="submit" value="LOG-IN >>" class="butter" id="loginbutton" onmouseover="this.className=\'overbutter\'" onmouseout="this.className=\'butter\'">';
enterbutton='<input type="submit" value="SUBMIT" class="butter" id="enterbutton" onmouseover="this.className=\'overbutter\'" onmouseout="this.className=\'butter\'">';

function writeText(_text){
switch(_text){
case 'LOGGED_IN':
document.writeln(entryCopyLogged);
break;
case 'NOT_LOGGED_IN':
document.writeln(entryCopy);
document.writeln('You need to be a registered <b>"Live with Regis and Kelly"</b> user before entering this sweepstakes.');
break;
case 'REQUIRED_FIELDS':
document.writeln('Phone numbers submitted for <b>Live\'s Sno Globe Trivia A Go Go Sweepstakes</b> will be used exclusively for contacting <b>Live\'s Sno Globe Trivia A Go Go Sweepstakes</b> participants. The phone numbers will NOT be shared or used for any purpose beyond <b>Live\'s Sno Globe Trivia A Go Go Sweepstakes.</b>');
break;
case 'SUCCESS':
document.writeln(successCopy);
break;
case 'FAMILY_OF_SITES':
document.writeln('<span style="font-size:11px;">(<b>**Note:</b> If you are already registered at LiveRegisandKelly.com, ABC.com, ABCNEWS.com, ESPN.com, FamilyFun.com, Movies.com, or Disney Online, you may use your existing Member ID and Password. You do NOT have to re-register... just login with your Member ID and password.)</span><br>');
break;
case 'CLICK_HERE_TO_REGISTER':
document.writeln('<b>Not yet registered? <a href="../../index?appRedirect=sweeps/'+sweepssubpath+'/index">CLICK HERE</a></b>');
default:break;
}
}


function writeErrorMsg(irma){
document.writeln('<div align="center">');
switch(irma){
case 'ALREADY_ENTERED_IN_TIMEUNIT':
document.writeln('<div class="error">Sorry but you\'ve already entered today.</div><br><span style="font-size:12px">You can enter <b>Live\'s '+sweepsname.replace(/ Sweepstakes/,"")+'</b><br>once per day through noon ET on '+datend+'.<br><br></span>'); break;
case 'EARLY':
document.writeln('<div class="error">SORRY!</div><br><b>'+sweepsname+'</b> has not yet started.<br>  Please return <b>'+date18+'</b> to enter for your chance to win.'); break;
case 'OVER':
document.writeln('<div class="error">SORRY!</div><br>Online entry in <b>'+sweepsname+'</b> is now closed.'); break;
case 'INVALID_AGE':
document.writeln('<div class="error">SORRY!</div><br>You must be at least 18 years of age to enter <b>'+sweepsname+'</b>.'); break;
case 'QUEBEC':
document.writeln('<div class="error">SORRY!</div><br><b>LIVE\'s '+sweepsname+'</b> is not open to residents of Quebec.<br><br><a href="../../update?appRedirect=sweeps/'+sweepssubpath+'/index">Verify/Update address information</a>'); break;
default:break;
}
document.writeln('<br><br>'+returntohomepage+'</div>');
}


function checkStuff(me) {
eee=[
["line1", "Please confirm your address."],
["city", "Please confirm your city."],
["stateProvince", "Please confirm your state."],
["postalCode", "Please confirm your zip code."],
["phonenumber", "Please type in your phone number."]
];
for (cc=0; cc<eee.length; cc++){
elle=me.elements[eee[cc][0]];
if (((elle.type=="text" || elle.type=="textarea" || elle.type=="file") && elle.value=='') || (elle.type=="select-one" && elle.selectedIndex==0)){
alert(eee[cc][1]); elle.focus(); return false;
}}

stripped=me.value.value.replace(/[\(\)\.\-\ ]/g,'');
if (!(!isNaN(parseInt(stripped)) && stripped.length==10)){ alert('Please check your phone numbers for errors. Suggested format: XXX-XXX-XXXX'); me.value.focus(); return false; }

return true;
}

function writeTopAd(){
document.writeln('<IFRAME SRC="https://3ps.go.com/DynamicAd?srvc=bvtv&itype=Banner&url=*/regisandkellysecure/*&secure=true" border="0" width="728"height="90" SCROLLING="NO" FRAMEBORDER="0" MARGINHEIGHT="0"MARGINWIDTH="0"></IFRAME>');
}
function writePosterAd(){
document.writeln('<IFRAME SRC="https://3ps.go.com/DynamicAd?srvc=bvtv&itype=Skyscraper&url=*/regisandkellysecure/*&secure=true" border="0" width="160"height="600" SCROLLING="NO" FRAMEBORDER="0" MARGINHEIGHT="0"MARGINWIDTH="0"></IFRAME><br><br>');
}