if (location.href.indexOf('services/nascar/pitpass/bfgoodrich') != -1) {
	location.replace('http://www.nascar.com/promos/bfgoodrich/sweeps/sorry.html');
}

function cnnArAllRules(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllLogin(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllRegister(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllOptin(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllOptRules(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllSuccess(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllSorry(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllSorryRules(){
	openPopUp('http://www.nascar.com/promos/armorall/2009/sweeps/rules/','rules','width=470,height=540,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllPrivacy(){
	openPopUp('http://www.clorox.com/global_privacy.php','bfgoodrichPrivacy','width=940,height=720,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllReturnNascar(){
	top.location.href='http://www.nascar.com/video/features/off_track/';
}

function cnnArAllBack(){
	history.go(-1);
}

function cnnNascarPrivacy(){
	openPopUp('http://nascar.com/guides/privacy/','NascarPrivacy','width=800,height=600,toolbar=no,menubar=no,top=10,left=10,location=no,scrollbars=yes,resizable=yes');
}

function cnnArAllReferAFriend(referafriendUrl){
	openPopUp(referafriendUrl,'referafriend','width=1000,height=920,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no');
}

function cnnArAllSuccessbfgoodrich(){
	top.location.href='http://www.bfgoodrich.com/motorsports';
}

function cnnArAllSuccessChallenger(){
	top.location.href='http://www.bfgoodrich.com/challenger';
}

//function cnnArAllTrackingPixel(){
	//add event listener for onload - if needed and write out tracking pixel?
	//window.onload = cnnArAllTrackingPixel;
//}

//function cnnArAllTrackingPixel(){
	//var e = document.createElement('div');
	//var c = document.getElementById('cnnContainer');
	//e.style.display = 'none';
	//e.innerHTML = '<img src="http://ad.doubleclick.net/ad/N4097.Nascar/B2182897.14;sz=1x1;ord=[timestamp]?">';
	//c.appendChild(e);
//}

/*
function removeCheckbox(){
			if(document.reg && location.toString().indexOf("register.do")){ //check for reg form & make sure on register page
					var cNodes = document.getElementById('cnnContentArea').childNodes;
					for (var i = 0; i < cNodes.length; i++) {
						if(cNodes[i].className == "cnnOiChecks"){
							var thisParentNodes = cNodes[i].childNodes;
								for (var i2 = 0; i2 < thisParentNodes.length; i2++) {
									if(thisParentNodes[i2].nodeType == 1 && thisParentNodes[i2].nodeName.toLowerCase() == "input" && (thisParentNodes[i2].name.toLowerCase() == "nascar_ms_optin_checked" || thisParentNodes[i2].name.toLowerCase() == "list_nascar_default_nascar_ms_optin") ) {
										thisParentNodes[i2].parentNode.removeChild(thisParentNodes[i2]);
									}
									if(thisParentNodes[i2].nodeType == 3){
										var thisText = thisParentNodes[i2].nodeValue.toString();
										if(thisText.indexOf("Yes, sign me up for Holiday Inn Racing emails") > -1){
											thisParentNodes[i2].parentNode.removeChild(thisParentNodes[i2]);
											if(thisParentNodes[i2 + 1].nodeName.toLowerCase() == "br"){
												thisParentNodes[i2].parentNode.removeChild(thisParentNodes[i2 + 1]);
												if(thisParentNodes[i2].nodeName.toLowerCase() == "br"){
													thisParentNodes[i2].parentNode.removeChild(thisParentNodes[i2]);
												}
												break;
											}
										}
									}
								}
						break;
						}
					}
			}
	}
			
			
	function addLoadEvent(func) {
  		var oldonload = window.onload;
  		if (typeof window.onload != 'function') {
   			window.onload = func;
  		} 
		else {
				window.onload = function() {
      					if (oldonload) {
       						 oldonload();
      					}
      					func();
    			}
  			}
	}
			
	addLoadEvent(removeCheckbox);
	*/
	
/* cancels out the call from the ad tracking cookie in the footer. */
function cnnad_getDEAdHeadCookie() {
	return false;
}
