//fired when quantity changed

function dosubmit2(x)
{
        t = eval("document." + x + ".quantity")
        failed = false
        if (isNaN(t.value))
        {
           alert("Please enter a valid number in quantity ");
           t.value = 1;
           t.focus();
           failed = true
		   
        }
        else 
        {
          if (t.value <= 0 )
          {
                        alert("Quantity cannot be zero or less");
                        t.value = 1;
                        t.focus();
						
                        failed = true
          }
        }
		eval("document." +x+ ".submit()")
        if (failed)
           document ['navigation'].quanttest.value = 'nogo'
        
        
}

<!---------------------FUNCTION WHICH IS FIRED WHEN SHIPPING ZONES ARE CHANGED------------------>
   //fired when shopping zones are changed

   var allowordernow = true

   function change_zone()
   {   allowordernow = false          
       var zone=document.navigation.zoneid.options[document.navigation.zoneid.selectedIndex].value;
       window.location.href="viewcart.asp?zoneid="+zone;
   }


   function change_cll()
   {               
       var zone=document.navigation.zoneid.options[document.navigation.zoneid.selectedIndex].value;
       var cll=document.navigation.classid.options[document.navigation.classid.selectedIndex].value;
       window.location.href="viewcart.asp?zoneid=" + zone + "&classid=" + cll;
   }


   //fired when order now is clicked

   function gocart()
   {
   if (allowordernow)
      {  
      if (document ['navigation'].quanttest.value == 'go')
         document ['navigation'].submit();
      else
         document ['navigation'].quanttest.value = 'go'
      }
   }              
   