function buyhelp(){
var popurl="../phelp.htm"
winpops=window.open(popurl,"","width=340,height=400,left=450,top=1,scrollbars,")
}

    function buyItem(newItem,newPrice,newPrice2,newTaxable,newWeight,newField1,newAP,newQuantity) {


// If Cookie not there then start it..
          IsItOn = document.cookie.indexOf('BOTScart=');
          if (IsItOn == -1) { 
            document.cookie="BOTScart=.; path=/";
            }
//show for testing        alert(document.cookie); 


            if (confirm('Add '+newQuantity+' x '+newItem+' @ '+newPrice+'GBP'+' - to basket? ')) {
                index=document.cookie.indexOf('BOTScart=');
                countbegin=(document.cookie.indexOf('=',index)+1);
                countend=document.cookie.indexOf(';',index);
                if(countend==-1) { countend=document.cookie.length; }
                 fulllist = document.cookie.substring(countbegin,countend);
                 amended = false;
                 newItemList=''; itemlist=0;
                 for (var i=0;i<=fulllist.length;i++) {
                     if (fulllist.substring(i,i+1) == '[') {
                         thisitem=1;
                         itemstart=i+1;
                         fullstart=i+1;
                     } else if (fulllist.substring(i,i+1) == ']') {
                         itemend=i;
                         thequantity=fulllist.substring(itemstart,itemend);
                         itemlist++;
                         if (theItem==newItem  && theField1 == newField1) {
                             amended=true;
                             tempquantity=eval(thequantity)+eval(newQuantity);
                             newItemList=newItemList+'['+theItem+'|'+thePrice+'|'+thePrice2+'|'+theTaxable+'|'+theWeight+'|'+theField1+'|'+newAP+'|'+tempquantity+']';
                         } else {
                             newItemList=newItemList+'['+theItem+'|'+thePrice+'|'+thePrice2+'|'+theTaxable+'|'+theWeight+'|'+theField1+'|'+theAP+'|'+thequantity+']';
                         }
                     } else if (fulllist.substring(i,i+1)=='|') {
                         if (thisitem==1) theItem=fulllist.substring(itemstart,i);
                         if (thisitem== 2) thePrice=fulllist.substring(itemstart,i);
                         if (thisitem== 3) thePrice2=fulllist.substring(itemstart,i);
                         if (thisitem== 4) theTaxable=fulllist.substring(itemstart,i);
                         if (thisitem== 5) theWeight=fulllist.substring(itemstart,i);
                         if (thisitem== 6) theField1=fulllist.substring(itemstart,i);
                         if (thisitem== 7) theAP=fulllist.substring(itemstart,i);
                         thisitem++;itemstart=i+1;
                     }
                 }
    history.back();
                 if (amended==false) {
                     newItemList=newItemList+'['+newItem+'|'+newPrice+'|'+newPrice2+'|'+newTaxable+'|'+newWeight+'|'+newField1+'|'+newAP+'|'+newQuantity+']'; }
                 index = document.cookie.indexOf('BOTScart=');
                 document.cookie='BOTScart='+newItemList+'; path=/';
            }
    }

