/*
   name - name of the cookie
   value - value of the cookie
   [expires] - expiration date of the cookie
     (defaults to end of current session)
   [path] - path for which the cookie is valid
     (defaults to path of calling document)
   [domain] - domain for which the cookie is valid
     (defaults to domain of calling document)
   [secure] - Boolean value indicating if the cookie transmission requires
     a secure transmission
   * an argument defaults when it is assigned null as a placeholder
   * a null placeholder is not required for trailing omitted arguments
*/

function setCookie(name, value, expires, path, domain, secure) {
//	domain=".gemoney.co.uk";
//	domain=".jpmcodc.com"
	var date = new Date();
	fixDate(date);
	date.setTime(date.getTime()+(3*60*60*1000));		
	var curCookie = name + "=" + escape(value) +
      ("; expires=" + date.toGMTString()) +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
//  alert(curCookie)
  
  document.cookie=curCookie+";path=/;domain=.gemoney.co.uk;";
  
 
    
 // document.cookie=curCookie+";expires=Monday, 04-Apr-2010 05:00:00 GMT;domain=172.20.69.97;";

}

// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}




//setCookie("referrer", document.referrer);
//setCookie("request", window.location);
