  function addToBasket(){

    if(!checkBlank(ProductInfoForm.colour, 'Please select a colour')) exit;
    if(!checkBlank(ProductInfoForm.personalised, 'Please enter personalisation')) return;
	document.ProductInfoForm.action='AddToBasket.php';
    document.ProductInfoForm.submit();

  }

  function addToBasket2(){

    if(!checkBlank(ProductInfoForm.colour, 'Please select a colour')) exit;
    if(!checkBlank(ProductInfoForm.personalised, 'Please enter personalisation')) return;
    if(!checkNumeric(ProductInfoForm.personalised, 'Personalisation should be a number')) return;
	document.ProductInfoForm.action='AddToBasket.php';
    document.ProductInfoForm.submit();

  }

  function resetGarment(pageurl, ref){
    
    alert("RESET GARMENT");

    //window.location='ViewItem.php?cat=<?= $_GET["cat"] ?>&item=<?= $_GET["item"] ?>&goToPage=<?= $_GET["goToPage"] ?>&keyword=<?= $_GET["keyword"] ?>&product='+ref+'&ql=<?= $_GET["ql"] ?>&newitem=<?= $_GET["newitem"] ?>&bs=<?= $_GET["bs"] ?>';
    window.location=pageurl+'.php?product='+ref;
    
  }

  function setProduct(){
  
    alert("SET PRODUCT");

    document.ProductInfoForm.action='ViewItem.php';
    document.ProductInfoForm.colour.value = '';
    document.ProductInfoForm.submit();

  }

  function setColour(pageurl, itemprint, ref){
  
    alert("SET COLOUR");

    document.ProductInfoForm.action=pageurl+'.php';
    document.ProductInfoForm.print.value = '';
    document.ProductInfoForm.submit();
    if(itemprint != 0){
      document.ProductInfoForm.print.value = '0';
    }
    setPrint(pageurl, itemprint);

  }

  function setPrint(pageurl, itemprint){

    alert("SET PRINT");
    
    document.ProductInfoForm.action=pageurl+'.php';
    document.ProductInfoForm.submit();

  }

  function showGlobalDiv(showDiv) {
    divObj=document.getElementById(showDiv);
    divObj.style.visibility='visible';
    return(true);
  }

  function hideGlobalDiv(hideDiv) {
    divObj=document.getElementById(hideDiv);
    divObj.style.visibility='hidden';
    return(true)
  }
  
