//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;
       if (document ['navigation'].email)
          var zcemail = document ['navigation'].email.value
       else
          var zcemail = ""
       window.location.href="viewcart.asp?zoneid="+zone+"&email=" + zcemail
   }


   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;
       if (document ['navigation'].email)
          var zcemail = document ['navigation'].email.value
       else
          var zcemail = ""
       //window.location.href="viewcart.asp?zoneid=" + zone + "&classid=" + cll+"&email=" + zcemail
   }


   //fired when order now is clicked

   function gocart()
   {

   if (document ['navigation'])
   {
      if (document ['navigation'].zoneid)
      {
         xzval = document ['navigation'].zoneid.value
         if (xzval == -1)
         { 
            alert("Please select a shipping zone first")
            return
         }
      }  

      if (document ['navigation'].classid)
      {
         xzval = document ['navigation'].classid.value
         if (xzval == -1)
         { 
            alert("Please select a shipping class first")
            return
         }
      }

      if (allowordernow)
         {  
         if (document ['navigation'].quanttest.value == 'go')
            document ['navigation'].submit();
         else
            document ['navigation'].quanttest.value = 'go'
         }
   }
   }              
   