document.write("<font style=font-family:verdana,tahoma,arial;font-size:9pt;color:#666666;font-weight:normal>");
document.write("</font>");

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" + 
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
location.reload();
  }
}

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}
document.write("<p><font style=font-family:verdana,tahoma,arial;font-size:10pt;color:#666666;font-weight:bold>");
var parts = getCookie("parts");
if (!parts) {
parts = 0
setCookie("parts", parts);
} else {
var parts = getCookie("parts");
}

function addprep(what){
var parts = getCookie("parts");
if (parts == "22" | parts>21){if (confirm("Sorry your shopping basket is full...\nWould you like to view/edit the contents of your basket?")){location.href="basket.htm";}else{window.status="Your basket is full"}}else{
puzz1 = (puzzle17+" "+puzzle11+puzzle12+puzzle13+puzzle14+puzzle15+puzzle16+" £"+puzzle18+puzzle19);
puzz2 = (puzzle27+" "+puzzle21+puzzle22+puzzle23+puzzle24+puzzle25+puzzle26+" £"+puzzle28+puzzle29);
puzz3 = (puzzle37+" "+puzzle31+puzzle32+puzzle33+puzzle34+puzzle35+puzzle36+" £"+puzzle38+puzzle39);
puzz4 = (puzzle47+" "+puzzle41+puzzle42+puzzle43+puzzle44+puzzle45+puzzle46+" £"+puzzle48+puzzle49);
puzz5 = (puzzle57+" "+puzzle51+puzzle52+puzzle53+puzzle54+puzzle55+puzzle56+" £"+puzzle58+puzzle59);
puzz6 = (puzzle67+" "+puzzle61+puzzle62+puzzle63+puzzle64+puzzle65+puzzle66+" £"+puzzle68+puzzle69);
puzz7 = (puzzle77+" "+puzzle71+puzzle72+puzzle73+puzzle74+puzzle75+puzzle76+" £"+puzzle78+puzzle79);
puzz8 = (puzzle87+" "+puzzle81+puzzle82+puzzle83+puzzle84+puzzle85+puzzle86+" £"+puzzle88+puzzle89);
code = what;
location.href="Javascript:addpart("+code+","+what+")";}
}

function addpart(code,what) {
if (confirm("Would you like to add\n"+code+"\nTo your shopping basket?")){
var part = getCookie("item")
var parts = getCookie("parts");
if (parts < 1 | parts == "0"){part = code + ";"}else{part = part + code + ";"}
setCookie("item", part);location.href="Javascript:location.reload()";
parts = parseInt(parts) + 1;
setCookie("parts", parts);
if (parts == 1){window.status="Your basket now contains "+parts+" item"}else{window.status="Your basket now contains "+parts+" items";location.href="Javascript:location.reload()";}}


}

// -->