// Basket Tools var formID = 1; var BasketAlertONIcon = "../SharedImages/BasketAlert.gif/$FILE/BasketAlert.gif"; var BasketAlertOFFIcon = "../transparent_Pixel.gif"; function BasketAlertOn(){ window.document.BASKETALERTICON.src = BasketAlertONIcon; } function BasketAlertOff(){ window.document.BASKETALERTICON.src = BasketAlertOFFIcon; } function BasketNotifyHandler(){ theBasket = window.document.forms[formID]; ctrl = theBasket.QTY; if(ctrl == null) return; if(parseInt(ctrl.value, 10) > 0) BasketAlertOn(); else BasketAlertOff(); } function emptyBasket() { theBasket = window.document.forms[formID]; if(theBasket.basketsize.value=="0") { alert("Sorry: You have not put any items in you basket to clear"); return; } if(confirm("Are you sure you want to delete all items from you shopping basket")) { theBasket.PID.value = ""; theBasket.QTY.value = ""; theBasket.basketsize.value = 0; } } function viewBasket() { theBasket = window.document.forms[formID]; if(theBasket.basketsize.value=="0") { alert("Sorry: You have not put any items in you basket to view"); return; } theBasket.OP.value = 0; theBasket.submit(); } function checkout() { theBasket = window.document.forms[formID]; if(theBasket.basketsize.value=="0") { alert("Sorry: You have not put any items in you basket to checkout"); return; } theBasket = window.document.forms[formID]; theBasket.OP.value = 1; theBasket.submit(); } function emViewBasket(formID) { theBasket = formID; if(theBasket.basketsize.value=="0") { alert("Sorry: You have not put any items in you basket to view"); return; } theBasket.OP.value = 0; theBasket.submit(); }