/* Currency and versions preferences Javascript */
 function getCookie(name) { 
var chocchip;
	chocchip = document.cookie;
    var index = chocchip.indexOf(name + "=");
    if (index == -1) return null;
    index = chocchip.indexOf("=", index) + 1; 
    var endstr = chocchip.indexOf(";", index);
    if (endstr == -1) endstr = chocchip.length; 
    return unescape(chocchip.substring(index, endstr));
  }
  
 function workoutexpiredate() {

    var expire = new Date() ;
    var agesaway = expire.getTime() + (365 * 24 * 60 *60 *1000); //new expiry date = 1 year

    expire.setTime(agesaway);

    return  (expire.toGMTString());
 }

function UpdateCookies(name)
  {
  var expiredate;
  
   expiredate = workoutexpiredate();

    var str1 ;    
     str1 = name + "=" + Spike2Version + "|" + currency + "|" + SignalVersion + "|" + SpCurrency + ";expires=" + expiredate +";domain=ced.co.uk";
  document.cookie =str1;
     
  }

function stripcookie(name) {
 
  var str1; 
  str1 = getCookie(name);
  
  cookievalues = str1.split("|");
  return (cookievalues);

}

/* end of file */