- Sep 25, 2001
- 29,391
- 2,738
- 126
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<meta property="fb:admins" content="557226013"/>
<meta property="og:type" content="website" />
<meta property="og:site_name" content="My Coke Rewards" />
<meta property="og:title" content="Coke Zero" />
<meta property="og:image" content="http://www.mycokerewards.com/images/theme/mcr_logo.gif" />
<title>Coke Zero</title>
<script src="/js/jquery1.8.0.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui.js"></script>
<script type="text/javascript" src="/js/jquery.validate.min.js"></script>
<script src="/js/swfobject.js" type="text/javascript"></script>
<script src="/js/jquery.countdown.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery.simplemodal.1.4.3.min.js"></script>
<script src="/js/jquery.jcarousel.min.js" type="text/javascript"></script>
<script src="/js/jquery.marquee.js" type="text/javascript"></script>
<script src="/js/modernizer.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/flex-mod/desktop/cokezero/common/cokeZero.js"></script>
<script type="text/javascript">
var systemTimeInMillis = 1393285547685;
var systemTimeInMilliseconds = new Date(1393285547685);
var gameState = initGameState();
var testState = "unlocked";
gameState.setState('LOCKED');
testState = 'LOCKED';
function getTs(){
return new Date(1392642047685);
}
function initGameState(){
var internalState = null;
returnObject = {};
returnObject.getState = function() {
return internalState;
};
returnObject.setState = function(state){
switch(state){
case 'LOCKED':
case 'UNLOCKED':
case 'GAME_OVER':
internalState = state;
break;
default:
internalState = 'UNLOCKED';
}
};
returnObject.setLocked = function(){returnObject.setState('LOCKED');};
returnObject.setUnlocked = function(){returnObject.setState('UNLOCKED');};
returnObject.setGameOver = function(){returnObject.setState('GAME_OVER');};
returnObject.isLocked = function(){
if(returnObject.getState() == 'LOCKED'){
return true;
}
return false;
};
returnObject.isUnlocked = function(){
if(returnObject.getState() == 'UNLOCKED'){
return true;
}
return false;
};
returnObject.isGameOver = function(){
if(returnObject.getState() == 'GAME_OVER'){
return true;
}
return false;
};
return returnObject;
}
</script>
<script type="text/javascript">
var ord=Math.random()*10000000000000000;
var isWirelessDevice= 'false';
function checkMonster() {
if ($("#ad_r2_wrapper > div").eq(0).css("width")=="945px") {
$("#ad_r2_wrapper").css("padding-right","0px");
$("#ad_r3_wrapper").hide();
$("#ad_r4_wrapper").hide();
}
}
jQuery.validator.addMethod("alphaNumChar", function(value, element) {
return this.optional(element) || /^[A-Za-z0-9.,/\-\#&'\s]+$/i.test(value);
}, "");
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[A-Za-z]+$/i.test(value);
}, "");
jQuery.validator.addMethod("notXss", function(value, element) {
return this.optional(element) || ! /\(|\)|>|<|\'/i.test(value);
}, "Special characters are not allowed");
jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^\w+$/i.test(value);
}, "");
jQuery.validator.addMethod("nopobox", function(value, element) {
return this.optional(element) || ! /(P(OST)?\.?\s*O(FF(ICE)?)?\.?\s*((BOX)|(BIN)))|(^[^0-9]*((P(OST)?\.?\s*O(FF(ICE)?)?\.?)?\s((BOX)|(BIN))))/i.test(value);
}, "");
jQuery.validator.addMethod("validdob", function(value, element) {
var monthVal = $("#regMonth").val();
var yearVal = $("#regYear").val();
if( (monthVal == 2) && (value == 29) ) {
return ((yearVal % 4) == 0);
} else {
var dob = String(monthVal) + String(value);
return this.optional(element) || ! /(((04)|(06)|(09)|(11))31)|(023.)/.test(dob);
}
}, "");
jQuery.validator.addMethod("selectionRequired", function(value, element) {
var elementVal = $(element).val();
if( (elementVal == null ) || (elementVal == "" )) {
return false;
} else {
return true;
}
}, "");
jQuery.validator.addMethod("validdobcu", function(value, element) {
var monthVal = $("#regMonthCU").val();
var yearVal = $("#regYearCU").val();
if( (monthVal == 2) && (value == 29) ) {
return ((yearVal % 4) == 0);
} else {
var dob = String(monthVal) + String(value);
return this.optional(element) || ! /(((04)|(06)|(09)|(11))31)|(023.)/.test(dob);
}
}, "");
jQuery.validator.addMethod("password", function(value, element) {
return this.optional(element) || ! /\||\s/i.test(value);
}, "");
jQuery.validator.addMethod("names", function(value, element) {
return this.optional(element) || ! /\|/i.test(value);
}, "");
jQuery.validator.addMethod("completephone", function(value, element) {
var area = $("#mobilePhone1").val();
var exch = $("#mobilePhone2").val();
var numb = $("#mobilePhone3").val();
return this.optional(element) || (((area == "") && (exch == "") && (numb == ""))||((area != "") && (exch != "") && (numb != "")));
}, "");
jQuery.validator.addMethod("completephoneupdate", function(value, element) {
var area = $("#phone1").val();
var exch = $("#phone2").val();
var numb = $("#phone3").val();
return this.optional(element) || (((area == "") && (exch == "") && (numb == ""))||((area != "") && (exch != "") && (numb != "")));
}, "");
popupWindow = function(url, isPopUp, pWidth, pHeight) {
if (isPopUp) {
pWidth = typeof(pWidth) == 'undefined' ? 650 : pWidth;
pHeight = typeof(pHeight) == 'undefined' ? 500 : pHeight;
var newWindow = window.open(url,'','status=yes,left=350,top=250,location=no,scrollbars=yes,toolbar=no,menubar=no,resizable=yes,width=' + pWidth + ',height=' + pHeight);
if (window.focus) { newWindow.focus(); }
} else { window.location=url; }
}
jQuery.preloadImages = function()
{
for(var i = 0; i<arguments.length; i++)
{
jQuery("<img>").attr("src", arguments);
}
}
$.preloadImages("/flex-mod/desktop/cokezero/images/waitDisk.gif",
"/flex-mod/desktop/cokezero/images/waitDisk.gif",
"/flex-mod/desktop/cokezero/images/nNav_eb_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_hiw_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_op_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_rc_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_schools_active_bg.gif"
);
$(document).ready(function(){
setTimeout("checkMonster()",1000);
var cookieTemp = $.cookie("mcrRewardCode");
if ((cookieTemp != null) && (cookieTemp != ""))
$("#rewardCode").val(cookieTemp);
});
var lazyList = new Array();
function lazyRegister(funName) {
lazyList.push(funName);
}
function lazyCall() {
fullLazy = lazyList.length;
for (i=0;i<fullLazy;i++)
{
window[lazyList]();
}
}
function openSigninPop(email) {
if (email!="none") {
$("#connectEmail").val(email);
$("#connectEmailListing").text(email);
}
$("#connectAccountsPop").modal({
close:false
});
}
function showConsumerCare() {
alert('Call Consumer Care at 1-866-674-2653 for accessibility assistance');
}
function fireFacebook() {
var x = self.screenLeft || self.screenX;
var y = self.screenTop || self.screenY;
x = x + 70;
y = y + 120;
signinWin = window.open("", "SignIn", "width=625,height=360,toolbar=0,scrollbars=0,status=0,resizable=0,location=0,menuBar=0,left="+x+"px,top="+y+"px");
signinWin.focus();
setTimeout("refreshFacebook()",1000);
document.body.style.cursor = "wait";
}
function refreshFacebook() {
if (signinWin.closed) {
$.ajax({
type:"GET",
url:"/social/facebook/status",
timeout:30000,
dataType:"json",
success:function(responseSet){
document.body.style.cursor = "auto";
responseCode = responseSet.responseCode;
switch(responseCode) {
case "REDIRECT":
setTimeout("window.location.href = '" + responseSet.redirectUrl + "'",600);
break;
case "PROMPT_SIGNIN":
openSigninPop(responseSet.email);
break;
case "EMAIL_ADDRESS_FOUND":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect Error");
setTimeout("window.location.href = '" + responseSet.redirectUrl + "'",600);
break;
case "REGISTRATION":
setTimeout("window.location.href = '" + responseSet.redirectUrl + "'",600);
break;
case "ERROR":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect Error");
break;
case "DENIED_PERMISSION":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","5");
break;
case "SUCCESSFUL_LOGIN":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","1","WT.z_fbauth", "1");
setTimeout("window.location.reload();",600);
break;
case "EXISTING_FB_CHANNEL_FOUND":
launchFacebookReplacePrompt(responseSet);
break;
case "COMPLETE_LOGIN_REQUIRED":
window.location.href = responseSet.redirectUrl;
break;
case "SUCCESSFULLY_UPDATED_EXISTING_CHANNEL":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","6");
setTimeout("window.location.reload();",600);
break;
case "SUCCESSFUL_INITIAL_CONNECT":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","2");
setTimeout("window.location.reload();",600);
break;
case "SUCCESSFUL_CONNECT":
setTimeout("window.location.reload();",600);
break;
default:
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect Error");
break;
}
},
error:function(){
document.body.style.cursor = "auto";
/* dcsMultiTrack(error);*/
}
});
} else {
setTimeout("refreshFacebook()",500);
}
}
function launchFacebookReplacePrompt(responseSet) {
$("#facebookReplacePoPFirstName").html(responseSet.currentFbUserName);
$("#facebookReplacePoPFirstImage").attr("src",responseSet.currentFbUserImageUrl);
$("#facebookReplacePoPSecondName").html(responseSet.newFbUserName);
$("#facebookReplacePoPSecondImage").attr("src",responseSet.newFbUserImageUrl);
$("#facebookReplacePop").modal({close: false});
}
function lazyRemove(funName) {
<!-- Commenting if as indexOf is not supported by IE. It seems JS 1.5 version is used -->
<!-- if (lazyList.indexOf(funName)>=0) -->
for (var i = 0;i<lazyList.length;i++)
{
if (lazyList == funName)
{
lazyList.splice(i,1);
break;
}
}
}
$(window).keydown(function(e){
if( e.which == 27 )
$.modal.close();
});
function showAlertPop(header, title, text) {
$("#alertPopBodyText span").remove();
$("#alertPopHeaderText span").remove();
$("#alertPopTitleText span").remove();
$("#alertPopHeaderText").append("<span id='alertPopHeaderTextLiner'></span>");
$("#alertPopHeaderTextLiner").html(header);
$("#alertPopTitleText").append("<span id='alertPopTitleTextLiner'></span>");
$("#alertPopTitleTextLiner").html(title);
$("#alertPopBodyText").append("<span id='alertPopBodyTextLiner'></span>");
$("#alertPopBodyTextLiner").html(text);
$("#alertPop").modal({close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#alertPopTop', cursor: 'move'});
}
});
}
function markAlertRead(alertId, messageId) {
$.ajax({
type: "POST",
data: "alertId="+alertId+"&messageId="+messageId,
url: "markAlertRead.do"
});
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
function resetSendMyselfEmailCaptcha() {
path = "/captchaImage?" + Math.random()*100000000;
$("#sendEmailCaptcha").attr("src",path);
}
function sendMyselfEmail(lbeID, url, paramList) {
if (paramList != null && paramList.length > 0) {
joinedList = paramList.join();
} else {
joinedList = "";
}
$.ajax({
url: "https://www.enjoymoremadness.com/sendMyselfEmail.do?lbeId="+lbeID+"&pageURL="+url+"¶mList="+joinedList,
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#sendMyselfInfoPop").html(html);
$("#lbeIdEmail").val(lbeID);
$("#pageURLEmail").val(url);
$("#paramListEmail").val(paramList);
$("#sendMyselfEmail").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
rules: {
securityKey: {
required: true
},
referEmail01: {
required: true,
email: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
referEmail01: {
required: "Oops - the email address is required",
email: "Oops - email address is not a proper format"
}
},
submitHandler: function(form) {
$("#sendMyselfEmailSubmitBtn").attr("disabled","disabled");
document.body.style.cursor = "wait";
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/sendMyselfEmail.do',
getUrl: '/sendMyselfEmailResponse.do',
dataType: 'html',
success: function(data) {
sendMyselfEmailResponse(data);
},
error: function(data) {
sendMyselfEmailError();
document.body.style.cursor = "auto";
$("#sendMyselfEmailSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#sendMyselfInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#textAFriendHandle,div', cursor: 'move'});
}
});
}
});
}
function sendMyselfEmailResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#sendMyselfEmailSubmitBtn").removeAttr("disabled");
$("#sendMyselfInfoPop").html(responsehtml);
$("#sendMyselfEmail").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
rules: {
securityKey: {
required: true
},
referEmail01: {
required: true,
email: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
referEmail01: {
required: "Oops - the email address is required",
email: "Oops - email address is not a proper format"
}
},
submitHandler: function(form) {
$("#sendMyselfEmailSubmitBtn").attr("disabled","disabled");
document.body.style.cursor = "wait";
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/sendMyselfEmail.do',
getUrl: '/sendMyselfEmailResponse.do',
dataType: 'html',
success: function(data) {
sendMyselfEmailResponse(data);
},
error: function(data) {
sendMyselfEmailError();
document.body.style.cursor = "auto";
$("#sendMyselfEmailSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Send+Myself+Email+Completion');
}
function textAFriend(lbeID, url, paramList) {
if (paramList != null && paramList.length > 0) {
joinedList = paramList.join();
} else {
joinedList = "";
}
$.ajax({
url: "https://www.enjoymoremadness.com/textAFriend.do?lbeId="+lbeID+"&pageURL="+url+"¶mList="+joinedList,
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#textInfoPop").html(html);
$("#lbeId").val(lbeID);
$("#pageURL").val(url);
$("#paramList").val(paramList);
$("#textAFriend").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
rules: {
securityKey: {
required: true
},
textPhone1: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone2: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone3: {
minlength: 4,
maxlength: 4,
required: true,
digits: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
textPhone1: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone2: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone3: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
}
},
groups: {
phone: "textPhone1 textPhone2 textPhone3"
},
submitHandler: function(form) {
$("#textAFriendSubmitBtn").attr("disabled","disabled");
document.body.style.cursor = "wait";
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/textAFriend.do',
getUrl: '/textAFriendResponse.do',
dataType: 'html',
success: function(data) {
textAFriendResponse(data);
},
error: function(data) {
textAFriendError();
document.body.style.cursor = "auto";
$("#textAFriendSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#textInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#textAFriendHandle,div', cursor: 'move'});
}
});
}
});
}
function textAFriendResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#textAFriendSubmitBtn").removeAttr("disabled");
$("#textInfoPop").html(responsehtml);
$("#textAFriend").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
wrapper: 'li',
rules: {
securityKey: {
required: true
},
textPhone1: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone2: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone3: {
minlength: 4,
maxlength: 4,
required: true,
digits: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
textPhone1: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone2: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone3: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
}
},
groups: {
phone: "textPhone1 textPhone2 textPhone3"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#textAFriendSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/textAFriend.do',
getUrl: '/textAFriendResponse.do',
dataType: 'html',
success: function(data) {
textAFriendResponse(data);
},
error: function(data) {
textAFriendError();
document.body.style.cursor = "auto";
$("#textAFriendSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Text+A+Friend+Completion');
}
function tellAFriend() {
if (false) {
$.ajax({
url: "https://www.enjoymoremadness.com/referAFriend.do",
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#tellInfoPop").html(html);
$('#emailToName2').keyup(function () {
if ($(this).val()) {
$('#emailToAddress2').addClass('required');
} else {
$('#emailToAddress2').removeClass('required');
}
});
$('#emailToName3').keyup(function () {
if ($(this).val()) {
$('#emailToAddress3').addClass('required');
} else {
$('#emailToAddress3').removeClass('required');
}
});
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
$("#referSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/referAFriend.do',
getUrl: '/referAFriendResponse.do',
dataType: 'html',
success: function(data) {
referAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#referSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#tellInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div, div#referAFriendHandle', cursor: 'move'});
}
});
}
});
} else {
$("#tellUnauthInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#tellUnauthInfoPopTop', cursor: 'move'});
}
});
}
}
function shareWithAFriend(itemId) {
$.ajax({
url: "https://www.enjoymoremadness.com/shareWithAFriend.do?itemId="+itemId,
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#tellInfoPop").html(html);
$("#itemId").val(itemId);
$('#emailToName2').keyup(function () {
if ($(this).val()) {
$('#emailToAddress2').addClass('required');
} else {
$('#emailToAddress2').removeClass('required');
}
});
$('#emailToName3').keyup(function () {
if ($(this).val()) {
$('#emailToAddress3').addClass('required');
} else {
$('#emailToAddress3').removeClass('required');
}
});
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#shareSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithAFriend.do?itemId='+itemId,
getUrl: '/shareWithAFriendResponse.do',
dataType: 'html',
success: function(data) {
shareWithAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#tellInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#referAFriendHandle,div', cursor: 'move'});
}
});
}
});
}
function moveOnMax(field,nextFieldID){
if(field.value.length >= field.maxLength){
document.getElementById(nextFieldID).focus();
}
}
function shareWithAFriendLBE(lbeId) {
shareWithAFriendLBEWithURL(lbeId, '')
}
function shareWithAFriendLBEWithURL(lbeId, url) {
shareWithAFriendMaster(lbeId, url, '')
}
function shareWithAFriendMaster(lbeId, url, paramList) {
codeErrorSignIn();
}
function tellAFriendSchool() {
$.ajax({
url: "https://www.enjoymoremadness.com/shareWithASchoolFriend.do",
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#tellInfoPop").html(html);
$('#emailToName2').keyup(function () {
if ($(this).val()) {
$('#emailToAddress2').addClass('required');
} else {
$('#emailToAddress2').removeClass('required');
}
});
$('#emailToName3').keyup(function () {
if ($(this).val()) {
$('#emailToAddress3').addClass('required');
} else {
$('#emailToAddress3').removeClass('required');
}
});
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#shareSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithASchoolFriend.do',
getUrl: '/shareWithASchoolFriendResponse.do',
dataType: 'html',
success: function(data) {
tellAFriendSchoolResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#tellInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div, div#referAFriendHandle', cursor: 'crosshair'});
}
});
}
});
}
function tellAFriendSchoolResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
$("#tellInfoPop").html(responsehtml);
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#referSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithASchoolFriend.do',
getUrl: '/shareWithASchoolFriendResponse.do',
dataType: 'html',
success: function(data) {
tellAFriendSchoolResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
}
function referAFriendResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
$("#tellInfoPop").html(responsehtml);
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
$("#referSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/referAFriend.do',
getUrl: '/referAFriendResponse.do',
dataType: 'html',
success: function(data) {
referAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#referSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Tell+A+Friend+Completion');
}
function shareWithAFriendResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
$("#tellInfoPop").html(responsehtml);
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#shareSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithAFriend.do',
getUrl: '/shareWithAFriendResponse.do',
dataType: 'html',
success: function(data) {
shareWithAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Tell+A+Friend+Completion');
}
function referAFriendError() {
document.body.style.cursor ="auto";
}
function sendMyselfEmailError() {
document.body.style.cursor ="auto";
}
function textAFriendError() {
document.body.style.cursor ="auto";
}
function showRules(ruleKey) {
$.ajax({
url: "/rules.do",
type: "POST",
data: {"ruleKey":ruleKey},
timeout: 15000,
success: function(html) {
$("#rulesPop").html(html);
$.ajax({
type: "GET",
url: rulesUrlLink,
timeout: 15000,
dataType: "xml",
success: function(xml){
var contentRules = $("content",xml).text();
$('#rulesPopScrollContent').html(contentRules);
$('#rulesPopScrollContent').find('*').css('color','#ffffff');
},
error: function(xml){
$('#rulesPopScrollContent').html("There was an error in fetching the XML file from: " + rulesUrlLink);
}
});
$("#rulesPop").modal({
close: false,
onShow: function(dialog) {
dialog.container.draggable({handle: 'div#rulesPopHandle, div#rulesPopHandleBeta', cursor: 'move'});
}
});
}
});
}
function showRTERules(rtePath) {
$.ajax({
url: "/rules.do",
type: "POST",
timeout: 15000,
success: function(html) {
$("#rulesPop").html(html);
$.ajax({
url: "/en_US/legal/mobile_terms_of_use_en_US.xml",
type: "GET",
timeout: 15000,
dataType: "xml",
success: function(xml){
var content;
$(xml).find('field').each(function() {
if ($(this).find('name').text() == "richText") {
$('#rulesPopScrollContent').html($(this).find('value').text());
}
});
}
});
$("#rulesPop").modal({
close: false,
onShow: function(dialog) {
dialog.container.draggable({handle: 'div#rulesPopHandle, div#rulesPopHandleBeta', cursor: 'move'});
}
});
}
});
}
function addMemberNugget(type, value) {
$.ajax({type:'POST',url:'addMemberNugget.do',data:'linkType=' + type + '&value=' + value});
}
var _tag={
dcsMultiTrack:function() {
var args = Array.prototype.slice.apply(arguments);
window['dcsMultiTrack'].apply(this, args);
}
}
htmlExpTrackWT=function(){
var args = Array.prototype.slice.apply(arguments);
var caller = args.shift();
var vhref =caller.href;
try{
if (args.length%2==0){
if(typeof caller.target != 'undefined' && caller.target.toLowerCase() == '_blank' ) {
window['dcsMultiTrack'].apply(this, args); } else {
var trackClose = false;
$.each(args, function(index, value){
var trackStringClose = value.indexOf("Close");
if (trackStringClose > -1) {trackClose=true;}
});
window['dcsMultiTrack'].apply(this, args);
}
}
}catch(e){}
if(typeof caller.target != 'undefined' && caller.target.toLowerCase() == '_blank' ){
return true;
}else{
setTimeout('window.location.href = "'+vhref+'"', 500);
return false;
}
}
</script>
<script type="text/javascript">
var flashvars = {};
var params = {
menu: "false",
scale: "noScale"
};
var attributes = {
id : "flashProxy"
};
swfobject.embedSWF("/swf/ProxyAS2.swf", "altContent", "1px", "1px", "8.0.0", "expressInstall.swf", flashvars, params,attributes);
</script>
<script type="text/javascript">
// This can be overwritten when needed
var dartKey = 'home';
</script>
<script src="/en_US/dart/dart_zones_en_US.js?ver=02242014" type="text/javascript"></script>
<link href="/flex-mod/desktop/common/global.css?ver=02242014" rel="stylesheet" type="text/css" />
<link href="/flex-mod/desktop/cokezero/common/cokezero.css?ver=02242014" rel="stylesheet" type="text/css" />
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="/css/iespecific.css?ver=02242014" />
<![endif]-->
<!-- START OF SmartSource Data Collector TAG v10.2.0 -->
<!-- Copyright (c) 2012 Webtrends Inc. All rights reserved. -->
<script src="/flex-mod/js/tracking/webtrends-v10-2-1-rev04.js?ver=02242014" type="text/javascript"></script>
<script type="text/javascript">
var dcs;
dcs=new Webtrends.dcs().init({
dcsid:"dcs5rrna910000oev48s9cjg1_4o3i"
,domain:"statse.webtrendslive.com"
,timezone:-5
,adimpressions:true
,adsparam:"WT.ac"
,offsite:true
,download:true
,downloadtypes:"xls,doc,pdf,txt,csv,zip,docx,xlsx,rar,gzip"
,onsitedoms:"enjoymoremadness.com"
,i18n:false
,plugins:{
hm:{src:"//s.webtrends.com/js/webtrends.hm.js",hmurlparams:"WT.ac"}
}
});
dcs.WT.cg_n='error'; // Can be overwritten as needed
dcs.WT.cg_s='unknown'; // Can be overwritten as needed
dcs.WT.z_channel='desktop';
dcs.WT.z_program='cokezero';
/*
(function(){
var s=document.createElement("script"); s.async=false; s.src="/en_US/js/tracking/webtrends/webtrends-v10_en_US.js";
var s2=document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(s,s2);
}());
*/
</script>
<!-- END OF SmartSource Data Collector TAG v10.2.0 -->
<script type="text/javascript" src="/en_US/js/tracking/floodlight/tracking_en_US.js?ver=02242014"></script>
<script>
function getBasePath() { return ""; }
function getSecureBasePath() { return "https://www.enjoymoremadness.com"; }
function isLoggedIn() { return "false"; }
function getMemberEli() { return "";}
function getMemberFirstName() { return ""; }
function getMemberPoints() { return "na"; }
function getMemberAge() { return "na"; }
function getMemberGender() { return "na"; }
function getMemberState() { return "na"; }
<!-- i2a tracking code for registration -->
var order_code="";
var pageAction = "";
function trackI2ATagForRegistration(){
order_code = "";
pageAction = "980";
}
function trackI2ATagForRegistrationOptin(){
order_code = "";
pageAction = "336";
}
<!-- i2a tracking code for Social tags-->
function trackI2ATagForSocial(){
pixel_conversion('2976');
}
<!-- i2a tracking code for code entry-->
function trackI2ATagForCodeEntry(){
pageAction = "3886";
}
<!-- i2a tracking code for first time visitor-->
function trackI2ATagForFirstTimeVisitor(){
order_code = "";
pageAction = "4036";
}
function trackFloodLightTag(invokedFrom) {
var randomNum = Math.random() * 10000000000000;
var memberIdParam = ';u1=';
var sendMemberId = false;
var protocol = tags[invokedFrom][0]
try {
if (tags[invokedFrom][3] == 'sendMemberId')
sendMemberId = true;
} catch (err) {
sendMemberId = false;
}
if (sendMemberId == true) {
$(document.body).append(
'<IFRAME SRC="' + protocol
+ '://fls.doubleclick.net/activityi;src=1352258;type='
+ tags[invokedFrom][1] + ';cat=' + tags[invokedFrom][2]+ memberIdParam + ';ord=' + randomNum
+ '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
} else {
$(document.body).append(
'<IFRAME SRC="' + protocol
+ '://fls.doubleclick.net/activityi;src=1352258;type='
+ tags[invokedFrom][1]+ ';cat=' + tags[invokedFrom][2]
+ ';ord=' + randomNum
+ '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
}
}
function trackFloodLight(invokedFrom, protocol) {
trackFloodLightTag(invokedFrom);
// protocol is being ignored and will be fetched from an array in
// tags_en_US. This function is there just to support existing calls in LBEs
}
function addForTracking(id, val) {
eval("dcs.WT." + id + "= '" + val + "'");
}
function collectWebtrends() {
setTimeout('dcsMultiTrack();', 600);
}
function trackWebtrends(id, val) {
eval("dcs.WT." + id + "= '" + val + "'");
setTimeout('dcsMultiTrack();', 600);
}
function jsonWithFrameSubmit (params){
var iframeName = "loginIframeBox";
var jsonfId = +new Date();
if ($("#"+iframeName).size()==0) {
$("body").append("<iframe name=\""+iframeName+"\" id=\""+iframeName+"\" src=\"/images/spacer.gif\" height=\"0\" width=\"0\" border=\"0\" style=\"display:none;\" ></iframe>");
}
var timeout = 30000;
if (params.timeout) {
timeout = params.timeout;
}
var timerRunning = true;
var t = setTimeout(function(){timerRunning = false;params.error(null, "timeout", null);},timeout);
$("#"+iframeName).load(function() {
if (timerRunning) {
clearTimeout(t);
if (!params.data) {
params.data = new Object();
}
params.data.jsonf=jsonfId;
$.ajax({
type: "GET",
url: params.getUrl,
dataType: params.dataType,
data: params.data,
timeout: params.timeout,
cache: false,
success: function(responseSet, textStatus) { params.success(responseSet, textStatus); },
error: params.error
});
}
$("#"+iframeName).unbind();
});
$(params.form).append("<input type=\"hidden\" name=\"jsonf\" value=\""+jsonfId+"\" />");
$(params.form).attr("target",iframeName);
$(params.form).attr("action",params.postUrl);
$(params.form).attr("method","POST");
params.form.submit();
}
function showBothCode() {
$("#bothCodePop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div, div#bothCodePopTop', cursor: 'move'});
}
});
}
function changeSchoolPop(startFlow,updateDiv,searchItem) {
$("#updateLocation").val(updateDiv);
$("#startFlow").val(startFlow);
$("#schoolSearchItem").val(searchItem);
document.body.style.cursor = "wait";
$.ajax({
type: "GET",
url: "/schoolSearchPop.do",
dataType: "HTML",
timeout: 30000,
success: function(html) {
$("#schoolSelectorPopBody").html(html);
document.body.style.cursor = "auto";
$("#schoolSelectorPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#schoolSelectorPopTop', cursor: 'move'});
}
});
},
error: function() {
$("#schoolPopError").html("<h3 style='padding:10px;'>Information is currently unavailable</h3>");
document.body.style.cursor = "auto";
$("#schoolSelectorPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#schoolSelectorPopTop', cursor: 'move'});
}
})
}
});
}
</script>
</head>
<body>
<div id="container">
<div id="wrapper">
<script type="text/javascript">
var loginReady = false;
var loginDelay = 1000;
function codeErrorSignInWithRedirect(redirectUrl){
codeErrorSignIn();
$("#loginErrorBody2>a").attr("href", "/register.do?redirectUrl="+redirectUrl);
}
function codeErrorSignIn() {
$.cookie('mcrRewardCode',$('#rewardCode').val());
$('#loginErrorTitle').html("You're almost there...");
$('#loginErrorBody').html("Just sign in to continue.");
$('#loginErrorBody2').html("If you're new here, welcome... <a href='https://www.enjoymoremadness.com/register.do' style='text-decoration:underline'>register</a> to get going (it just takes a few moments).");
$('#codeErrorSignInPop').show();
}
function invalidPassword() {
$('#loginErrorTitle').html("Uh oh...<br/>We don't recognize your email address or password.<br/>Forgot your password? <a href='home.do?resetPassword=true' id='signInResetLink' style='text-decoration:underline;' >Reset it now</a>.");
$('#loginErrorBody').html("<br/><br/>If you continue to have trouble signing in, try to sign in <a href='/signin.do' style='text-decoration:underline'>here</a>.");
$('#signInResetLink').attr("href","javascript:$('#codeErrorSignInPop').hide();forgotPassword();");
$('#codeErrorSignInPop').show();
submitLoginAllowed = true;
$('#loginSubmitBtn').removeAttr('disabled');
$('#passwordText').val('');
dcsMultiTrack('WT.z_errTrack', 'login-Invalid+login+or+password');
}
function suspendedAccount() {
$('#loginErrorTitle').html("Uh oh...<br/>We don't recognize your email address or password.<br/>Forgot your password? <a href='home.do?resetPassword=true' id='signInResetLink' style='text-decoration:underline;' >Reset it now</a>.");
//$('#loginErrorBody').html("<br/><br/>If you continue to have trouble signing in, try to sign in <a href='/signin.do' style='text-decoration:underline'>here</a>.");
$('#codeErrorSignInPop').show();
submitLoginAllowed = true;
$('#loginSubmitBtn').removeAttr('disabled');
dcsMultiTrack('WT.z_errTrack', 'login-Suspended+account');
}
function invalidLocation() {
//$('#loginErrorTitle').html("Uh oh...<br/>We don't recognize your email address or password.<br/>Forgot your password? <a href='home.do?resetPassword=true' id='signInResetLink' style='text-decoration:underline;' >Reset it now</a>.");
$('#loginErrorBody').html("This site is only for U.S. residents.");
$('#codeErrorSignInPop').show();
submitLoginAllowed = true;
$('#loginSubmitBtn').removeAttr('disabled');
dcsMultiTrack('WT.z_errTrack', 'invalid_locale');
}
function ipAddressBlocked() {
$('#loginErrorTitle').html("");
$('#loginErrorBody').html("Uh oh? we are unable to sign you in right now, please try again later.");
$('#codeErrorSignInPop').show();
}
function systemError(data) {
$('#loginErrorTitle').html("We are sorry,");
$('#loginErrorBody').html("We were unable to complete your sign in request at this time. Please try again in a few moments.");
errorMsg = data.errorMessage;
$('#loginErrorMessage').html(errorMsg);
$('#codeErrorSignInPop').show();
$('select').hide();
}
var submitLoginAllowed = true;
function submitLogin() {
/* $.cookie('mcrRewardCode',$('#rewardCode').val()); */
if (($("#emailAddress").val() == null) || ($("#passwordText").val() == null)) {
invalidPassword();
} else if ("true" == isWirelessDevice){
$("#loginForm").submit();
} else {
submitLoginAllowed = false;
document.body.style.cursor = "wait";
$('#loginSubmitBtn').attr('src','/flex-mod/desktop/cokezero/images/waitDisk.gif');
$('#loginSubmitBtn').attr('disabled','disabled');
jsonWithFrameSubmit({
form: $("#loginForm"),
-----
so I was trying to enter Coke's free NCAA bracket challenge when the webpage crashed on me.
here's the first 50k chars of the code.
-Enjoy
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<meta property="fb:admins" content="557226013"/>
<meta property="og:type" content="website" />
<meta property="og:site_name" content="My Coke Rewards" />
<meta property="og:title" content="Coke Zero" />
<meta property="og:image" content="http://www.mycokerewards.com/images/theme/mcr_logo.gif" />
<title>Coke Zero</title>
<script src="/js/jquery1.8.0.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui.js"></script>
<script type="text/javascript" src="/js/jquery.validate.min.js"></script>
<script src="/js/swfobject.js" type="text/javascript"></script>
<script src="/js/jquery.countdown.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery.simplemodal.1.4.3.min.js"></script>
<script src="/js/jquery.jcarousel.min.js" type="text/javascript"></script>
<script src="/js/jquery.marquee.js" type="text/javascript"></script>
<script src="/js/modernizer.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/flex-mod/desktop/cokezero/common/cokeZero.js"></script>
<script type="text/javascript">
var systemTimeInMillis = 1393285547685;
var systemTimeInMilliseconds = new Date(1393285547685);
var gameState = initGameState();
var testState = "unlocked";
gameState.setState('LOCKED');
testState = 'LOCKED';
function getTs(){
return new Date(1392642047685);
}
function initGameState(){
var internalState = null;
returnObject = {};
returnObject.getState = function() {
return internalState;
};
returnObject.setState = function(state){
switch(state){
case 'LOCKED':
case 'UNLOCKED':
case 'GAME_OVER':
internalState = state;
break;
default:
internalState = 'UNLOCKED';
}
};
returnObject.setLocked = function(){returnObject.setState('LOCKED');};
returnObject.setUnlocked = function(){returnObject.setState('UNLOCKED');};
returnObject.setGameOver = function(){returnObject.setState('GAME_OVER');};
returnObject.isLocked = function(){
if(returnObject.getState() == 'LOCKED'){
return true;
}
return false;
};
returnObject.isUnlocked = function(){
if(returnObject.getState() == 'UNLOCKED'){
return true;
}
return false;
};
returnObject.isGameOver = function(){
if(returnObject.getState() == 'GAME_OVER'){
return true;
}
return false;
};
return returnObject;
}
</script>
<script type="text/javascript">
var ord=Math.random()*10000000000000000;
var isWirelessDevice= 'false';
function checkMonster() {
if ($("#ad_r2_wrapper > div").eq(0).css("width")=="945px") {
$("#ad_r2_wrapper").css("padding-right","0px");
$("#ad_r3_wrapper").hide();
$("#ad_r4_wrapper").hide();
}
}
jQuery.validator.addMethod("alphaNumChar", function(value, element) {
return this.optional(element) || /^[A-Za-z0-9.,/\-\#&'\s]+$/i.test(value);
}, "");
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[A-Za-z]+$/i.test(value);
}, "");
jQuery.validator.addMethod("notXss", function(value, element) {
return this.optional(element) || ! /\(|\)|>|<|\'/i.test(value);
}, "Special characters are not allowed");
jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^\w+$/i.test(value);
}, "");
jQuery.validator.addMethod("nopobox", function(value, element) {
return this.optional(element) || ! /(P(OST)?\.?\s*O(FF(ICE)?)?\.?\s*((BOX)|(BIN)))|(^[^0-9]*((P(OST)?\.?\s*O(FF(ICE)?)?\.?)?\s((BOX)|(BIN))))/i.test(value);
}, "");
jQuery.validator.addMethod("validdob", function(value, element) {
var monthVal = $("#regMonth").val();
var yearVal = $("#regYear").val();
if( (monthVal == 2) && (value == 29) ) {
return ((yearVal % 4) == 0);
} else {
var dob = String(monthVal) + String(value);
return this.optional(element) || ! /(((04)|(06)|(09)|(11))31)|(023.)/.test(dob);
}
}, "");
jQuery.validator.addMethod("selectionRequired", function(value, element) {
var elementVal = $(element).val();
if( (elementVal == null ) || (elementVal == "" )) {
return false;
} else {
return true;
}
}, "");
jQuery.validator.addMethod("validdobcu", function(value, element) {
var monthVal = $("#regMonthCU").val();
var yearVal = $("#regYearCU").val();
if( (monthVal == 2) && (value == 29) ) {
return ((yearVal % 4) == 0);
} else {
var dob = String(monthVal) + String(value);
return this.optional(element) || ! /(((04)|(06)|(09)|(11))31)|(023.)/.test(dob);
}
}, "");
jQuery.validator.addMethod("password", function(value, element) {
return this.optional(element) || ! /\||\s/i.test(value);
}, "");
jQuery.validator.addMethod("names", function(value, element) {
return this.optional(element) || ! /\|/i.test(value);
}, "");
jQuery.validator.addMethod("completephone", function(value, element) {
var area = $("#mobilePhone1").val();
var exch = $("#mobilePhone2").val();
var numb = $("#mobilePhone3").val();
return this.optional(element) || (((area == "") && (exch == "") && (numb == ""))||((area != "") && (exch != "") && (numb != "")));
}, "");
jQuery.validator.addMethod("completephoneupdate", function(value, element) {
var area = $("#phone1").val();
var exch = $("#phone2").val();
var numb = $("#phone3").val();
return this.optional(element) || (((area == "") && (exch == "") && (numb == ""))||((area != "") && (exch != "") && (numb != "")));
}, "");
popupWindow = function(url, isPopUp, pWidth, pHeight) {
if (isPopUp) {
pWidth = typeof(pWidth) == 'undefined' ? 650 : pWidth;
pHeight = typeof(pHeight) == 'undefined' ? 500 : pHeight;
var newWindow = window.open(url,'','status=yes,left=350,top=250,location=no,scrollbars=yes,toolbar=no,menubar=no,resizable=yes,width=' + pWidth + ',height=' + pHeight);
if (window.focus) { newWindow.focus(); }
} else { window.location=url; }
}
jQuery.preloadImages = function()
{
for(var i = 0; i<arguments.length; i++)
{
jQuery("<img>").attr("src", arguments);
}
}
$.preloadImages("/flex-mod/desktop/cokezero/images/waitDisk.gif",
"/flex-mod/desktop/cokezero/images/waitDisk.gif",
"/flex-mod/desktop/cokezero/images/nNav_eb_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_hiw_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_op_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_rc_active_bg.gif",
"/flex-mod/desktop/cokezero/images/nNav_schools_active_bg.gif"
);
$(document).ready(function(){
setTimeout("checkMonster()",1000);
var cookieTemp = $.cookie("mcrRewardCode");
if ((cookieTemp != null) && (cookieTemp != ""))
$("#rewardCode").val(cookieTemp);
});
var lazyList = new Array();
function lazyRegister(funName) {
lazyList.push(funName);
}
function lazyCall() {
fullLazy = lazyList.length;
for (i=0;i<fullLazy;i++)
{
window[lazyList]();
}
}
function openSigninPop(email) {
if (email!="none") {
$("#connectEmail").val(email);
$("#connectEmailListing").text(email);
}
$("#connectAccountsPop").modal({
close:false
});
}
function showConsumerCare() {
alert('Call Consumer Care at 1-866-674-2653 for accessibility assistance');
}
function fireFacebook() {
var x = self.screenLeft || self.screenX;
var y = self.screenTop || self.screenY;
x = x + 70;
y = y + 120;
signinWin = window.open("", "SignIn", "width=625,height=360,toolbar=0,scrollbars=0,status=0,resizable=0,location=0,menuBar=0,left="+x+"px,top="+y+"px");
signinWin.focus();
setTimeout("refreshFacebook()",1000);
document.body.style.cursor = "wait";
}
function refreshFacebook() {
if (signinWin.closed) {
$.ajax({
type:"GET",
url:"/social/facebook/status",
timeout:30000,
dataType:"json",
success:function(responseSet){
document.body.style.cursor = "auto";
responseCode = responseSet.responseCode;
switch(responseCode) {
case "REDIRECT":
setTimeout("window.location.href = '" + responseSet.redirectUrl + "'",600);
break;
case "PROMPT_SIGNIN":
openSigninPop(responseSet.email);
break;
case "EMAIL_ADDRESS_FOUND":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect Error");
setTimeout("window.location.href = '" + responseSet.redirectUrl + "'",600);
break;
case "REGISTRATION":
setTimeout("window.location.href = '" + responseSet.redirectUrl + "'",600);
break;
case "ERROR":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect Error");
break;
case "DENIED_PERMISSION":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","5");
break;
case "SUCCESSFUL_LOGIN":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","1","WT.z_fbauth", "1");
setTimeout("window.location.reload();",600);
break;
case "EXISTING_FB_CHANNEL_FOUND":
launchFacebookReplacePrompt(responseSet);
break;
case "COMPLETE_LOGIN_REQUIRED":
window.location.href = responseSet.redirectUrl;
break;
case "SUCCESSFULLY_UPDATED_EXISTING_CHANNEL":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","6");
setTimeout("window.location.reload();",600);
break;
case "SUCCESSFUL_INITIAL_CONNECT":
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect","WT.z_fb","2");
setTimeout("window.location.reload();",600);
break;
case "SUCCESSFUL_CONNECT":
setTimeout("window.location.reload();",600);
break;
default:
dcsMultiTrack("DCS.dcsuri","/home","WT.ti","Facebook Connect Error");
break;
}
},
error:function(){
document.body.style.cursor = "auto";
/* dcsMultiTrack(error);*/
}
});
} else {
setTimeout("refreshFacebook()",500);
}
}
function launchFacebookReplacePrompt(responseSet) {
$("#facebookReplacePoPFirstName").html(responseSet.currentFbUserName);
$("#facebookReplacePoPFirstImage").attr("src",responseSet.currentFbUserImageUrl);
$("#facebookReplacePoPSecondName").html(responseSet.newFbUserName);
$("#facebookReplacePoPSecondImage").attr("src",responseSet.newFbUserImageUrl);
$("#facebookReplacePop").modal({close: false});
}
function lazyRemove(funName) {
<!-- Commenting if as indexOf is not supported by IE. It seems JS 1.5 version is used -->
<!-- if (lazyList.indexOf(funName)>=0) -->
for (var i = 0;i<lazyList.length;i++)
{
if (lazyList == funName)
{
lazyList.splice(i,1);
break;
}
}
}
$(window).keydown(function(e){
if( e.which == 27 )
$.modal.close();
});
function showAlertPop(header, title, text) {
$("#alertPopBodyText span").remove();
$("#alertPopHeaderText span").remove();
$("#alertPopTitleText span").remove();
$("#alertPopHeaderText").append("<span id='alertPopHeaderTextLiner'></span>");
$("#alertPopHeaderTextLiner").html(header);
$("#alertPopTitleText").append("<span id='alertPopTitleTextLiner'></span>");
$("#alertPopTitleTextLiner").html(title);
$("#alertPopBodyText").append("<span id='alertPopBodyTextLiner'></span>");
$("#alertPopBodyTextLiner").html(text);
$("#alertPop").modal({close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#alertPopTop', cursor: 'move'});
}
});
}
function markAlertRead(alertId, messageId) {
$.ajax({
type: "POST",
data: "alertId="+alertId+"&messageId="+messageId,
url: "markAlertRead.do"
});
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
function resetSendMyselfEmailCaptcha() {
path = "/captchaImage?" + Math.random()*100000000;
$("#sendEmailCaptcha").attr("src",path);
}
function sendMyselfEmail(lbeID, url, paramList) {
if (paramList != null && paramList.length > 0) {
joinedList = paramList.join();
} else {
joinedList = "";
}
$.ajax({
url: "https://www.enjoymoremadness.com/sendMyselfEmail.do?lbeId="+lbeID+"&pageURL="+url+"¶mList="+joinedList,
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#sendMyselfInfoPop").html(html);
$("#lbeIdEmail").val(lbeID);
$("#pageURLEmail").val(url);
$("#paramListEmail").val(paramList);
$("#sendMyselfEmail").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
rules: {
securityKey: {
required: true
},
referEmail01: {
required: true,
email: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
referEmail01: {
required: "Oops - the email address is required",
email: "Oops - email address is not a proper format"
}
},
submitHandler: function(form) {
$("#sendMyselfEmailSubmitBtn").attr("disabled","disabled");
document.body.style.cursor = "wait";
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/sendMyselfEmail.do',
getUrl: '/sendMyselfEmailResponse.do',
dataType: 'html',
success: function(data) {
sendMyselfEmailResponse(data);
},
error: function(data) {
sendMyselfEmailError();
document.body.style.cursor = "auto";
$("#sendMyselfEmailSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#sendMyselfInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#textAFriendHandle,div', cursor: 'move'});
}
});
}
});
}
function sendMyselfEmailResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#sendMyselfEmailSubmitBtn").removeAttr("disabled");
$("#sendMyselfInfoPop").html(responsehtml);
$("#sendMyselfEmail").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
rules: {
securityKey: {
required: true
},
referEmail01: {
required: true,
email: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
referEmail01: {
required: "Oops - the email address is required",
email: "Oops - email address is not a proper format"
}
},
submitHandler: function(form) {
$("#sendMyselfEmailSubmitBtn").attr("disabled","disabled");
document.body.style.cursor = "wait";
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/sendMyselfEmail.do',
getUrl: '/sendMyselfEmailResponse.do',
dataType: 'html',
success: function(data) {
sendMyselfEmailResponse(data);
},
error: function(data) {
sendMyselfEmailError();
document.body.style.cursor = "auto";
$("#sendMyselfEmailSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Send+Myself+Email+Completion');
}
function textAFriend(lbeID, url, paramList) {
if (paramList != null && paramList.length > 0) {
joinedList = paramList.join();
} else {
joinedList = "";
}
$.ajax({
url: "https://www.enjoymoremadness.com/textAFriend.do?lbeId="+lbeID+"&pageURL="+url+"¶mList="+joinedList,
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#textInfoPop").html(html);
$("#lbeId").val(lbeID);
$("#pageURL").val(url);
$("#paramList").val(paramList);
$("#textAFriend").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
rules: {
securityKey: {
required: true
},
textPhone1: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone2: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone3: {
minlength: 4,
maxlength: 4,
required: true,
digits: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
textPhone1: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone2: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone3: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
}
},
groups: {
phone: "textPhone1 textPhone2 textPhone3"
},
submitHandler: function(form) {
$("#textAFriendSubmitBtn").attr("disabled","disabled");
document.body.style.cursor = "wait";
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/textAFriend.do',
getUrl: '/textAFriendResponse.do',
dataType: 'html',
success: function(data) {
textAFriendResponse(data);
},
error: function(data) {
textAFriendError();
document.body.style.cursor = "auto";
$("#textAFriendSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#textInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#textAFriendHandle,div', cursor: 'move'});
}
});
}
});
}
function textAFriendResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#textAFriendSubmitBtn").removeAttr("disabled");
$("#textInfoPop").html(responsehtml);
$("#textAFriend").validate({
errorClass: "formError",
errorContainer: "textAFriendFormError",
errorLabelContainer: "#textAFriendFormError",
onfocusout: false,
wrapper: 'li',
rules: {
securityKey: {
required: true
},
textPhone1: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone2: {
minlength: 3,
maxlength: 3,
required: true,
digits: true
},
textPhone3: {
minlength: 4,
maxlength: 4,
required: true,
digits: true
}
},
messages: {
securityKey: {
required: "Oops - the security key is required"
},
textPhone1: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone2: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
},
textPhone3: {
required: "Oops - the phone number is required",
minlength: "Oops - the phone number is incomplete",
digits: "Oops - the phone number must be all digits"
}
},
groups: {
phone: "textPhone1 textPhone2 textPhone3"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#textAFriendSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/textAFriend.do',
getUrl: '/textAFriendResponse.do',
dataType: 'html',
success: function(data) {
textAFriendResponse(data);
},
error: function(data) {
textAFriendError();
document.body.style.cursor = "auto";
$("#textAFriendSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Text+A+Friend+Completion');
}
function tellAFriend() {
if (false) {
$.ajax({
url: "https://www.enjoymoremadness.com/referAFriend.do",
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#tellInfoPop").html(html);
$('#emailToName2').keyup(function () {
if ($(this).val()) {
$('#emailToAddress2').addClass('required');
} else {
$('#emailToAddress2').removeClass('required');
}
});
$('#emailToName3').keyup(function () {
if ($(this).val()) {
$('#emailToAddress3').addClass('required');
} else {
$('#emailToAddress3').removeClass('required');
}
});
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
$("#referSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/referAFriend.do',
getUrl: '/referAFriendResponse.do',
dataType: 'html',
success: function(data) {
referAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#referSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#tellInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div, div#referAFriendHandle', cursor: 'move'});
}
});
}
});
} else {
$("#tellUnauthInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#tellUnauthInfoPopTop', cursor: 'move'});
}
});
}
}
function shareWithAFriend(itemId) {
$.ajax({
url: "https://www.enjoymoremadness.com/shareWithAFriend.do?itemId="+itemId,
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#tellInfoPop").html(html);
$("#itemId").val(itemId);
$('#emailToName2').keyup(function () {
if ($(this).val()) {
$('#emailToAddress2').addClass('required');
} else {
$('#emailToAddress2').removeClass('required');
}
});
$('#emailToName3').keyup(function () {
if ($(this).val()) {
$('#emailToAddress3').addClass('required');
} else {
$('#emailToAddress3').removeClass('required');
}
});
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#shareSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithAFriend.do?itemId='+itemId,
getUrl: '/shareWithAFriendResponse.do',
dataType: 'html',
success: function(data) {
shareWithAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#tellInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#referAFriendHandle,div', cursor: 'move'});
}
});
}
});
}
function moveOnMax(field,nextFieldID){
if(field.value.length >= field.maxLength){
document.getElementById(nextFieldID).focus();
}
}
function shareWithAFriendLBE(lbeId) {
shareWithAFriendLBEWithURL(lbeId, '')
}
function shareWithAFriendLBEWithURL(lbeId, url) {
shareWithAFriendMaster(lbeId, url, '')
}
function shareWithAFriendMaster(lbeId, url, paramList) {
codeErrorSignIn();
}
function tellAFriendSchool() {
$.ajax({
url: "https://www.enjoymoremadness.com/shareWithASchoolFriend.do",
type: "GET",
dataType: "jsonp",
success: function(html) {
$("#tellInfoPop").html(html);
$('#emailToName2').keyup(function () {
if ($(this).val()) {
$('#emailToAddress2').addClass('required');
} else {
$('#emailToAddress2').removeClass('required');
}
});
$('#emailToName3').keyup(function () {
if ($(this).val()) {
$('#emailToAddress3').addClass('required');
} else {
$('#emailToAddress3').removeClass('required');
}
});
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#shareSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithASchoolFriend.do',
getUrl: '/shareWithASchoolFriendResponse.do',
dataType: 'html',
success: function(data) {
tellAFriendSchoolResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
$("#tellInfoPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div, div#referAFriendHandle', cursor: 'crosshair'});
}
});
}
});
}
function tellAFriendSchoolResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
$("#tellInfoPop").html(responsehtml);
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#referSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithASchoolFriend.do',
getUrl: '/shareWithASchoolFriendResponse.do',
dataType: 'html',
success: function(data) {
tellAFriendSchoolResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
}
function referAFriendResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
$("#tellInfoPop").html(responsehtml);
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
$("#referSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/referAFriend.do',
getUrl: '/referAFriendResponse.do',
dataType: 'html',
success: function(data) {
referAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#referSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Tell+A+Friend+Completion');
}
function shareWithAFriendResponse(responsehtml) {
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
$("#tellInfoPop").html(responsehtml);
$("#emailFriend").validate({
errorClass: "formError",
errorContainer: "#referAFriendFormError",
errorLabelContainer: "#referAFriendFormError",
onfocusout: false,
wrapper: 'li',
messages: {
referName01: {
required: "Oops - at least one name is required"
},
referEmail01: {
required: "Oops - at least one email address is required",
email: "Oops - check your email addresses for proper format."
},
referEmail02: {
email: "Oops - check your email addresses for proper format."
},
referEmail03: {
email: "Oops - check your email addresses for proper format."
},
securityKey: {
required: "Oops - the security key is required."
}
},
groups: {
emailGroup: "referEmail01 referEmail02 referEmail03"
},
submitHandler: function(form) {
document.body.style.cursor = "wait";
$("#shareSubmitBtn").attr("disabled","disabled");
jsonWithFrameSubmit({
form: form,
postUrl: 'https://www.enjoymoremadness.com/shareWithAFriend.do',
getUrl: '/shareWithAFriendResponse.do',
dataType: 'html',
success: function(data) {
shareWithAFriendResponse(data);
},
error: function(data) {
referAFriendError();
document.body.style.cursor = "auto";
$("#shareSubmitBtn").removeAttr("disabled");
}
});
}
});
trackWebtrends('z_engage', 'Tell+A+Friend+Completion');
}
function referAFriendError() {
document.body.style.cursor ="auto";
}
function sendMyselfEmailError() {
document.body.style.cursor ="auto";
}
function textAFriendError() {
document.body.style.cursor ="auto";
}
function showRules(ruleKey) {
$.ajax({
url: "/rules.do",
type: "POST",
data: {"ruleKey":ruleKey},
timeout: 15000,
success: function(html) {
$("#rulesPop").html(html);
$.ajax({
type: "GET",
url: rulesUrlLink,
timeout: 15000,
dataType: "xml",
success: function(xml){
var contentRules = $("content",xml).text();
$('#rulesPopScrollContent').html(contentRules);
$('#rulesPopScrollContent').find('*').css('color','#ffffff');
},
error: function(xml){
$('#rulesPopScrollContent').html("There was an error in fetching the XML file from: " + rulesUrlLink);
}
});
$("#rulesPop").modal({
close: false,
onShow: function(dialog) {
dialog.container.draggable({handle: 'div#rulesPopHandle, div#rulesPopHandleBeta', cursor: 'move'});
}
});
}
});
}
function showRTERules(rtePath) {
$.ajax({
url: "/rules.do",
type: "POST",
timeout: 15000,
success: function(html) {
$("#rulesPop").html(html);
$.ajax({
url: "/en_US/legal/mobile_terms_of_use_en_US.xml",
type: "GET",
timeout: 15000,
dataType: "xml",
success: function(xml){
var content;
$(xml).find('field').each(function() {
if ($(this).find('name').text() == "richText") {
$('#rulesPopScrollContent').html($(this).find('value').text());
}
});
}
});
$("#rulesPop").modal({
close: false,
onShow: function(dialog) {
dialog.container.draggable({handle: 'div#rulesPopHandle, div#rulesPopHandleBeta', cursor: 'move'});
}
});
}
});
}
function addMemberNugget(type, value) {
$.ajax({type:'POST',url:'addMemberNugget.do',data:'linkType=' + type + '&value=' + value});
}
var _tag={
dcsMultiTrack:function() {
var args = Array.prototype.slice.apply(arguments);
window['dcsMultiTrack'].apply(this, args);
}
}
htmlExpTrackWT=function(){
var args = Array.prototype.slice.apply(arguments);
var caller = args.shift();
var vhref =caller.href;
try{
if (args.length%2==0){
if(typeof caller.target != 'undefined' && caller.target.toLowerCase() == '_blank' ) {
window['dcsMultiTrack'].apply(this, args); } else {
var trackClose = false;
$.each(args, function(index, value){
var trackStringClose = value.indexOf("Close");
if (trackStringClose > -1) {trackClose=true;}
});
window['dcsMultiTrack'].apply(this, args);
}
}
}catch(e){}
if(typeof caller.target != 'undefined' && caller.target.toLowerCase() == '_blank' ){
return true;
}else{
setTimeout('window.location.href = "'+vhref+'"', 500);
return false;
}
}
</script>
<script type="text/javascript">
var flashvars = {};
var params = {
menu: "false",
scale: "noScale"
};
var attributes = {
id : "flashProxy"
};
swfobject.embedSWF("/swf/ProxyAS2.swf", "altContent", "1px", "1px", "8.0.0", "expressInstall.swf", flashvars, params,attributes);
</script>
<script type="text/javascript">
// This can be overwritten when needed
var dartKey = 'home';
</script>
<script src="/en_US/dart/dart_zones_en_US.js?ver=02242014" type="text/javascript"></script>
<link href="/flex-mod/desktop/common/global.css?ver=02242014" rel="stylesheet" type="text/css" />
<link href="/flex-mod/desktop/cokezero/common/cokezero.css?ver=02242014" rel="stylesheet" type="text/css" />
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="/css/iespecific.css?ver=02242014" />
<![endif]-->
<!-- START OF SmartSource Data Collector TAG v10.2.0 -->
<!-- Copyright (c) 2012 Webtrends Inc. All rights reserved. -->
<script src="/flex-mod/js/tracking/webtrends-v10-2-1-rev04.js?ver=02242014" type="text/javascript"></script>
<script type="text/javascript">
var dcs;
dcs=new Webtrends.dcs().init({
dcsid:"dcs5rrna910000oev48s9cjg1_4o3i"
,domain:"statse.webtrendslive.com"
,timezone:-5
,adimpressions:true
,adsparam:"WT.ac"
,offsite:true
,download:true
,downloadtypes:"xls,doc,pdf,txt,csv,zip,docx,xlsx,rar,gzip"
,onsitedoms:"enjoymoremadness.com"
,i18n:false
,plugins:{
hm:{src:"//s.webtrends.com/js/webtrends.hm.js",hmurlparams:"WT.ac"}
}
});
dcs.WT.cg_n='error'; // Can be overwritten as needed
dcs.WT.cg_s='unknown'; // Can be overwritten as needed
dcs.WT.z_channel='desktop';
dcs.WT.z_program='cokezero';
/*
(function(){
var s=document.createElement("script"); s.async=false; s.src="/en_US/js/tracking/webtrends/webtrends-v10_en_US.js";
var s2=document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(s,s2);
}());
*/
</script>
<!-- END OF SmartSource Data Collector TAG v10.2.0 -->
<script type="text/javascript" src="/en_US/js/tracking/floodlight/tracking_en_US.js?ver=02242014"></script>
<script>
function getBasePath() { return ""; }
function getSecureBasePath() { return "https://www.enjoymoremadness.com"; }
function isLoggedIn() { return "false"; }
function getMemberEli() { return "";}
function getMemberFirstName() { return ""; }
function getMemberPoints() { return "na"; }
function getMemberAge() { return "na"; }
function getMemberGender() { return "na"; }
function getMemberState() { return "na"; }
<!-- i2a tracking code for registration -->
var order_code="";
var pageAction = "";
function trackI2ATagForRegistration(){
order_code = "";
pageAction = "980";
}
function trackI2ATagForRegistrationOptin(){
order_code = "";
pageAction = "336";
}
<!-- i2a tracking code for Social tags-->
function trackI2ATagForSocial(){
pixel_conversion('2976');
}
<!-- i2a tracking code for code entry-->
function trackI2ATagForCodeEntry(){
pageAction = "3886";
}
<!-- i2a tracking code for first time visitor-->
function trackI2ATagForFirstTimeVisitor(){
order_code = "";
pageAction = "4036";
}
function trackFloodLightTag(invokedFrom) {
var randomNum = Math.random() * 10000000000000;
var memberIdParam = ';u1=';
var sendMemberId = false;
var protocol = tags[invokedFrom][0]
try {
if (tags[invokedFrom][3] == 'sendMemberId')
sendMemberId = true;
} catch (err) {
sendMemberId = false;
}
if (sendMemberId == true) {
$(document.body).append(
'<IFRAME SRC="' + protocol
+ '://fls.doubleclick.net/activityi;src=1352258;type='
+ tags[invokedFrom][1] + ';cat=' + tags[invokedFrom][2]+ memberIdParam + ';ord=' + randomNum
+ '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
} else {
$(document.body).append(
'<IFRAME SRC="' + protocol
+ '://fls.doubleclick.net/activityi;src=1352258;type='
+ tags[invokedFrom][1]+ ';cat=' + tags[invokedFrom][2]
+ ';ord=' + randomNum
+ '?" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
}
}
function trackFloodLight(invokedFrom, protocol) {
trackFloodLightTag(invokedFrom);
// protocol is being ignored and will be fetched from an array in
// tags_en_US. This function is there just to support existing calls in LBEs
}
function addForTracking(id, val) {
eval("dcs.WT." + id + "= '" + val + "'");
}
function collectWebtrends() {
setTimeout('dcsMultiTrack();', 600);
}
function trackWebtrends(id, val) {
eval("dcs.WT." + id + "= '" + val + "'");
setTimeout('dcsMultiTrack();', 600);
}
function jsonWithFrameSubmit (params){
var iframeName = "loginIframeBox";
var jsonfId = +new Date();
if ($("#"+iframeName).size()==0) {
$("body").append("<iframe name=\""+iframeName+"\" id=\""+iframeName+"\" src=\"/images/spacer.gif\" height=\"0\" width=\"0\" border=\"0\" style=\"display:none;\" ></iframe>");
}
var timeout = 30000;
if (params.timeout) {
timeout = params.timeout;
}
var timerRunning = true;
var t = setTimeout(function(){timerRunning = false;params.error(null, "timeout", null);},timeout);
$("#"+iframeName).load(function() {
if (timerRunning) {
clearTimeout(t);
if (!params.data) {
params.data = new Object();
}
params.data.jsonf=jsonfId;
$.ajax({
type: "GET",
url: params.getUrl,
dataType: params.dataType,
data: params.data,
timeout: params.timeout,
cache: false,
success: function(responseSet, textStatus) { params.success(responseSet, textStatus); },
error: params.error
});
}
$("#"+iframeName).unbind();
});
$(params.form).append("<input type=\"hidden\" name=\"jsonf\" value=\""+jsonfId+"\" />");
$(params.form).attr("target",iframeName);
$(params.form).attr("action",params.postUrl);
$(params.form).attr("method","POST");
params.form.submit();
}
function showBothCode() {
$("#bothCodePop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div, div#bothCodePopTop', cursor: 'move'});
}
});
}
function changeSchoolPop(startFlow,updateDiv,searchItem) {
$("#updateLocation").val(updateDiv);
$("#startFlow").val(startFlow);
$("#schoolSearchItem").val(searchItem);
document.body.style.cursor = "wait";
$.ajax({
type: "GET",
url: "/schoolSearchPop.do",
dataType: "HTML",
timeout: 30000,
success: function(html) {
$("#schoolSelectorPopBody").html(html);
document.body.style.cursor = "auto";
$("#schoolSelectorPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#schoolSelectorPopTop', cursor: 'move'});
}
});
},
error: function() {
$("#schoolPopError").html("<h3 style='padding:10px;'>Information is currently unavailable</h3>");
document.body.style.cursor = "auto";
$("#schoolSelectorPop").modal({ close: false,
onShow: function (dialog) {
dialog.container.draggable({handle: 'div#schoolSelectorPopTop', cursor: 'move'});
}
})
}
});
}
</script>
</head>
<body>
<div id="container">
<div id="wrapper">
<script type="text/javascript">
var loginReady = false;
var loginDelay = 1000;
function codeErrorSignInWithRedirect(redirectUrl){
codeErrorSignIn();
$("#loginErrorBody2>a").attr("href", "/register.do?redirectUrl="+redirectUrl);
}
function codeErrorSignIn() {
$.cookie('mcrRewardCode',$('#rewardCode').val());
$('#loginErrorTitle').html("You're almost there...");
$('#loginErrorBody').html("Just sign in to continue.");
$('#loginErrorBody2').html("If you're new here, welcome... <a href='https://www.enjoymoremadness.com/register.do' style='text-decoration:underline'>register</a> to get going (it just takes a few moments).");
$('#codeErrorSignInPop').show();
}
function invalidPassword() {
$('#loginErrorTitle').html("Uh oh...<br/>We don't recognize your email address or password.<br/>Forgot your password? <a href='home.do?resetPassword=true' id='signInResetLink' style='text-decoration:underline;' >Reset it now</a>.");
$('#loginErrorBody').html("<br/><br/>If you continue to have trouble signing in, try to sign in <a href='/signin.do' style='text-decoration:underline'>here</a>.");
$('#signInResetLink').attr("href","javascript:$('#codeErrorSignInPop').hide();forgotPassword();");
$('#codeErrorSignInPop').show();
submitLoginAllowed = true;
$('#loginSubmitBtn').removeAttr('disabled');
$('#passwordText').val('');
dcsMultiTrack('WT.z_errTrack', 'login-Invalid+login+or+password');
}
function suspendedAccount() {
$('#loginErrorTitle').html("Uh oh...<br/>We don't recognize your email address or password.<br/>Forgot your password? <a href='home.do?resetPassword=true' id='signInResetLink' style='text-decoration:underline;' >Reset it now</a>.");
//$('#loginErrorBody').html("<br/><br/>If you continue to have trouble signing in, try to sign in <a href='/signin.do' style='text-decoration:underline'>here</a>.");
$('#codeErrorSignInPop').show();
submitLoginAllowed = true;
$('#loginSubmitBtn').removeAttr('disabled');
dcsMultiTrack('WT.z_errTrack', 'login-Suspended+account');
}
function invalidLocation() {
//$('#loginErrorTitle').html("Uh oh...<br/>We don't recognize your email address or password.<br/>Forgot your password? <a href='home.do?resetPassword=true' id='signInResetLink' style='text-decoration:underline;' >Reset it now</a>.");
$('#loginErrorBody').html("This site is only for U.S. residents.");
$('#codeErrorSignInPop').show();
submitLoginAllowed = true;
$('#loginSubmitBtn').removeAttr('disabled');
dcsMultiTrack('WT.z_errTrack', 'invalid_locale');
}
function ipAddressBlocked() {
$('#loginErrorTitle').html("");
$('#loginErrorBody').html("Uh oh? we are unable to sign you in right now, please try again later.");
$('#codeErrorSignInPop').show();
}
function systemError(data) {
$('#loginErrorTitle').html("We are sorry,");
$('#loginErrorBody').html("We were unable to complete your sign in request at this time. Please try again in a few moments.");
errorMsg = data.errorMessage;
$('#loginErrorMessage').html(errorMsg);
$('#codeErrorSignInPop').show();
$('select').hide();
}
var submitLoginAllowed = true;
function submitLogin() {
/* $.cookie('mcrRewardCode',$('#rewardCode').val()); */
if (($("#emailAddress").val() == null) || ($("#passwordText").val() == null)) {
invalidPassword();
} else if ("true" == isWirelessDevice){
$("#loginForm").submit();
} else {
submitLoginAllowed = false;
document.body.style.cursor = "wait";
$('#loginSubmitBtn').attr('src','/flex-mod/desktop/cokezero/images/waitDisk.gif');
$('#loginSubmitBtn').attr('disabled','disabled');
jsonWithFrameSubmit({
form: $("#loginForm"),
-----
so I was trying to enter Coke's free NCAA bracket challenge when the webpage crashed on me.
here's the first 50k chars of the code.
-Enjoy
Last edited:
