function popStuff()
{ 
//********************************************************************************************
//*** NOTE: ALL PIXELS WERE REMOVED FROM HERE AS OF 2004-02-05 BY B.S. AS WE NO LONGER USE 
//*** THIS AS OUR LANDING PAGE.
//*** ALL COMMENTED OUT PIXELS AT THIS TIME ARE NOTED BY //// PRECEDING IT
//**** SS VSS TO GET CODE IF NEEDED...
//********************************************************************************************

////if (getCookie("pixelsFired") != 'yes') //fire pixels only once per browser session by TR 06-10-2003
////{

//alert ("pixels Fired!!!");
////} //end if block for pixelsFired cookie
////document.cookie = "pixelsFired=yes"; //drop cookie indicating pixels have been fired by TR on 06-10-2003

//////////Check for RTD cookie/////////
//// added on 05-28-2003 by TR
if(getCookie("aarp_RTD" )!= "") {
var strRTDURL = getCookie("aarp_RTD");

	 strRTDURL = strRTDURL.replace(/%3F/g,"?");
	strRTDURL = strRTDURL.replace(/%3D/g,"=");
	strRTDURL = strRTDURL.replace(/%26/g,"&");
	strRTDURL = strRTDURL.replace(/%3A/g,":");
	strRTDURL = strRTDURL.replace(/%20/g," ");

// change to handle multiple pixels on 06-24-2003 by TR
//	alert (strRTDURL);
//	document.write (strRTDURL);
//	dropRTDpixel(strRTDURL);

var separator = '::';
var arrRTDURL = strRTDURL.split(separator);
for (var i = 0; i < arrRTDURL.length; i++)
	{
		//alert (arrRTDURL[i]);
		//document.write (arrRTDURL[i]);
		dropRTDpixel(arrRTDURL[i]);
	}
	document.cookie = "aarp_RTD=''";
}


/////////////////////////////////////////////////////////////////////////
//GetRelevant Redirect Handling 
//Added by B.S. on 3/10/2003
//*** revised to target GR, WebLoyalty, aha, or mbw redirect page 
//*** to frame.asp by TR 0n 04-29-2003
////////////////////////////////////////////////////////////////////////
//alert(document.cookie)
//if(getCookie("client").toUpperCase().indexOf('DYNHOSTGR') > -1 )	//GetRelevant Redirect (dynHostGR_)
if(getCookie("client").toUpperCase() == 'AHAHOST'  || getCookie("client").toUpperCase() == 'MBWHOST' || getCookie("client").toUpperCase() == 'DYNHOSTWEB' || getCookie("client").toUpperCase() == 'AHAHOSTNEW' )
	//if (getCookie("client") != '' && getCookie("client") != null)
	{																	
	//alert(document.cookie)
	//var objGeneralVars = getPopUpVars("popUpVars")	
	//Redirect to GR or mbw or web or AHA
	var grURL = ''
	var strClient = getCookie("client").replace("dynHostGR_","").toUpperCase();
	var now = new Date ()
		switch (strClient)
		{
		case "AHAHOST":	var grURL = popGRvariables(grURL);
			break;
		case "MBWHOST" : var grURL = popMBWvariables (mbwURL); //causing double windows on closing
			break;
		case "DYNHOSTWEB" :var grURL = popWEBvariables(webURL);
			break;
		case "AHAHOSTNEW" :var grURL = popAHAvariables(ahaURL);
			break;
		default : var grURL = "http://www.yourfreepresent.com/index.plex?ef="  + getCookie('entered_from');
		}	
	var grDestURL = "http://www.yourfreepresent.com/index.plex?ef="  + getCookie("entered_from")
	var frameURL = "partners/redirectframe/frame.asp?grURL=" + escape(grURL) + "&destURL=" + escape(grDestURL ) + "&site=" + getCookie("frame_site")
	//alert(frameURL)
	window.location.href=frameURL
		/*
		if (getCookie("frame_site")== "savingsregister" || getCookie("frame_site")== "recipe4living" )
		
			{
				var popURL = '../doctemp/promotion_generic_popup.html?msg_id=' + getCookie('msg_id') + '&mem_site=' + getCookie('frame_site');
				var left = (screen.width / 2 - 300);
				//alert('popURL=' + popURL);
				var popWin = window.open(popURL ,'promo_pop','width=625,height=525,directories=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,menubar=no,top=20,left=' + left);
				popWin.focus();	//keep Popup window on top
			}
		*/
   	
	return true;
	}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Only call this method once.  if they return to index.plex do not pop-up and reshow...
//*BUG*: Does not seem to work in Netscape...?
if(getCookie('popDone') == 'Yes' && getCookie("client") != 'ahaHost_2')
	{
	return;	//exit function.  We've been here already!
	}
if(getCookie('entered_from') == 'ezsweeps')	// NO POPS for "ezsweeps", Added by D.K. on 11-14-02
	{
	return;	//exit function.
	}

//*** set been-here-already flag:
document.cookie = "popDone=Yes";	

//alert('client: ' + getCookie('client'))
var cookieClient = "";					//use a Client cookie variable instead of calling the getCookie() function many times, 
cookieClient = getCookie('client');	//it will save client-side processing plus code looks cleaner - Dilip (08/07/02)

/////////////////////////////////////////////////////////////////////////////////////////////////////
// MEMBERWORKS
////////////////////////////////////////////////////////////////////////////////////////////////////
//Use Dynamic Image Swapping - Added by B.S. on 9/19/2002:
if(cookieClient == 'mbwHost') 
	{
	var objMBWHostVars = getPopUpVars("dynamicHostVars")
	//var mbwURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd004&siteID=_MEA096EH282103000000SITE1D" // old URL
	//var mbwURL = "http://www.membershipme.com/dvd.asp?ID=silgladvd001&siteID=_MEA096EH380130000000SOLO" // new URL. Added by D.K. 12-05-02
	var mbwURL = "https://www.membershipme.com/giftcard.asp?ID=silglatgt001&siteID=_MEA096EH398136000000SITE1 " // new URL. Added by TR 02/05/2003
	mbwURL += "&refid=" + getCookie('entered_from') + "&productImg=" + objMBWHostVars['productImg'] + "&productTxt=" + objMBWHostVars['productTxt']
	mbwURL += "&fn=" + objGeneralVars['namefirst'] + "&ln=" + objGeneralVars['namelast']
	mbwURL += "&adr1=" + objGeneralVars['address1'] + "&ad2=" + objGeneralVars['address2'] 
	mbwURL += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0))
	mbwURL += "&zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 

	//*** set been-here-already flag to FALSE
	document.cookie = "popDone=No";
	document.cookie = "client=MBW_DONE" //modify client cookie so that when they come back to index.plex, it won't run this if..else section
	window.location.href = mbwURL;
	return;
	}

/////*** Legacy Hardcoded links prior to 9/19/2002: //////////////////////////////
//Modified by Dilip to handle client=MBW1, client=MBW2, client=MBW3, client=MBW4, client=MBW5, client=MBW6, client=MBW7 ...... --- 07-17-02
if( (cookieClient == 'MBW1') || (cookieClient == 'MBW2') || (cookieClient == 'MBW3') || (cookieClient == 'MBW4') || (cookieClient == 'MBW5') || (cookieClient == 'MBW6') || (cookieClient == 'MBW7') || (cookieClient == 'MBW8') || (cookieClient == 'MBW9') || (cookieClient == 'MBW10') || (cookieClient == 'MBW11') || (cookieClient == 'MBW12') || (cookieClient == 'MBW13') || (cookieClient == 'MBW14') || (cookieClient.substring(0, 5) == 'MBW15') || (cookieClient.substring(0, 5) == 'MBW16')) {
	var membershipmeURL;
	if(cookieClient == 'MBW1') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE1"
	}else if(cookieClient == 'MBW2') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE2"
	}else if(cookieClient == 'MBW3') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE3"
	}else if(cookieClient == 'MBW4') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE4"
	}//adding 3 more links for them - Dilip (08/07/02)
	else if(cookieClient == 'MBW5') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE5"
	}else if(cookieClient == 'MBW6') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE6"
	}else if(cookieClient == 'MBW7') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE7"
	}//adding 7 more links for them - Dilip (08/08/02)
	else if(cookieClient == 'MBW8') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE1A"
	}else if(cookieClient == 'MBW9') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE2A"
	}else if(cookieClient == 'MBW10') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE3A"
	}else if(cookieClient == 'MBW11') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE4A"
	}else if(cookieClient == 'MBW12') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE5A"
	}else if(cookieClient == 'MBW13') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE6A"
	}else if(cookieClient == 'MBW14') {
		membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE7A"
	}else if(cookieClient.substring(0, 5) == 'MBW15') { //adding 40 more links for them - Dilip (08/14/02): (Camera: MBW15-1 to MBW15-20 ) (BurBerry : MBW15-21 to MBW15-40 )
		if(cookieClient == 'MBW15-1') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE11"}
		else if(cookieClient == 'MBW15-2') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE12"}
		else if(cookieClient == 'MBW15-3') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE13"}
		else if(cookieClient == 'MBW15-4') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE14"}
		else if(cookieClient == 'MBW15-5') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE15"}
		else if(cookieClient == 'MBW15-6') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE16"}
		else if(cookieClient == 'MBW15-7') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE17"}
		else if(cookieClient == 'MBW15-8') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE18"}
		else if(cookieClient == 'MBW15-9') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE19"}
		else if(cookieClient == 'MBW15-10') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE20"}
		else if(cookieClient == 'MBW15-11') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE21"}
		else if(cookieClient == 'MBW15-12') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE22"}
		else if(cookieClient == 'MBW15-13') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE23"}
		else if(cookieClient == 'MBW15-14') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE24"}
		else if(cookieClient == 'MBW15-15') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE25"}
		else if(cookieClient == 'MBW15-16') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE26"}
		else if(cookieClient == 'MBW15-17') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE27"}
		else if(cookieClient == 'MBW15-18') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE28"}
		else if(cookieClient == 'MBW15-19') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE29"}
		else if(cookieClient == 'MBW15-20') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd001&siteID=_MEA096EH282091000000SITE30"}
		else if(cookieClient == 'MBW15-21') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE8A"}
		else if(cookieClient == 'MBW15-22') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE9A"}
		else if(cookieClient == 'MBW15-23') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE10A"}
		else if(cookieClient == 'MBW15-24') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE11A"}
		else if(cookieClient == 'MBW15-25') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE12A"}
		else if(cookieClient == 'MBW15-26') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE13A"}
		else if(cookieClient == 'MBW15-27') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE14A"}
		else if(cookieClient == 'MBW15-28') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE15A"}
		else if(cookieClient == 'MBW15-29') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE16A"}
		else if(cookieClient == 'MBW15-30') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE17A"}
		else if(cookieClient == 'MBW15-31') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE18A"}
		else if(cookieClient == 'MBW15-32') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE19A"}
		else if(cookieClient == 'MBW15-33') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE20A"}
		else if(cookieClient == 'MBW15-34') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE21A"}
		else if(cookieClient == 'MBW15-35') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE22A"}
		else if(cookieClient == 'MBW15-36') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE23A"}
		else if(cookieClient == 'MBW15-37') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE24A"}
		else if(cookieClient == 'MBW15-38') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE25A"}
		else if(cookieClient == 'MBW15-39') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE26A"}
		else if(cookieClient == 'MBW15-40') {membershipmeURL = "https://www.membershipme.com/cdplayer.asp?ID=silentcd002&siteID=_MEA096EH282095000000SITE27A"}
	}else if(cookieClient.substring(0, 5) == 'MBW16') { //adding 20 more Maxell links for them - Dilip (09/11/02)
		if(cookieClient == 'MBW16-1') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE1C"}
		else if(cookieClient == 'MBW16-2') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE2C"}
		else if(cookieClient == 'MBW16-3') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE3C"}
		else if(cookieClient == 'MBW16-4') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE4C"}
		else if(cookieClient == 'MBW16-5') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE5C"}
		else if(cookieClient == 'MBW16-6') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE6C"}
		else if(cookieClient == 'MBW16-7') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE7C"}
		else if(cookieClient == 'MBW16-8') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE8C"}
		else if(cookieClient == 'MBW16-9') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE9C"}
		else if(cookieClient == 'MBW16-10') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE10C"}
		else if(cookieClient == 'MBW16-11') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE11C"}
		else if(cookieClient == 'MBW16-12') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE12C"}
		else if(cookieClient == 'MBW16-13') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE13C"}
		else if(cookieClient == 'MBW16-14') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE14C"}
		else if(cookieClient == 'MBW16-15') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE15C"}
		else if(cookieClient == 'MBW16-16') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE16C"}
		else if(cookieClient == 'MBW16-17') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE17C"}
		else if(cookieClient == 'MBW16-18') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE18C"}
		else if(cookieClient == 'MBW16-19') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE19C"}
		else if(cookieClient == 'MBW16-20') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE20C"}
		else if(cookieClient == 'MBW16-21') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE21C"}	//adding 20 more Maxell links (16-21 to 16-40) for them - Dilip (09/17/02)
		else if(cookieClient == 'MBW16-22') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE22C"}
		else if(cookieClient == 'MBW16-23') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE23C"}
		else if(cookieClient == 'MBW16-24') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE24C"}
		else if(cookieClient == 'MBW16-25') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE25C"}
		else if(cookieClient == 'MBW16-26') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE26C"}
		else if(cookieClient == 'MBW16-27') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE27C"}
		else if(cookieClient == 'MBW16-28') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE28C"}
		else if(cookieClient == 'MBW16-29') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE29C"}
		else if(cookieClient == 'MBW16-30') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE30C"}
		else if(cookieClient == 'MBW16-31') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE31C"}
		else if(cookieClient == 'MBW16-32') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE32C"}
		else if(cookieClient == 'MBW16-33') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE33C"}
		else if(cookieClient == 'MBW16-34') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE34C"}
		else if(cookieClient == 'MBW16-35') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE35C"}
		else if(cookieClient == 'MBW16-36') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE36C"}
		else if(cookieClient == 'MBW16-37') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE37C"}
		else if(cookieClient == 'MBW16-38') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE38C"}
		else if(cookieClient == 'MBW16-39') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE39C"}
		else if(cookieClient == 'MBW16-40') {membershipmeURL = "http://www.membershipme.com/cdplayer.asp?ID=silentcd003&siteID=_MEA096EH282101000000SITE40C"}
	}

	membershipmeURL += "&refid=" + getCookie('entered_from',0)
	membershipmeURL += "&fn=" + objGeneralVars['namefirst'] + "&ln=" + objGeneralVars['namelast']
	membershipmeURL += "&adr1=" + objGeneralVars['address1'] + "&ad2=" + objGeneralVars['address2'] 
	membershipmeURL += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0))
	membershipmeURL += "&zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	//*** set been-here-already flag to FALSE
	document.cookie = "popDone=No";

	document.cookie = "client=MBW_DONE" //modify client cookie so that when they come back to index.plex, it won't run this if..else section
	
	//alert('goto: ' + membershipmeURL)
	window.location.href = membershipmeURL;

	return;
}

//Modified by Dilip to handle Webloyality redirects client=WEB1, client=WEB2, client=WEB3, client=WEB4, client=WEB5 --- updated by Dilip (09-03-02)
if( (cookieClient == 'WEB1') || (cookieClient == 'WEB2') || (cookieClient == 'WEB3') || (cookieClient == 'WEB4') || (cookieClient == 'WEB5') || (cookieClient.substring(0, 4) == 'WEB6') || (cookieClient.substring(0, 4) == 'WEB7')) {
	var weblURL;
	if(cookieClient == 'WEB1') {
		weblURL = "https://one-time-offer.com/gateway.asp?srcid=10101&poolid=8541"
	}else if(cookieClient == 'WEB2') {
		weblURL = "https://one-time-offer.com/gateway.asp?srcid=11021&poolid=8541"
	}else if(cookieClient == 'WEB3') {
		weblURL = "https://one-time-offer.com/gateway.asp?srcid=11022&poolid=8541"
	}else if(cookieClient == 'WEB4') {
		weblURL = "https://one-time-offer.com/gateway.asp?srcid=11023&poolid=8541"
	}else if(cookieClient == 'WEB5') {
		weblURL = "https://one-time-offer.com/gateway.asp?srcid=11421&poolid=9241"
	}else if (cookieClient.substring(0, 4) == 'WEB6') { // 5 more links added by Dilip on 8/22/02
		if(cookieClient == 'WEB6-1')	  {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12341&poolid=9241" }
		else if(cookieClient == 'WEB6-2') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12342&poolid=9241" }
		else if(cookieClient == 'WEB6-3') { weblURL = "https://one-time-offer.com/gateway.asp?srcid=12343&poolid=9241" }
		else if(cookieClient == 'WEB6-4') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12344&poolid=9241" }
		else if(cookieClient == 'WEB6-5') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12345&poolid=9241" }
	}else if (cookieClient.substring(0, 4) == 'WEB7') { // 20 more links added by Dilip on 9/03/02
		if(cookieClient == 'WEB7-1')	  {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12681&poolid=9241" }
		else if(cookieClient == 'WEB7-2') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12682&poolid=9241" }
		else if(cookieClient == 'WEB7-3') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12683&poolid=9241" }
		else if(cookieClient == 'WEB7-4') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12684&poolid=9241" }
		else if(cookieClient == 'WEB7-5') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12685&poolid=9241" }
		else if(cookieClient == 'WEB7-6') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12686&poolid=9241" }
		else if(cookieClient == 'WEB7-7') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12687&poolid=9241" }
		else if(cookieClient == 'WEB7-8') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12688&poolid=9241" }
		else if(cookieClient == 'WEB7-9') {		weblURL = "https://one-time-offer.com/gateway.asp?srcid=12689&poolid=9241" }
		else if(cookieClient == 'WEB7-10') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12690&poolid=9241" }
		else if(cookieClient == 'WEB7-11') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12691&poolid=9241" }
		else if(cookieClient == 'WEB7-12') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12692&poolid=9241" }
		else if(cookieClient == 'WEB7-13') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12693&poolid=9241" }
		else if(cookieClient == 'WEB7-14') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12694&poolid=9241" }
		else if(cookieClient == 'WEB7-15') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12695&poolid=9241" }
		else if(cookieClient == 'WEB7-16') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12696&poolid=9241" }
		else if(cookieClient == 'WEB7-17') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12697&poolid=9241" }
		else if(cookieClient == 'WEB7-18') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12698&poolid=9241" }
		else if(cookieClient == 'WEB7-19') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12699&poolid=9241" }
		else if(cookieClient == 'WEB7-20') {	weblURL = "https://one-time-offer.com/gateway.asp?srcid=12700&poolid=9241" }
	}

	weblURL += "&fname=" + objGeneralVars['namefirst'] + "&lname=" + objGeneralVars['namelast']
	weblURL += "&addr1=" + objGeneralVars['address1']
	weblURL += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0))
	weblURL += "&zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 

	//*** set been-here-already flag to FALSE
	document.cookie = "popDone=No";

	document.cookie = "client=WEB_DONE" //modify client cookie so that when they come back to index.plex, it won't run this if..else section
	//alert('goto: ' + weblURL)
	window.location.href = weblURL;

	return;
}

var acct_code;
//////////////////////////////////////////////////////////////////////////
//*** Modified by B.S. on 7/31/2002:  Modified acct_code to be semi-dynamic.  SC103 is static but anything after the "_" is dynamic
/////////////////////////////////////////////////////////////////////////
if(getCookie('client') == 'ahaHost'){
	//var objAhaHostVars = getPopUpVars("ahaHostVars")
	var objAhaHostVars = getPopUpVars("dynamicHostVars")
	
	//*** Dynamic acct_code added by B.S. on 8/27/2002:
	if(objAhaHostVars['acct_code'] != "null" )	//*** null as string bec. its coming from the cookie
		acct_code = objAhaHostVars['acct_code'] + "_";
	else
		acct_code = "SC103_";	 //*** Default acct_code (103)
	var ahaURL = "https://www.ahamembership.com/cgi-bin/ecs.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=assoc1/scarot"
	ahaURL += "&card_fname=" + objGeneralVars['namefirst'] + "&card_lname=" + objGeneralVars['namelast']
	ahaURL += "&card_address1=" + objGeneralVars['address1'] + "&card_address2=" + objGeneralVars['address2'] 
	ahaURL += "&card_zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	ahaURL += "&phone=" + objGeneralVars['phone1'] + objGeneralVars['phone2'] + objGeneralVars['phone3']
	ahaURL += "&fim=" + objAhaHostVars['productImg'] + "&sim=" + objAhaHostVars['headerImg'] + "&prem_name=" + objAhaHostVars['productTxt']
	ahaURL += "&home=" + getCookie('entered_from',0)
	document.cookie = "client=ahaHost_2"	//modify client cookie
	window.location.href = ahaURL;
	return;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////
//*** Added by B.S. on 9/12/2002:  Use NEW AHA Template...
///////////////////////////////////////////////////////////////////////////////////////////////////////
if(getCookie('client') == 'ahaHostNew'){
	//var objAhaHostVars = getPopUpVars("ahaHostVars")
	var objAhaHostVars = getPopUpVars("dynamicHostVars")
	if(objAhaHostVars['acct_code'] != "null" )	//*** null as string bec. its coming from the cookie
		acct_code = objAhaHostVars['acct_code'] + "_";
	else
		acct_code = "SC105_";	 //*** Default acct_code (105)
//  var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/sc_2_0911"  // Old URL
//###  New URL. modified by D.K. on 11-20-02
//	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/sc_3_1118"
//	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=part/29_A_0_SC"
//	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/29_C_0_SC"
	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/30_A_0_SC"
	ahaURL += "&card_fname=" + objGeneralVars['namefirst'] + "&card_lname=" + objGeneralVars['namelast']
	ahaURL += "&card_address1=" + objGeneralVars['address1'] + "&card_address2=" + objGeneralVars['address2'] 
	ahaURL += "&card_zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	ahaURL += "&phone=" + objGeneralVars['phone1'] + objGeneralVars['phone2'] + objGeneralVars['phone3']
	ahaURL += "&fim=" + objAhaHostVars['productImg'] + "&sim=" + objAhaHostVars['headerImg'] + "&prem_name=" + objAhaHostVars['productTxt']
	ahaURL += "&home=" + getCookie('entered_from',0)
	document.cookie = "client=ahaHost_2"	//modify client cookie
	window.location.href = ahaURL;  
	return;  
}

///////////////////////////////////////////////////////////////////////////////////////////////////////
//*** Added by D.K. on 11/13/2002:  WebLoyalty NEW Dynamic Redirect (dynHostWEB)
///////////////////////////////////////////////////////////////////////////////////////////////////////
if(getCookie('client') == 'dynHostWEB'){
	var objWebHostVars = getPopUpVars("dynamicHostVars")

	//var webURL = "https://stage.one-time-offer.com/gateway.asp?poolid=9241&srcid=11421&data=" // test url
	var webURL = "https://one-time-offer.com/gateway.asp?poolid=9241&srcid=11421&data="		// prod url

	var dataString = ""
	dataString += "fname=" + objGeneralVars['namefirst'] + "&lname=" + objGeneralVars['namelast']
	dataString += "&addr1=" + objGeneralVars['address1'] + "&addr2=" + objGeneralVars['address2']
	dataString += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0))
	dataString += "&zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	dataString += "&productimg=" + objWebHostVars['productImg'] + "&headerimg=" + objWebHostVars['headerImg'] + "&producttxt=" + objWebHostVars['productTxt']
	dataString += "&cref=" + getCookie('entered_from',0)
	dataString = dataString.replace(/=/g,"ÿ");	//WebLoyalty requirement: The names are separated from the values using an ascii 255 character (ÿ) and each pair is separated by the same ascii 255 character (ÿ).
	dataString = dataString.replace(/&/g,"ÿ");	//So, replace & and = with ÿ
	dataString = dataString.replace(/\+/g," ");	//Replace + with a space
	dataString = dataString.replace(/%20/g," ");//Replace %20 with a space
	//alert('dataString: ' + dataString);
	dataString = SimpleEncrypt(dataString);		//Encrypt the DataString
	//alert('Encrypted dataString: ' + dataString);

	webURL += dataString;
	//alert('webURL: ' + webURL);
	//*** set been-here-already flag to FALSE
	document.cookie = "popDone=No";
	document.cookie = "client=WEB_DONE"	//modify client cookie
	window.location.href = webURL;  
	return;  
}

///////////////////////////////////////////////////////////////////////////////////////////////////////
//*** Added by D.K. on 12/05/2002:  True Data Solution's NEW Dynamic Redirect (dynHostTrueData)
///////////////////////////////////////////////////////////////////////////////////////////////////////
if(getCookie('client') == 'dynHostTrueData'){
	var objWebHostVars = getPopUpVars("dynamicHostVars")
	
	var qsURL = "http://www.yourfreepresent.com/index.plex?home=" + getCookie('entered_from'); 
	//True Data should redirect back to the following URL
	var destURL = "http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=TrueData_CoReg_Signup_Redirect&site=tracker&qsURL=" + qsURL;
	var ooUrl = 'http://coreg.offeroptimizer.com/tds/servlet/SmartCoReg?destUrl=' + escape(destURL);
	var dataString = "";
	dataString += "&siteCode=CARROT&siteTrack=PCHSWREG&siteSession=" + escape(objGeneralVars['email']);
	dataString += "&firstName=" + objGeneralVars['namefirst'] + "&middleName=" + objGeneralVars['mi'] + "&lastName=" + objGeneralVars['namelast'];
	dataString += "&address1=" + objGeneralVars['address1'];
	dataString += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0)) + "&postalCode1=" + objGeneralVars['zip'] + "&country=US";
	dataString += "&telephone=" + objGeneralVars['phone1'] + objGeneralVars['phone2'] + objGeneralVars['phone3'];
	dataString += "&email=" + escape(objGeneralVars['email']) + "&gender=" + objGeneralVars['gender'];
	dataString += "&birthYear=" + objGeneralVars['age'] + "&birthDate=" + objGeneralVars['age'] + "-" + objGeneralVars['birth_month'] + "-" + objGeneralVars['birth_day'];
	ooUrl += dataString;
	ooUrl = ooUrl.replace(/undefined/g,"")	//remove all instances of undefined string

	//alert('ooUrl: ' + ooUrl);
	//*** set been-here-already flag to FALSE
	document.cookie = "popDone=No";
	document.cookie = "client=TD_DONE"	//modify client cookie
	// Track and Redirect to True Data's Co-Reg page
	var trackURL = "http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_offeroptimizer_redirect&site=tracker&qsURL=" + escape(ooUrl);
	window.location.href = trackURL;
	return;  
}

//### Keep the Milesource pop up on the top. mod by D.K. on 2003-06-03
//### if msg_id was passed in, set bMsgID = true so that we can keep Milesource pop on the top.
var bMsgID = false;

//### Added/Modified by D.K. on 03-14-03 to handle both Old SR links and New generic promotion
//### Display the product Sign-up Pop-up in a generic way so that one html file is used for all New promotions. 


if(QueryString("msg_id") != '' && QueryString('msg_id') != null)
{
	var popURL = '../doctemp/promotion_generic_popup.html?msg_id=' + QueryString("msg_id") + '&mem_site=' + QueryString("mem_site");
	var left = (screen.width / 2 - 300);
	//alert('popURL=' + popURL);
	//var popWin = window.open(popURL ,'promo_pop','width=650,height=575,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,top=20,left=' + left);
	//popWin.focus();	//keep Popup window on top

	//*** display Milesource Instructions Pop inside the SOC as the last page. added by D.K. 2004-04-20
	//window.location.href = popURL;
	bMsgID = true;
}
else if(getCookie('msg_id') != '')
{
	var popURL = '../doctemp/promotion_generic_popup.html?msg_id=' + getCookie('msg_id') + '&mem_site=' + getCookie('mem_site');
	var left = (screen.width / 2 - 300);
	//alert('popURL=' + popURL);
	//var popWin = window.open(popURL ,'promo_pop','width=650,height=575,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,top=20,left=' + left);
	//popWin.focus();	//keep Popup window on top

	//*** display Milesource Instructions Pop inside the SOC as the last page. added by D.K. 2004-04-20
	//window.location.href = popURL;

	bMsgID = true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Pop-Windows begin Here:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(QueryString("noPop") == "11ll") return	//avoid pop-ups

///////////////////////////
//Original Sprint pop & legacy1 removed by B.S. on 8/28/2002: no longer used.  see VSS if need to restore.
//////////////////////////

///////////////////////////////
//*** Sprint Pop-up (Izone) added by B.S. on 7/29/2002  
//*** Removed 8/5/2002 by B.S.
//*** Added back by B.S. on 8/23/2002 - Delayed pop (3 minutes)
//var izoneURL = "http://www.yourfreepresent.com/pop_ups/sprint_camera_files/sprint_camera.htm";  
//var delayizoneURL = "popUpFrame.asp?title=Sprint+Offer&delaySeconds=180000&urlSRC=" + izoneURL
//var izone = window.open('http://members.yourfreepresent.com/tracker/popuptracker.asp?ID=10&qs=' + escape(delayizoneURL),'izone','width=800,height=650,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,top=1900,left=333');
//window.focus()	//keep main window on top

//alert("Calling checkForNoPOps");
if (checkForNoPops(getCookie('entered_from')) )//call function to check for sites to suppress pops
{
	return; //exit without pops
}


//////////////////////////////////////////////////////////////////////////////////////
//*** Delay-Popup Dispatcher added by B.S. on 8/29/2002
//*** removed by D.K. on 2004-03-23
//var popManWin = window.open('/includes/delayPopDispatcher.html','popmanwin','width=1,height=1,directories=no,location=no,resizable=yes,scrollbars=no,status=no,toolbar=no,menubar=no,top=1900,left=333');
//window.focus()	//keep main window on top


///////////////////////////////////////////////////////////////
//*** Direct Deposit Pop-Up (Pop Over)
//*** Added by B.S. on 9/30/2002
///////////////////////////////////////////////////////////////
/*moved to delay: 10/09/2002
var ddURL = "https://www.directdepositpromotions.com/directdepositsweeps/index.html?refer=SC09192002";  
ddURL += "&firstname=" + objGeneralVars['namefirst']  + "&lastname=" + objGeneralVars['namelast'] 
ddURL += "&Address1=" + objGeneralVars['address1'] + "&Address2=" + objGeneralVars['address2'] + "&EmailAddress=" +  objGeneralVars['email']
ddURL += "&City=" + objGeneralVars['city'] + "&Gender=" + objGeneralVars['gender'] + "&State=" +  stateFullToAbbrev(unescape(objGeneralVars['state']),0) 
ddURL += "&Phone1=" + objGeneralVars['phone1'] + "&Phone2=" + objGeneralVars['phone2']  + "&Phone3=" +  objGeneralVars['phone3']
ddURL += "&zip=" + objGeneralVars['zip'] + "&birthmonth=" + objGeneralVars['birth_month']  + "&birthday=" +  objGeneralVars['birth_day'] + "&birthyear=" + objGeneralVars['age']
ddURL = ddURL.replace(/undefined/g,"")	//remove all instances of undefined string
var ddPop = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_traffix_dd_main&site=tracker&qsURL=' + escape(ddURL),'ddpop1','width=800,height=650,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,to=1900,lef=333')

window.focus()
*/

/////////////////////////////////////////////////////////
// MTS (QH/OTC) Pop-Under - by BS//
////////////////////////////////////////////////////////
//modified by B.S. to go through popuptracker.  8/16/2002
/* Moved to delay on 10/09/2002:
var mtsurl1 = "http://www.mts0.com/qh/qhpopup.jsp?";
var mtsurl = "";
mtsurl += "cf=SilverCarrot&np=home.jsp&rf=431";
mtsurl += "&txtFirstName=" + objGeneralVars['namefirst'] + "&txtMiddleName=" + objGeneralVars['mi'] + "&txtLastName=" + objGeneralVars['namelast'];
mtsurl += "&txtAddressOne=" + objGeneralVars['address1'] + "&txtApt=&txtAddressTwo=" + objGeneralVars['address2'];
mtsurl += "&txtCity=" + objGeneralVars['city'] + "&optState=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0)) + "&txtZipOne=" + objGeneralVars['zip'] + "&txtZipTwo=";
mtsurl += "&txtEmail=" + objGeneralVars['email'] + "&rdGender=" + fullGender(objGeneralVars['gender']);
mtsurl += "&optDOBMonth=" + objGeneralVars['birth_month'] + "&optDOBDay=" + objGeneralVars['birth_day'] + "&optDOBYear=" + objGeneralVars['age'] + "&optEducation=&optMarryStatus=";
mtsurl += "&rdChildrenFlagYN=&cbxChildren0_2FlagYN=&cbxChildren3_5FlagYN=";
mtsurl += "&cbxChildren6_12FlagYN=&cbxChildren13_17FlagYN=&cbxCat=&cbxDog=&cbxOthers=";
mtsurl += "&cbxEmailSubscriptionFlagYN=1";

mtsurl = mtsurl1 + mtsurl;
mtsurl = mtsurl.replace(/undefined/g,"")	//remove all instances of undefined string
//alert(mtsurl)
//pop-under
var mtsWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_OTC_main&site=tracker&qsURL=' + escape(mtsurl),'mts0PopUp','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=575,top=0,left=' + (screen.width / 2 - 10));

window.focus()	//keep main window on top
*/


//////////////////////////////////////////////////
//*** FFS pop-under added by B.S. on 8/19/2002:
//var ffsURL1 = "http://www.creditanddebt.com/debt.html?_id=296";	//14556
//*** FFS - Pre-populated as of 8/27/2002
//*** removed as of 9/4/2002 (afternoon)
//var ffsURL1 = "http://creditanddebt.com/popunder/popunder.html?ac_id=296";
//ffsURL1 += "&NAME=" + objGeneralVars['namefirst'] + " " + objGeneralVars['namelast'] + "&EMAIL=" + objGeneralVars['email'] 
//ffsURL1 += "&ADDRESS=" + objGeneralVars['address1'] + "&CITY=" + objGeneralVars['city']  + "&HMPHONE=" +  objGeneralVars['phone1'] + "-" + objGeneralVars['phone2'] + "-" + objGeneralVars['phone3']
//ffsURL1 += "&STATE=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0)) + "&ZIP=" + objGeneralVars['zip']
//ffsURL1 = ffsURL1.replace(/undefined/g,"")	//remove all instances of undefined string
//alert(ffsURL1)
//var ffsWin = window.open('http://members.yourfreepresent.com/tracker/popuptracker.asp?ID=8&qs=' + escape(ffsURL1), "ffsURL1", 'status=yes,scrollbars=yes,resizable=yes,location=no,width=700,heigh=575,lef=' + (screen.width / 2 - 10));
//window.focus()	//keep main window on top

/////////////////////////////////
//Synapse
//modified by B.S. - go through popuptracker.  8/16/2002
//var legacy2URL = "http://www.redeemmygifts.com/giftpack/03111511/index.asp";
//var legacy2 = window.open('http://members.yourfreepresent.com/tracker/popuptracker.asp?ID=4&qs=' + escape(legacy2URL), 'popup2','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + (screen.width / 2) + ',height='+ (screen.height / 2) +',scrollbars=yes,resizable=yes,top=0,left=' + (screen.width / 2 - 10));
//The above was modified by B.S. on 8/19/2002:  New URL Link & delayed pop-up.  Therefore, a new ID is used (9)
//delay 5 minutes (300,000 milis = 5 minutes)
//*** moved to delay on 09/30/2002
//var synapseURL1 = "http://www.mybonuscenter.com/giftpack/03111511/index.asp"
//var synapseWin1 = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_synapse_main&site=tracker&qsURL=' + escape(synapseURL1), 'popup2','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=650,height=600,scrollbars=yes,resizable=yes')
//window.focus()

////////////////////////////////////
//OPB - BlueDolphin 
////////////////////////////////////
/*Moved to delay on 10/090/2002
var opbBD = "http://www.yourfreepresent.com/qcV4/OnepageBuy.asp?home=YFP-OPB-BD093002&store=qc5-1BD&savemem=0"
var opbBDWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_opb-bd_main&site=tracker&qsURL=' + escape(opbBD), 'opbbd1','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=650,height=600,scrollbars=yes,resizable=yes')

window.focus()
*/

////////////////////////////////////
//Milesource Join Page
////////////////////////////////////
//var msQS = "http://www.milesource.com/join/join.php3?affrefer=sc-exitPOP-MSMemExit";
//msQS += "&member_info[firstname]=" + objGeneralVars['namefirst'] + "&member_info[surname]=" + objGeneralVars['namelast'] + "&member_info[address]=" + objGeneralVars['address1'] + "&member_info[address2]	=" + objGeneralVars['address2'] + "&member_info[city]=" +  objGeneralVars['city'];
//msQS += "&member_info[state]=" + objGeneralVars['state'] + "&member_info[country]=United States" +  + "&member_info[zip]=" + objGeneralVars['zip'] + "&member_info[email]=" + objGeneralVars['email'];
//msQS += "&Month=" + objGeneralVars['birth_month'] + "&Day=" + objGeneralVars['birth_day'] + "&Year=" + objGeneralVars['age'];
//msQS += "&Gender=" + objGeneralVars['gender'] + "&phone1=" + objGeneralVars['phone1'] + "&phone2=" + objGeneralVars['phone2'] + "&phone3=" + objGeneralVars['phone3'];
//msQS = msQS.replace(/undefined/g,"")	//remove all instances of undefined string
//alert(msQS)
//var msWin = window.open('http://members.yourfreepresent.com/tracker/popuptracker.asp?ID=11&qs=' + escape(msQS), 'ms', 'status=yes,scrollbars=yes,resizable=yes,location=yes,toolbar=yes,menubar=yes,width=850,height=550')
//window.focus()
//var msWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=3&impr=pop_msjoin_main&home=msjoin_clickthrough&site=tracker&affrefer=sc-090902-yfpPopBanner', 'ms', 'status=no,scrollbars=no,resizable=no,location=no,toolbar=no,menubar=no,width=501,height=501')

//window.focus()

/////////////////////////////////
//Set pop-up/under hierarchy:
/////////////////////////////////
//if(!synapseWin1.closed) synapseWin1.blur();				//pop-under
//if(!ffsWin.closed) ffsWin.blur();					//pop-under
//if(!msWin.closed) msWin.blur();					//pop-under
//if(!opbBDWin.closed) opbBDWin.blur()	//pop-under

window.blur()

//if(!ddPop.closed) ddPop.focus();		//pop-over
//if(!mtsWin.closed) mtsWin.focus();		//pop-over
//if(!msWin.closed) msWin.focus();		

	//////////////////////////////////////////////////////////////////////
	// Hot Rocket Marketing moved here as pop-Over by D.K. on 11/15/2002
	// No Delay
	// Removed by D.K. on 12-18-02
	//////////////////////////////////////////////////////////////////////
	//var hrmUrl = 'http://www.findanopportunity.com?cpgn=2073&scpgn=1703';

	///////////////////////////////////
	//*** If member enters from Franklin Surveys open a full page QH/MTS pop
	//*** added on 06-18-2003 by TR
	if (getCookie("frame_site") != "franklinsurveys")
	{
	
	////////////////////////////////////////////////////////////
	//*** Removed Quality Health Care on 01/23/2003 by T.R.
	//*** Moved to delayPopDispatcher position 2
	/////////////////////////////////////////////////////////////////
	//*** Quality Health Care added here on 01/23/2003 by T.R.
	//////////////////////////////////////////////////////////////////////////////////////////////////////
	//*** Quality Healthcare
	//*** Pop over
	//*** OTC Pop - Moved as a delay on 10/09/2002
	//*** moved here in position 1 by D.K. on 12-18-02
	//*** changed/added the name/value pairs(rdChildrenFlagYN=U, optMarryStatus=Unknown, qid507243=SilverCarrot) as requested by the client on 01-07-03 by D.K.
	//*** moved to delayPopDispatcher.html in position 4 by D.K. on 10-03-03
	//*** URL and query string parameter changes by D.K. on 10-03-03
	//*** moved here in position 1 by D.K. on 10-13-03
	//*** moved to delayPopDispatcher.html in position 3 by D.K. on 12-05-03
	/////////////////////////////////////////////////////////////////////////////////////////////////////
	var mtsurl1 = "http://v2.mts0.com/resources/docs/coRegistration/landingPage.jsp?";
	var mtsurl = "";
	mtsurl = mtsurl1 + "nextPage=campaign.jspa&refCodeId=1773";
	mtsurl += "&firstName=" + objGeneralVars['namefirst'];
	mtsurl += "&lastName=" + objGeneralVars['namelast'];
	mtsurl += "&address1=" + objGeneralVars['address1'];
	mtsurl += "&address2=" + objGeneralVars['address2'];
	mtsurl += "&city=" + objGeneralVars['city'];
	mtsurl += "&stateProvince=" + stateFullToAbbrev(unescape(objGeneralVars['state']),0);
	mtsurl += "&zipPostalCode=" + objGeneralVars['zip'];
	mtsurl += "&email=" + objGeneralVars['email'];
	mtsurl += "&gender=" + objGeneralVars['gender'];
	mtsurl += "&monthOfBirth=" + objGeneralVars['birth_month'];
	mtsurl += "&dayOfBirth=" + objGeneralVars['birth_day'];
	mtsurl += "&yearOfBirth=" + objGeneralVars['age'];
	mtsurl = mtsurl.replace(/undefined/g,"");	//remove all instances of undefined string

///////////////////////////////////////////////////////
//*** Quality Healthcare at the 4th position as hidden from the delayPopDispatcher, by D.K. on 2003-10-03
//*** added by D.K. on 12-18-02 
//*** restored on 04-11-2003 by TR
//*** moved here at position 1 on 11-25-2003 by DK
//var mtsWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_OTC_delay&site=tracker&qsURL=' + escape(mtsurl),'mts0PopUp','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=575,top=0,left=' + (screen.width / 2 - 10));

//### if msg_id was passed in, keep the Milesource pop on the top. mod by D.K. on 2003-06-03
			if (bMsgID == true)
			{
				//if(!mtsWin.closed) mtsWin.blur();
				//popWin.focus();	//keep Milesource Popup window on top
			}
			else
			{
				//if(!mtsWin.closed) mtsWin.focus();
			}
	} //end not Franklin Surveys test 
	else  //*** pop the full size window
		{
	var qhCampID; // = "676"
	qhCampID = (objGeneralVars['qhid'] > 0 ? objGeneralVars['qhid'] : "676")	 //default is 676 (coppertone)
	var mtsurl1 = "http://www.mts0.com/qh/memberjoin2.jsp?";
	var mtsurl = "";
	//mtsurl += "cf=SilverCarrot&np=" + escape("campaign.jsp?campaignid=676") + "&rf=1345"; // changed np=campaign.jsp?campaignid=656 encoded as requested by MTS. D.K. on 02-19-03
	mtsurl += "cf=SilverCarrot&np=" + escape("campaign.jsp?campaignid=" + qhCampID) + "&rf=1345"; // Dynamic Campgin ID by B.S. on 7/9/2003
	mtsurl += "&txtFirstName=" + objGeneralVars['namefirst'] + "&txtMiddleName=" + objGeneralVars['mi'] + "&txtLastName=" + objGeneralVars['namelast'];
	mtsurl += "&txtAddressOne=" + objGeneralVars['address1'] + "&txtApt=&txtAddressTwo=" + objGeneralVars['address2'];
	mtsurl += "&txtCity=" + objGeneralVars['city'] + "&optState=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0)) + "&txtZipOne=" + objGeneralVars['zip'] + "&txtZipTwo=";
	mtsurl += "&txtEmail=" + objGeneralVars['email'] + "&rdGender=" + fullGender(objGeneralVars['gender']);
	mtsurl += "&optDOBMonth=" + objGeneralVars['birth_month'] + "&optDOBDay=" + objGeneralVars['birth_day'] + "&optDOBYear=" + objGeneralVars['age'] + "&optEducation=&optMarryStatus=Unknown";
	mtsurl += "&rdChildrenFlagYN=U&cbxChildren0_2FlagYN=&cbxChildren3_5FlagYN=";
	mtsurl += "&cbxChildren6_12FlagYN=&cbxChildren13_17FlagYN=&cbxCat=&cbxDog=&cbxOthers=";
	mtsurl += "&cbxEmailSubscriptionFlagYN=1";
	mtsurl = mtsurl1 + mtsurl;
	mtsurl = mtsurl.replace(/undefined/g,"");	//remove all instances of undefined string
	//alert(mtsurl)
	//var mtsWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_fullOTC_delay&site=tracker&qsURL=' + escape(mtsurl),'mts0PopUp', 'width=' + screen.availWidth + ',height=' + screen.availHeight + ',toolbars=no, scrollbars=yes');

	} //end QH/MTS pop
	//////////////////////////////////////////////////////////////
	

	///////////////////////////////////////////////////////////////////////////////////////////////////////
	// Modified by D.K. on 11/26/2002. 
	// If Client=Razor, Razor Pop-up takes the 1st position and "Hot Rocket Marketing" is moved to the 2nd position
	// Else "Hot Rocket Marketing" stays in the 1st position
	///////////////////////////////////////////////////////////////////////////////////////////////////////
	if(getCookie('client') == 'Razor'){
		//"Hot Rocket Marketing" at the 2nd position as hidden
		//Removed by D.K. on 12-18-02 
		//var hrmWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_hrm_delay&site=tracker&qsURL=' + escape(hrmUrl), 'hrm1','to=1300,lef=1600,width=720,height=screen.availHeight,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no');
		//if(!hrmWin.closed) hrmWin.blur();

		//*** Quality Healthcare at the 2nd position as hidden
		//*** added by D.K. on 12-18-02 
		//var mtsWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_OTC_delay&site=tracker&qsURL=' + escape(mtsurl),'mts0PopUp','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=575,top=0,left=' + (screen.width / 2 - 10));
		//if(!mtsWin.closed) mtsWin.blur();

		//FreeRazor at the 1st position as focused.
		var razorUrl = 'http://www.freerazor.com/home.html&referrer=partner5';
		var razorWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_razor_main&site=tracker&qsURL=' + escape(razorUrl), 'rzr','to=1600,lef=1600,width=720,height=screen.availHeight,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no');
		if(!razorWin.closed) razorWin.focus();
		//window.focus()	//keep main window on top
	} else {
		//Removed by D.K. on 12-18-02 
		//var hrmWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_hrm_delay&site=tracker&qsURL=' + escape(hrmUrl), 'hrm1','to=1600,lef=1600,width=720,height=screen.availHeight,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no');
		//if(!hrmWin.closed) hrmWin.focus();

		
		/////////////////////////////////////////////////////////////
	//*** Added Blue Dolphin here on 01/23/2003 by T.R.
	//*** delayed 10 secs.
	///////////////////////////////////////////////////////////////////////
	//*** OnePageBuy (OPB) - Blue Dolphin
	//*** Delayed 150 seconds
	//*** Moved here on 10/09/2002
	//*** Moved here again on 12/18/2002 by D.K.
	//*** pop under the New OPB (qcV5.6-1BD) instead of "qc5-1BD" on 01/10/2003 by D.K.
	//*** Blue Dolphin removed by TR 0n 02.07/2003
	//////////////////////////////////////////////////////////////////////
	//var opbBD = "http://www.yourfreepresent.com/qcV4/OnepageBuy.asp?home=YFP-OPB-BD093002&store=qc5-1BD&savemem=0"
		//var opbBD = "http://www.yourfreepresent.com/qcV5/OnepageBuy.asp?home=YFP-OPB-qcV5.6-1BD011003&store=qcV5.6-1BD&savemem=0"
		//var opbBDWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_opb-bd_delay&site=tracker&qsURL=' + escape(opbBD), 'opbbd1','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=650,height=600,scrollbars=yes,resizable=yes')

		
		//*** Quality Health at the 1st position as Pop-over
		//*** added by D.K. on 12-18-02 
		//*** removed 01/23/2003 by TR
		//*** restored 02/07/2003 by TR
		//*** removed to pop unders on 02-21-2003
		//var mtsWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_OTC_delay&site=tracker&qsURL=' + escape(mtsurl),'mts0PopUp','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=575,top=0,left=' + (screen.width / 2 - 10));
		//if(!mtsWin.closed) mtsWin.focus();


		///////////////////////////////////////////////////////////////
		//*** atlasautomotive added as test 02-18-2003 by TR
		//*** moved to 1st position on 02-21-2003 by TR
		//*** updated URL on 03-16-2003 by D.K.
		//*** moved to pop under on 04-11-2003 by TR
		// var atlasURL = "http://www.atlasautomotivegroup.com/popups/silvercarrot/landing.cfm?refer=15460";  // Old URL
		var atlasURL = "http://www.atlasautomotivegroup.com/popups/silvercarrot/landing.cfm?refer=16078";  
		atlasURL += "&firstname=" + objGeneralVars['namefirst']  + "&lastname=" + objGeneralVars['namelast'] 
		atlasURL += "&Address=" + objGeneralVars['address1'] + "&Email=" +  objGeneralVars['email']
		atlasURL += "&City=" + objGeneralVars['city'] + "&State=" +  stateFullToAbbrev(unescape(objGeneralVars['state']),0) 
		atlasURL += "&Phone=" + objGeneralVars['phone1'] + objGeneralVars['phone2'] + objGeneralVars['phone3']
		atlasURL += "&zipcode=" + objGeneralVars['zip']
		atlasURL = atlasURL.replace(/undefined/g,"")//remove all instances of undefined string

		//var atlasWin = window.open('http://members.yourfreepresent.com/tracker/offer.asp?red=4&home=pop_atlas_popup&site=tracker&qsURL=' + escape(atlasURL),'atlaspop1','width=625,height=375,directories=no,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,to=1900,lef=333');
		//if (!atlasWin.closed) atlasWin.focus();

	}

}    


//###########################function to populate getRelevant Variables added on 04-15-2003 by TR
function popGRvariables(grURL) {
	var now = new Date ()
var grURL = "http://o3.getrelevant.com/ecr.html?pwsID=667&chanID=1392"
	grURL += "&email=" + objGeneralVars['email']  + "&postal_code=" + objGeneralVars['zip']
	grURL += "&first=" + objGeneralVars['namefirst'] + "&last=" + objGeneralVars['namelast'] + "&addr1=" + objGeneralVars['address1'] + "&addr2=" + objGeneralVars['address2']  + "&city=" + objGeneralVars['city'] 
	grURL += "&state_prov=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0)) + "&country=" + objGeneralVars['country'] 
	grURL += "&phone=" + objGeneralVars['phone1'] + objGeneralVars['phone2'] + objGeneralVars['phone3']
	grURL += "&gender=" + objGeneralVars['gender'] +  "&age=" + (now.getYear() - objGeneralVars['age'])                   ///new parameters added for getRelevent by TR 0n 03-19-2003
	grURL += "&yob=" +  objGeneralVars['age']
	grURL += "&dob=" + objGeneralVars['birth_month'] + "-" + objGeneralVars['birth_day']+ "-" + objGeneralVars['age'] 
	//grURL += "&destURL=" + escape("http://www.yourfreepresent.com/index.plex?ef=" + getCookie("entered_from"))

	grURL = grURL.replace(/undefined/g,"")	//remove all instances of undefined string
	document.cookie = "client=" + getCookie("client").replace("dynHostGR_","");	//get rid of 'dynHostGR_'
	document.cookie = "client=" + getCookie("client").replace("dynHostGR","");	//get rid of 'dynHostGR'
	document.cookie = "popDone=No";
	return grURL
}

//*************************** function to populate mbw Variables added on 04-15-2003 by TR
function popMBWvariables (mbwURL) {
	var objMBWHostVars = getPopUpVars("dynamicHostVars")
	var mbwURL = "https://www.membershipme.com/giftcard.asp?ID=silglatgt001&siteID=_MEA096EH398136000000SITE1 " // new URL. Added by TR 02/05/2003
	mbwURL += "&refid=" + getCookie('entered_from') + "&productImg=" + objMBWHostVars['productImg'] + "&productTxt=" + objMBWHostVars['productTxt']
	mbwURL += "&fn=" + objGeneralVars['namefirst'] + "&ln=" + objGeneralVars['namelast']
	mbwURL += "&adr1=" + objGeneralVars['address1'] + "&ad2=" + objGeneralVars['address2'] 
	mbwURL += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0))
	mbwURL += "&zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	
	document.cookie = "popDone=No";
	document.cookie = "client=MBW_DONE" //modify client cookie so that when they come back to index.plex, it won't run this if..else section

	return mbwURL;
}

//###########################function to populate WEB Variables added on 04-15-2003 by TR
function popWEBvariables(webURL){
	var objWebHostVars = getPopUpVars("dynamicHostVars")
	var webURL = "https://one-time-offer.com/gateway.asp?poolid=9241&srcid=11421&data="		// prod url
	var dataString = ""
	dataString += "fname=" + objGeneralVars['namefirst'] + "&lname=" + objGeneralVars['namelast']
	dataString += "&addr1=" + objGeneralVars['address1'] + "&addr2=" + objGeneralVars['address2']
	dataString += "&city=" + objGeneralVars['city'] + "&state=" + escape(stateFullToAbbrev(unescape(objGeneralVars['state']),0))
	dataString += "&zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	dataString += "&productimg=" + objWebHostVars['productImg'] + "&headerimg=" + objWebHostVars['headerImg'] + "&producttxt=" + objWebHostVars['productTxt']
	dataString += "&cref=" + getCookie('entered_from',0)
	dataString = dataString.replace(/=/g,"ÿ");	//WebLoyalty requirement: The names are separated from the values using an ascii 255 character (ÿ) and each pair is separated by the same ascii 255 character (ÿ).
	dataString = dataString.replace(/&/g,"ÿ");	//So, replace & and = with ÿ
	dataString = dataString.replace(/\+/g," ");	//Replace + with a space
	dataString = dataString.replace(/%20/g," ");//Replace %20 with a space
	//alert('dataString: ' + dataString);
	dataString = SimpleEncrypt(dataString);		//Encrypt the DataString
	//alert('Encrypted dataString: ' + dataString);

	webURL += dataString;
	document.cookie = "popDone=No";
	document.cookie = "client=WEB_DONE"	//modify client cookie
	return webURL;
}

//###########################function to populate AHA Variables added on 04-28-2003 by TR
function popAHAvariables(webURL){
	var objAhaHostVars = getPopUpVars("dynamicHostVars")
	if(objAhaHostVars['acct_code'] != "null" )	//*** null as string bec. its coming from the cookie
		acct_code = objAhaHostVars['acct_code'] + "_";
	else
		acct_code = "SC105_";	 //*** Default acct_code (105)
//  var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/sc_2_0911"  // Old URL
//###  New URL. modified by D.K. on 11-20-02
//	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/sc_3_1118"
//	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=part/29_A_0_SC"
//	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/29_C_0_SC"
	var ahaURL = "https://www.ahamembership.com/cgi-bin/sec.cgi?acct_code=" + acct_code + getCookie('entered_from') + "&p=scarot/30_A_0_SC"
	ahaURL += "&card_fname=" + objGeneralVars['namefirst'] + "&card_lname=" + objGeneralVars['namelast']
	ahaURL += "&card_address1=" + objGeneralVars['address1'] + "&card_address2=" + objGeneralVars['address2'] 
	ahaURL += "&card_zip=" + objGeneralVars['zip'] + "&email=" + objGeneralVars['email'] 
	ahaURL += "&phone=" + objGeneralVars['phone1'] + objGeneralVars['phone2'] + objGeneralVars['phone3']
	ahaURL += "&fim=" + objAhaHostVars['productImg'] + "&sim=" + objAhaHostVars['headerImg'] + "&prem_name=" + objAhaHostVars['productTxt']
	ahaURL += "&home=" + getCookie('entered_from',0)
	document.cookie = "client=ahaHost_2"	//modify client cookie
	 
	return ahaURL;   
}


//###########################function to test for no pop sites added on 04-01-2003 by TR
function checkForNoPops(enteredFrom) {
	//alert("In check for no pops " + enteredFrom);
var arrNoPopSites = new Array("ezsweeps071802EL10M", "xyzzsweeps071802EL10M", "ezsweeps-032703GIVE-.10M-3490", "ezsweeps-040803GIVE-.10M-3490");  //list of sites with no pops allowed. Add new sites as required
for (var i=0; i<arrNoPopSites.length; i++)
	{
	if(enteredFrom.toUpperCase() == arrNoPopSites[i].toUpperCase())	
		{
		return true;	
		}
	}
		return false; //no no pop site found
}



//###########################################################################
//# Webloyalty provided Encrypt/Decrypt Functions. Added by D.K. on 11-13-02
//###########################################################################
function reverse(s) {
	var rs = ''; //reverse string
	
	for (i=s.length;i>=0;i--) {
		rs = rs + s.charAt(i);			
	}
	
	return(rs);
}

function SimpleEncrypt(w) {
	//locals
	var x = '';
	var z, t;
	var v;
	var a, b;

	for (z=0;z<w.length;z++) {
		t = '';
		a = w.charCodeAt(z);															
		b = z + 1 % 256;
		t = a ^ b;
		t = t.toString(16);
		
		if ((a ^ b) < 16)
			t = '0' + t;				 												
		
		x = x + t;					
										
	}
	
	x = x.toUpperCase();								
	
	x = reverse(x);		

	//document.all.dvResult.innerHTML = '<strong>Result:</strong> ' + x;
		
	return x;
	
}

function SimpleDecrypt(s) {
	//locals
	var r = '';//result
	var a;
	var b;
	var c;
	
	s = reverse(s);
	
	for (z=0;z<s.length;z+=2) {
		t = s.substring(z,z+2);
	
		a = parseInt(t,16);
		
		b = r.length + 1;
		
		c = a ^ b %256;
		
		r = r + String.fromCharCode(c); 
	}
										
	document.all.dvResult.innerHTML = '<strong>Result:</strong> ' + r;

	return r;
}
////////end popStuff
////////////// rtd pixel called from index.plex added on 05-22-2003 by TR
	function dropRTDpixel(rtdURL) {
					 var RTD_IMGPixelTag = new Image();
						RTD_IMGPixelTag.src = rtdURL;
//						document.cookie = "aarp_RTD=''";
//						alert (rtdURL);
	}


//### End Webloyalty functions