 function readCookie() {
   cookie_array = document.cookie.split ("; ");
   for (x=0; x < cookie_array.length; x++) {
    cookieParts_array = cookie_array[x].split("=");
     if (cookieParts_array[0] == 'Ref') {
      return unescape(cookieParts_array[1]);
     }
   }
   return null;
  }
 
 
  function checkRef(){
   var s = new String(readCookie());
   if (s.indexOf("//") == -1 || s == null)
   {
    var ref = escape(document.referrer);
    document.cookie="Ref=" + ref + ";path=/;domain=kimberlycredit-debt-consolidation.org";
   } 
	//window.status=document.cookie;
  }

 function clearCookie(){
	document.cookie="Ref=X;path=/;domain=kimberlycredit-debt-consolidation.org";
	//window.status=document.cookie;
 }

  
  