<!--
	<!-- BL 5th June 2007. 7364 Commission Junction tracking. Drop a cookie, set to expire from 45 to 120 days. -->
	
	// Six variables are used to set the new cookie.
	// The name of the cookie, the value(s) to be stored,
	// and finally the number of days until the cookie expires.
	
function setCJCookie(NameOfCookie, NetworkAID, NetworkPID, NetworkSID, NetworkSRC, expiredays)
{
if ( (NetworkAID == null) || 
     (NetworkAID.length == 0 ) ||
     (NetworkPID == null) || 
     (NetworkPID.length == 0 ))
{
    return;
}


// convert the number of days to a valid date.
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

// The next line stores the cookie, simply by assigning
// the values to the "document.cookie" object.
// Note the date is converted to Greenwich Mean time using
// the "toGMTstring()" function.

//document.cookie = NameOfCookie + "=" + escape(value) +
//((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());

//%=NetworkAID%>", "<%=NetworkPID%>", "<%=NetworkSID%>", 'CJ', '45');
//AAAA=XXX=FFF=CJ


if (RFSReadMultiValueCookie(NameOfCookie,"NetworkPID") == null)
{
    document.cookie = NameOfCookie + "=" +
		    "NetworkAID=" + escape(NetworkAID)  + 
			"&NetworkPID=" + escape(NetworkPID)  + 
			"&NetworkSID=" + escape(NetworkSID)  + 
			"&NetworkSRC=" + escape(NetworkSRC) +
    ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; domain=alliance-leicester.co.uk " + ";path=/";  
}

} // function 
//-->