function nf_parrain_getCookie(nom) {
	if (document.cookie.length > 0) {
		debut = document.cookie.indexOf(nom+"=");
		if (debut != -1) {
			debut += nom.length+1;
			fin = document.cookie.indexOf(";", debut);
			if (fin == -1)
				fin = document.cookie.length;
			return(unescape(document.cookie.substring(debut, fin)));
		}
	}
	return(0);
}

function nf_recup_parrain_id(cle) {
	URL = window.location.toString();
	deb = URL.indexOf(cle)+cle.length+1;
	delta = ((URL.substring(deb)).indexOf("&") > 0) ? (URL.substring(deb)).indexOf("&") : URL.length-deb;
	return(URL.indexOf(cle)!=-1 ? URL.substring(deb,deb+delta) : nf_parrain_getCookie(cle));
}

NF_PARRAIN_ID = nf_recup_parrain_id("PARRAIN_ID");
if (NF_PARRAIN_ID>0)
	document.cookie = "PARRAIN_ID=" + escape(NF_PARRAIN_ID); 