function validateBlur(ref, nqty) 
{
    if (((nqty / nqty) != 1) && (nqty != 0)  || ((nqty < 1) && (nqty != 0))) 
    {
       alert('letters, symbols, fractions, and negative numbers will not work for the quantity');
        ref.origqty.focus();
        ref.origqty.value=1;
        ref.newqty.value=1;
        return false;
    }
    else
    { 
        ref.newqty.value=nqty;
        return false;
    }
}

function checkout(shipindex)
{
  if (!shipindex)
  {
   alert("Please select your state");
  }
  else
  document.checkoutform.submit();
}

function selstate(shipstate)
{
 document.location.href="cf.cart.php?action=updateshipstate&shipstate=" + shipstate + "";
}  

function selshipping(shippingmethod)
{
 document.location.href="cf.cart.php?action=updateshippingmethod&shippingmethod=" + shippingmethod + "";
}  

function checkstate() 
{
    if (document.stateform.shipstate.options[document.stateform.shipstate.selectedIndex].value == "NONE") 
    {
        alert("Please select your shipping state");
        document.stateform.shipstate.focus();
        return false;
    }
    else
    {
        return true;
    }    
}    
