
function newCookieParse(key, keyvalStr){
var keyStr = key + "=";
var kvLen = keyvalStr.length;
var keyStrIndex = 0;
var val = "";
while (keyStrIndex < kvLen){
var myIndex = keyStrIndex + keyStr.length;
if (keyvalStr.substring(keyStrIndex,myIndex) == keyStr){
var myVarEnd = keyvalStr.indexOf ("&", myIndex);
if (myVarEnd == -1) myVarEnd = kvLen;
val = keyvalStr.substring(myIndex,myVarEnd);
return val;
}
keyStrIndex = keyvalStr.indexOf("&", keyStrIndex) + 1;
if(keyStrIndex == 0) keyStrIndex = kvLen;
}
return "";
}
var acceptsCookies = false;
if(document.cookie == '') {
document.cookie = 'acceptsCookies=yes';
if(document.cookie.indexOf('acceptsCookies=yes') != -1) {
acceptsCookies = true;
}
} else {
acceptsCookies = true;
}
function setCookie (name, value, hours, path, domain, secure) {
var not_NN2 = (navigator && navigator.appName && (navigator.appName == 'Netscape') && navigator.appVersion && (parseInt(navigator.appVersion) == 2))?false:true;
if(hours && not_NN2) {  if ( (typeof(hours) == 'string') && Date.parse(hours) ) {  var numHours = hours;
} else if (typeof(hours) == 'number') {  var numHours = (new Date((new Date()).getTime() + hours*3600000)).toGMTString();
}
}
document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':'');  }
function readCookie(name) {
name += "=";
if(document.cookie == '') {
return false;
} else {
var firstChar, lastChar;
var theBigCookie = document.cookie;
firstChar = theBigCookie.indexOf(name);
var nameStartIdx =			theBigCookie.indexOf(name);
var preFirstCharInName = 	theBigCookie.substring(nameStartIdx-1,nameStartIdx);
if (preFirstCharInName != "" && preFirstCharInName != " ") {
name = ' '+name;
firstChar = theBigCookie.indexOf(name);
}
if (firstChar != -1) {
if (firstChar != -1) firstChar += name.length;
lastChar = theBigCookie.indexOf(';', firstChar);
if(lastChar == -1) lastChar = theBigCookie.length;
return unescape(theBigCookie.substring(firstChar, lastChar));
} else {
return false;
}
}
}
function killCookie(name, path, domain) {
var theValue = readCookie(name);  if(theValue) {
document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'');  }
}  function updateCookieShared (name,chip,value) {
var CookieShared = readCookie(name);
var updateChipShared =  chip + "=" + value + "&";
if (readCookie(name) == "") {
var newCookieShared = updateChipShared;
} else {
if (newCookieParse(chip,readCookie(name)) == "") {
var newCookieShared = readCookie(name) + updateChipShared;
} else {
var thisChip = chip + "=" + newCookieParse(chip,readCookie(name)) + "&";
var newCookieShared = CookieShared.replace(thisChip, updateChipShared);
}
}
if (name == 'PC') {
var expireDate = 'Wed, 29 Dec 2010 23:23:59 GMT';
} else {
var expireDate = '';
}
setCookie(name,newCookieShared,expireDate,'/','.iwon.com')
}
function deleteCookieShared	(name, chip) {
var CookieShared = readCookie(name);
var CookieSharedChip = newCookieParse(chip,readCookie(name));
if (CookieShared != "" || CookieShared != "false") {
if (CookieSharedChip != "" && CookieSharedChip != "undefined" && CookieSharedChip != null) {
var thisChip = chip + "=" + CookieSharedChip + "&";
newCookieShared = CookieShared.replace(thisChip, "");
if (newCookieShared == "") {
var newCookieShared = "foo&";
}
setCookie(name,newCookieShared,'Wed, 29 Dec 2010 23:23:59 GMT','/','.iwon.com')
}
}
}
var CookieSC = readCookie('SC');
function readCookieSC (chip) {
return (newCookieParse(chip,CookieSC));
}
function updateCookieSC (chip,value) {
updateCookieShared('SC',chip,value)
}
function deleteCookieSC	(chip) {
deleteCookieShared('SC',chip)
}
var CookiePC = readCookie('PC');
function readCookiePC (chip) {
return (newCookieParse(chip,CookiePC));
}
function updateCookiePC (chip,value) {
updateCookieShared('PC',chip,value)
}
function deleteCookiePC	(chip) {
deleteCookieShared('PC',chip)
}
function isCanadian() {
country = newCookieParse('Q', readCookie('P'));
if (country.toUpperCase() == "CA") {return true;} else {return false;}
}
if ((typeof mexIsMyPg) == "undefined") var mexIsMyPg = 0;
if (mexIsMyPg == 1) {
	 if ((typeof mexContBdr) == "undefined") var mexContBdr = 'CECF9C';
	if ((typeof mexBdyLnk) == "undefined") var mexBdyLnk = '#3366cc';
	if ((typeof mexBdyTxt) == "undefined") var mexBdyTxt = '#666666';
	var bbarNavBg = '';
	var bbarNavUl = '<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td bgcolor='+mexContBdr+'><table border=0 cellspacing=0 cellpadding=0><tr><td height=1></td></tr></table></td></tr></table>';
	var bbarNavPad = '1';
	var fSmLnksO_clr = mexBdyLnk;
	var fBoO_clr = mexBdyTxt;
} else {
	var bbarNavBg = 'bgcolor=d5effe';
	var bbarNavUl = '<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td '+bbarNavBg+'><table border=0 cellspacing=0 cellpadding=0><tr><td height=2></td></tr></table></td></tr></table>';
	var bbarNavPad = '1';
	var fSmLnksO_clr = '#3366cc';
	var fBoO_clr = '#666666';
}
var styleTags = '<style>' +
	'.fSmLnksO {font-size:8pt;font-family:verdana;color:'+fSmLnksO_clr+';font-weight:bold;}'+
	'.fSmDrkO {font-size:8pt;font-family:verdana;color:#000000;font-weight:bold;}'+
	'.fSmGldO {font-size:8pt;font-family:verdana;color:#ffcc00;font-weight:bold;}'+
	'.fSmErrO {font-size:8pt;font-family:verdana;color:#ccFFFF;font-weight:bold;}'+
	'.fSmLgtO {font-size:8pt;font-family:verdana;color:#ffffff;font-weight:bold;}'+
	'.fSmO {font-size:8pt;font-family:verdana;}'+
	'.fSmNBO {font-size:8pt;font-family:verdana;color:#ffffff;}'+
	'.fSmNBaltO {font-size:8pt;font-family:verdana;color:#ccFFFF;}'+
	'.fLgO {font-family:verdana;color:#ffffff;font-weight:bold;}'+
	'.fBoO {font-size:10px;font-family:verdana;color:'+fBoO_clr+';}'+
	'</style>' ;
document.write(styleTags);

var fSmLnksO='<span class=fSmLnksO><font size=1 color='+fSmLnksO_clr+'>';
var fSmDrkO='<span class=fSmDrkO><font size=1 color=#000000>';
var fSmGldO='<span class=fSmGldO><font size=1 color=#ffcc00>';
var fSmErrO='<span class=fSmErrO><font size=1 color=#ccFFFF>';
var fSmLgtO='<span class=fSmLgtO><font size=1 color=#ffffff>';
var fSmO='<span class=fSmO><font size=1>';
var fSmNBO='<span class=fSmNBO><font size=1 color=#ffffff>';
var fSmNBaltO='<span class=fSmNBaltO><font size=1 color=#ccFFFF>';
var fLgO='<span class=fLgO><font size=2>';
var fBoO='<span class=fBoO>';
var fC='</font></span>';

var useSecureImg = 0;
if (parent.frames.length != 0) {
	 for (var i=0; i < eval(parent.frames); i++) {
		var httpRequest = parent.frames[i].location.href;
		if (httpRequest.substring(0,5) == "https") var useSecureImg = 1
	}
} else {
	 var httpRequest = parent.location.href;
	if (httpRequest.substring(0,5) == "https") var useSecureImg = 1
}
if (useSecureImg == 0) {
	var questionImage = "http://i1img.com/images/question3.gif"
	var EmailImageAnim = "http://i1img.com/images/email_new_bb_anim1_trans.gif";
	var EmailImageStatic = "http://i1img.com/images/email_new_bb_static_trans.gif";
} else {
	var questionImage = "https://mycashpoints.iwon.com/cash_points/images/question3.gif"
	var EmailImageAnim = "https://mycashpoints.iwon.com/cash_points/images/email_new_bb_anim1.gif";
	var EmailImageStatic = "https://mycashpoints.iwon.com/cash_points/images/email_new_bb_static.gif";
}
function getCookie (name) {
    var cname = name + "=";
    var clen = document.cookie.length;
    var cbegin = 0;
    while (cbegin < clen) {
		var vbegin = cbegin + cname.length;
		if (document.cookie.substring(cbegin, vbegin) == cname) { 
		    var vend = document.cookie.indexOf (";", vbegin);
		    if (vend == -1) vend = clen;
		    return unescape(document.cookie.substring(vbegin, vend));
		}
		cbegin = document.cookie.indexOf(" ", cbegin) + 1;	
		if(cbegin == 0) cbegin = clen;
    }
    return null;
}
var b_cookie = readCookie('b');
function getValsfromString(instr) {
  if ( instr.length != 16 ) { return(null) ; }
  val = new Array() ;
  for (x=0 ; x < 16 ; x++) {
    var n = parseInt(instr.charAt(x), 16) ;
    for (y=0 ; y < 4 ; y++) {
      val[x*4+y] = ( (n >> (3-y)) % 2 == 1 ) ? true : false ;
    }
  }
  return(val);
}	
var MlText = '<td>'+fBoO+'7 > '+fC+'<a href=http://www.iwon.com/home/email/email_init/0,17107,,00.html?PG=global?SEC=bnav>'+fSmLnksO+'Email'+fC+'</a><font size=1> </font>';
MlDefText = '<a href=http://www.iwon.com/home/email/email_init/0,17107,,00.html?PG=global?SEC=bnav><img src="' + EmailImageStatic + '" border=0 align=absmiddle width=14 height=10></a>';
if (b_cookie != null && b_cookie != false) {
	MlVal = newCookieParse('h',b_cookie);	
	var ParsedMlVal = getValsfromString(MlVal);
	if (ParsedMlVal != null) {
		if (ParsedMlVal[32] == true) {
			MlText += '<a href=http://www.iwon.com/home/email/email_init/0,17107,,00.html?PG=global?SEC=bnav><img src="' + EmailImageAnim + '" border=0 align=absmiddle width=14 height=10></a>';
		} else {
			MlText += MlDefText;
		}
	} else {
		MlText += MlDefText;
	}
} else {
	MlText += MlDefText;
}
MlText += '</td>';


var cashpointdollars = '0';
var inSignin = false;
var inRegistration = false;
var boneCountFormat;
var boneOutputBox;
var boneOutputValues;
var dollars = "---";
rndToday=new Date();
rndSeed=rndToday.getTime();
var ssuid = readCookie('ssuid');
var user_num = readCookie('user_num');
function addCommas(num) {
	grab = 3;
	if (num.indexOf(".") > -1)
		grab = 3 + (num.length - num.indexOf("."));
	var numWithCommas = ""	
	if(num.length <= grab) {
		return num;
	}
	for(var i = num.length - grab;  i > 0;  i -= 3) {
	var temp_num = num.substring(i, i+grab);
	if (temp_num.indexOf("-") > -1) {
		numWithCommas = num.substring(i, i+grab) + numWithCommas;
	} else {
		numWithCommas = "," + num.substring(i, i+grab) + numWithCommas;
	}
		grab = 3;
	}
	
	if (num.substring(0, Math.abs(3+i)) == "$-" || num.substring(0, Math.abs(3+i)) == "$") {
		if (num.substring(0, Math.abs(4+i)) == "$-") {
			numWithCommas = num.substring(0, Math.abs(3+i)) + numWithCommas.substring(0);
		} else {
			numWithCommas = num.substring(0, Math.abs(3+i)) + numWithCommas.substring(1);
		}
	} else {
		numWithCommas = num.substring(0, Math.abs(3+i)) + numWithCommas;	
	}
	
	return numWithCommas;
}
if(b_cookie == null) {
	var errorcode = readCookie('errorcode');
} else {
	var errorcode = newCookieParse('e',b_cookie);
}	
function showFirstBox() {
	if(inRegistration) {
		document.write('<br>');
		boneCountFormat = 2;
	}
	else if(inSignin) {
		document.write('<br>');
		boneCountFormat = 2;
	}
	else if(ssuid == null || user_num == null || user_num == "" || user_num == false || ssuid == '-1' || errorcode == '4' || errorcode == null) {
		boneOutputBox = '<div align=center><a href="http://www.iwon.com/home/login/0,11732,,00.html">'+fSmLgtO+'Existing Members'+fC+'</a><br><a href="http://www.iwon.com/home/login/0,11732,,00.html">'+fSmLgtO+'Sign In'+fC+'</a>';
		boneCountFormat = 1;
	}
	else {
		if(errorcode == 1) {
			boneOutputBox = fSmErrO+'Hold on, we\'re busy<br>counting your entries.'+fC;
			boneCountFormat = 1;
		}
		else if(errorcode == 2) {
			boneOutputBox = fSmErrO+'We\'re sorry, we are<br>experiencing some<br>technical difficulties.'+fC;
			boneCountFormat = 1;
		}
		else if(errorcode == 3){
			var fname = readCookie('fname');
			boneOutputBox = fLgO+'Hi, '+fname+fC+'<br><a href="http://www.iwon.com/home/my_entries/100entries/0,14965,,00.html">'+fSmNBaltO+'Congrats!&nbsp;100&nbsp;entries'+fC+'</a>'; 
			boneCountFormat = 0;
		}else{
			var fname = readCookie('fname');
			boneOutputBox = fLgO+'Hi, '+fname+fC+'<br><a href="http://www.iwon.com/home/user_reg_and_login/signout_confirm/0,14789,,00.html">'+fSmNBaltO+'I am not '+fname+fC+'</a>'; 
			boneCountFormat = 0;
		}
	}
return boneOutputBox;
}

var bBarDailyDesc 	= "Chances for";
var bBarDailyLink 	= "http://winners.iwon.com/winners.html?PG=global?SEC=bbar";
var bBarDailyPriz 	= "$10,000";
var bBarMonthlyDesc = "Chances for";
var bBarMonthlyLink = "http://monthlyprizes.iwon.com/mp/overview.jsp?PG=global?SEC=bbar";
var bBarAnnualDesc 	= "Chances for";
var bBarAnnualLink = "http://www.iwon.com/home/winning/annual_winners_overview/0,16120,,00.html?PG=global?SEC=bbar"
if(ssuid == null || user_num == null || user_num == "" || user_num == false || ssuid == '-1' || errorcode == '4' || errorcode == null) {
var bBarDailyLink = "http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar";
var bBarMonthlyLink = "http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar";
var bBarAnnualLink = "http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar";
}

if(b_cookie == null || b_cookie == false || ssuid == null || user_num == null || user_num == "" || user_num == false || ssuid == '-1') {
	 bBarDayIndex = '-1';
} else {
	 var Dchip = newCookieParse('D',b_cookie);
	if(Dchip != null) {
		bBarDay = new Array();
		bBarDay[0] = 'Weekend';
		bBarDay[1] = 'Monday';
		bBarDay[2] = 'Tuesday';
		bBarDay[3] = 'Wednesday';
		bBarDay[4] = 'Thursday';
		bBarDay[5] = 'Friday';
		bBarDay[6] = 'Weekend';
		bBarDayIndex   = newCookieParse('D',b_cookie);
		bBarDayName    = bBarDay[bBarDayIndex];
		var bBarDailyDesc 	= bBarDayName;
		var bBarAnnualDesc 	= "Annual";
		if (bBarDayIndex == 6 || bBarDayIndex == 0) {
			var bBarDailyPriz 	= "5x$1,000";	
			var bBarDailyLink 	= "http://winners.iwon.com/weekend.html";
		} 
	}
}
function showBoneCount(mode, which) {
	var output = "";
	var title = ""; 
	var w_key = ""; 
	var w_val = ""; 
	var w_keynum ; 
	var w_valnum ; 
	var w_limit = ""; 
	var w_needed = ""; 
	if(boneCountFormat == 0) {
		if(b_cookie != null || b_cookie == "" || b_cookie == false ) {
			if(which == "daily") {
				 if (bBarDayIndex != 0) {
					 output = newCookieParse('d',b_cookie);
				} else {
					 var sundayPoints = parseInt(newCookieParse('d',b_cookie)) -  parseInt(newCookieParse('P',b_cookie));
					var sundayPointsStr = ""+sundayPoints+"";
					output = sundayPointsStr;
				}
			} else if (which == "weekly") {
				output = b_cookie;
			} else if (which == "monthly") {
				output = newCookieParse('m',b_cookie);
			} else if (which == "yearly") {
				output = newCookieParse('y',b_cookie);
			} else if (which == "cashback") {
				output = newCookieParse('b',b_cookie);
				if (output == '' || output == 0) {
				link = 'http://products.iwon.com/cashback/home.jsp'
				output = '<a href="' + link + '?PG=global?SEC=bbar">'+fSmLgtO+'Click Here!'+fC+'</a>';
				} else {
				calc = output * 0.01 + 0.001;
				if (output < 0) {
					calc = calc - 0.002;
				}
				temp = calc + " ";
				output = '$' + temp.substring(0,temp.indexOf(".") + 3);
				output = addCommas(output);
				}
			} else if (which == "dollars") {
				output = newCookieParse('c',b_cookie);
				if (output != false) {
					calc = output * 0.01 + 0.001;
					temp = calc + " ";
					output = temp.substring(0,temp.indexOf(".") + 3);
					cashpointdollars = output;
				} else {
					 output = "---";
				}
			} else {
			}
		} else {
			output = readCookie(which);
		}			
		
		if(output == null) {
			output = "--";
		} else {
			if((errorcode == 3) && (which == "daily")) {
				if (bBarDayIndex == 0 || bBarDayIndex == 6 && which == "daily") {
					 title = fSmNBO+"Total "+newCookieParse('d',b_cookie)+fC+"<br>";
				} else {
					 title = fSmNBO+"Limit"+fC+"<br>";
				}
			} else if (which == "dollars" || which =="cashback") {
				title = "";
			} else if (bBarDayIndex == -1) {
				 if (which == "yearly") {
					linkHere = bBarAnnualLink;
				} else if (which == "monthly") {
					linkHere = bBarMonthlyLink;
				} else {
					linkHere = bBarDailyLink;
				}
				output = "<a href='"+linkHere+"?PG=global?SEC=bbar'>"+fSmLgtO+"HERE!"+fC+"</a>";
				title = "<a href='"+linkHere+"?PG=global?SEC=bbar'>"+fSmLgtO+"CLICK"+fC+"</a><br>";
			} else {
				var EntriesText = "Entries";
				if (bBarDayIndex == 0 && which == "daily") {
					 title = fSmNBO+"Total "+newCookieParse('d',b_cookie)+fC+"<br>";
				} else {
					 if (which == "daily") {
						var bBarLink = bBarDailyLink;
					} else if (which == "yearly") {
						var bBarLink = bBarAnnualLink;
					} else if (which == "monthly") {
						var bBarLink = bBarMonthlyLink;

						MBPVal = newCookieParse('h',b_cookie);	
						var ParsedVal = getValsfromString(MBPVal);
						if (ParsedVal != null) {
							if (ParsedVal[33] == false && ParsedVal[34] == false && ParsedVal[35] == false) {
								 var EntriesText = "Sign Up";
							} else if (ParsedVal[33] == false && ParsedVal[34] == false && ParsedVal[35] == true) {
								 var EntriesText = "Entered 1";
							} else if (ParsedVal[33] == false && ParsedVal[34] == true && ParsedVal[35] == false) {
								 var EntriesText = "Entered 2";
							} else if (ParsedVal[33] == false && ParsedVal[34] == true && ParsedVal[35] == true) {
								 var EntriesText = "Entered 3";								
							} else if (ParsedVal[33] == true && ParsedVal[34] == false && ParsedVal[35] == false) {
								 var EntriesText = "Entered 4";
							} else if (ParsedVal[33] == true && ParsedVal[34] == false && ParsedVal[35] == true) {
								 var EntriesText = "Entered 5";								
							} else {
								var EntriesText = "Entries";							
							}
						} else {
							var EntriesText = "Entries";	
						}
						
					} else {
						var bBarLink = "http://www.iwon.com/home/0,12175,,00.html?PG=global?SEC=bbar";
					}
					title = "<a href='" + bBarLink + "'>"+fSmNBO+ EntriesText + fC+"</a><br>";
				}
			}
			if (bBarDayIndex != -1 && which != "cashback") {
			output = addCommas(output);
			}
			if(output == null) {
				output = "---";
			} 
		}
	}else if(boneCountFormat == 2) {
		output = fSmNBO+"&nbsp"+fC;
		title = fSmNBO+"&nbsp"+fC;
	}else if(errorcode == 1) {
		output = ""+fSmLgtO+"entries..."+fC;
		title = fSmLgtO+"Counting<br>"+fC;
	}else if(errorcode == 2) {
		output = ""+fSmLgtO+"unavailable"+fC;
		title = fSmLgtO+"Temporarily<br>"+fC;
	}else if(which == "dollars" || which == "cashback") {
		output = "---";
	}else {
		output = "<a href='http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar'>"+fSmLgtO+"HERE!"+fC+"</a>";
		title = "<a href='http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar'>"+fSmLgtO+"CLICK"+fC+"</a><br>";
	}
	//cashpointdollars = output;		
	boneOutputValues = title+fLgO+ output +fC;
return boneOutputValues;
}
function rnd() {
    rndSeed = (rndSeed*9301+49297) % 233280;
    return rndSeed/(233280.0);
}
function rand(number) {
    return Math.ceil(rnd()*number);
}
function getHtmlAds(){
	var unreg='<a href=http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar>'+fSmDrkO+'Win up to<br>$25,000,000'+fC+'</a></td><td align=right><a href=http://www.iwon.com/home/registration_form/1,12057,,00.html?PG=global?SEC=bbar>';
	var mac='<a href=http://www.iwon.com/home/companyinfo/iwon_dol/0,3698,,00.html?PG=global?SEC=bbar>'+fSmDrkO+'New - Reward<br>Points!!!'+fC+'</a></td><td align=right><a href=http://www.iwon.com/home/companyinfo/iwon_dol/0,3698,,00.html?PG=global?SEC=bbar>';
	var arrayHtml = new Array('<a href=http://monthlyprizes.iwon.com?PG=global&SEC=bbar>'+fSmDrkO+'Click for July<br>Bonus Prizes!'+fC+'</a>',							 
			'<a href=http://games.iwon.com/casino/index.html?PG=global?SEC=bbar>'+fSmDrkO+'iWon Casino<br>Play Now!'+fC+'</a>');
	var agt=navigator.userAgent.toLowerCase();
	var agtN=navigator.appName.toLowerCase();
	if (agt.indexOf("mac") != -1 && agtN.indexOf("netscape")!=-1){
		return mac;
	}else if(user_num==null){
		return unreg;
	}else{
		var showHtml=arrayHtml[rand(arrayHtml.length)-1];
		return showHtml;
	}
}			
if (b_cookie != null) {
	HexString = newCookieParse('h',b_cookie);	
	var ParsedString = getValsfromString(HexString);
	errorcode = newCookieParse('e',b_cookie);
} else {
	var ParsedString = 'null';
	var errorcode = 'null';
}
if (user_num != null && errorcode != null && errorcode != 'null' && errorcode != 1 && errorcode != 2) {
	  if (ParsedString != null && ParsedString != 'null' && ParsedString[62] == true && ParsedString[63] == false) {
		var documentLocation = escape(document.location);
		if (documentLocation.indexOf("/user_registration/manual_login/process_sign_in_redirect") < 0) updateCookieSC('D',documentLocation);
		document.location.replace('http://www.iwon.com/ro/apr/splash/0,1963,,00.html');
	}
}
function launchInfo(){
	InfoWin = window.open('http://www.iwon.com/home/companyinfo/prizecounter_info/0,15076,,00.html', 'iwonclick', 'height=380,width=406,location=no,menubar=no,status=no,scrollbars=no,toolbar=no');
	InfoWin.focus();
}	

if ( location.hostname == "cashpoints.iwon.com" && isCanadian() ) {
	document.location.href = "http://www.iwon.com/home/cash_points/cp_sweeps_nb/0,1723,,00.html"
	location.replace('http://www.iwon.com/home/cash_points/cp_sweeps_nb/0,1723,,00.html');
}

 var bonebar = '<table id=bonenav name=bonenav border=0 cellpadding=1 cellspacing=0 width=100% bgcolor=FFFFFF>' +
	'<tr valign=middle>' +
		'<td bgcolor=3366CC width=14% nowrap>' +
			showFirstBox() +
			'<br>' +
		'</td>' +
		'<td bgcolor=ffbb05 width=14% nowrap>' +
			'<table cellpadding=1 width=100% cellspacing=0 border=0><tr><td>'+
			getHtmlAds() +
			'</td></tr></table>' + 
		'</td>' +
		'<td bgcolor=ff9900 width=7% nowrap>' +
			'<a href="'+bBarDailyLink+'?PG=global?SEC=bbar">'+fSmDrkO+bBarDailyDesc+fC+'</a><br>'+fSmDrkO+bBarDailyPriz+fC+''+fLgO+'&nbsp;'+fC+'<br></td>' +
		'<td bgcolor=ff9900 width=9% nowrap align=center>' +
			showBoneCount('0','daily') +
			'<br>' +
		'</td>' +
		'<td bgcolor=ff6600 width=7% nowrap>' +
			'<a href="' + bBarMonthlyLink + '?PG=global?SEC=bbar">'+fSmDrkO+'Monthly'+fC+'</a><br>'+fSmDrkO+'Prizes'+fC+''+fLgO+'&nbsp;'+fC+'<br></td>' +
		'<td bgcolor=ff6600 width=6% nowrap align=center>' +
			showBoneCount('0','monthly') +
			'<br>' +
		'</td>' +
		'<td bgcolor=ff0000 width=7% nowrap>' +
			'<a href="' + bBarAnnualLink + '?PG=global?SEC=bbar">'+fSmDrkO+bBarAnnualDesc+fC+'</a><br>'+fSmDrkO+'$25 Million'+fC+''+fLgO+'&nbsp;'+fC+'<br></td>' +
		'<td bgcolor=ff0000 width=7% nowrap align=center>' +
			showBoneCount('0','yearly') +
			'<br>' +
		'</td>' +
		'<td bgcolor=1bb870 width=14% nowrap align=center>' +
			'<a href="http://www.iwon.com/home/companyinfo/rp/0,3698,,00.html?PG=global?SEC=bnav">'+fSmDrkO+'Reward&nbsp;Points'+fC+'</a>'+fSmO+'&nbsp;'+fC+'<br>' +
			showBoneCount('0','dollars') +
			fLgO+'&nbsp;'+fC+			
		'</td>' +

		'<td bgcolor=662d91 width=14% nowrap align=center>' +
			'<a href=http://products.iwon.com/cashback/home.jsp?PG=global?SEC=bbar>'+fSmGldO+'Cash Back'+fC+'</a>'+fSmO+'&nbsp;'+fC+'<br>' +
			showBoneCount('0','cashback') +
			fLgO+'&nbsp;'+fC+			
		'</td>' +
		'<td bgcolor=999999 width=2% nowrap align=center>' +
			'<a href="" onClick="launchInfo();return false;"><img src=' +
			questionImage +
			' width=14 height=14 border=0></a>'+			
		'</td>' +
	'</tr>' +

	'</table>' +
	'<table cellpadding='+bbarNavPad+' cellspacing=0 border=0 width=100%>' +
	'<tr align=center '+bbarNavBg+'>' +
		'<td>'+fBoO+'5 > '+fC+'<a href=http://home.iwon.com/index.html?PG=global?SEC=bnav>'+fSmLnksO+'iWon'+fC+'</a></td>' +
		'<td>'+fBoO+'5 > '+fC+'<a href=http://my.iwon.com/index.jsp?PG=global?SEC=bnav>'+fSmLnksO+'My iWon'+fC+'</a></td>' +
		MlText +
		'<td>'+fBoO+'9 > '+fC+'<a href="http://shopping.iwon.com/index.html?PG=global?SEC=bnav">'+fSmLnksO+'Shopping'+fC+'</a></td>' +
		'<td>'+fBoO+'7 > '+fC+'<a href="http://www.iwon.com/home/companyinfo/rp/0,3698,,00.html?PG=global?SEC=bnav">'+fSmLnksO+'Reward Pts'+fC+'</a></td>' +
		'<td>'+fBoO+'7 > '+fC+'<a href=http://games.iwon.com/casino/index.html?PG=global?SEC=bnav>'+fSmLnksO+'Casino'+fC+'</a></td>' +
		'<td>'+fBoO+'5 > '+fC+'<a href=http://prizes.iwon.com/index.html?PG=global?SEC=bnav>'+fSmLnksO+'Prizes'+fC+'</a></td>' +
		'<td nowrap>'+fBoO+'5 > '+fC+'<a href=http://contest.iwon.com/survey/surveyQuestions.jsp?alias=/home/survey/survey_today&PG=global&SEC=bnav>'+fSmLnksO+'Today\'s Survey'+fC+'</a></td>' +
		'<td>'+fBoO+'5 > '+fC+'<a href=http://today.iwon.com/index.html?PG=global?SEC=bnav>'+fSmLnksO+'iWon Today'+fC+'</a></td>' +
		'</tr>' +
 '</table>' +
	bbarNavUl +
	'';

	document.write(bonebar);
function showPopup(pageToLoad,winName,width,height,center) {
 var xposition=0; var yposition=0;
 var browser_name = navigator.appName;
 if (parseInt(navigator.appVersion) >= 4 ){
	xposition = (screen.width - width) / 2;
	yposition = (screen.height - height) / 2;
 }
 args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=1," + "scrollbars=0," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "screenx=" + xposition + "," + "screeny=" + yposition + "," + "left=" + xposition + "," + "top=" + yposition; 
  var new_window = window.open(pageToLoad ,winName, args);
}
//-->
