function buyItem(newRef, newPrice, newTaxable, newProduct, newOption, newWeight, newQuantity) {
	var offsettime = +1;
now = new Date();
hour = now.getHours();
now.setHours(hour + offsettime);
        if(newQuantity<=0) {
            rc = alert('The quantity entered is incorrect');
        } else if(newOption=="out of stock") {
            rc = alert('Sorry This Product Is Out Of Stock');
        } else {
            if (confirm('Add '+newQuantity+' x '+newProduct+' - '+newOption+' each? ')) {
                index=document.cookie.indexOf('TheBasket');
                countbegin=(document.cookie.indexOf('=',index)+1);
                countend=document.cookie.indexOf(';',index);
                if(countend==-1) {
                    countend=document.cookie.length;
                }
				//strip pound sign
				newOption=(newOption.replace(/£/gi, ""));
				newOption=(newOption.replace(/&pound;/gi, ""));
                document.cookie='TheBasket='+document.cookie.substring(countbegin,countend)+'['+newRef+'|'+newPrice+'|'+newTaxable+'|'+newProduct+'|'+newOption+'|'+newWeight+'|'+newQuantity+']; expires='+now.toGMTString()+'';
				timeoutPeriod=0;
				setTimeout("location.reload(true);",timeoutPeriod);
            }
        }
    }
