﻿function doquote(intMinQty, intPackQty, intRegistered){

if (document.frmProduct.col.value == 0) {
    
    alert('Please select a colour');
    bolSubmit = 'False';
    return;
    }
    
 
if (document.frmProduct.qty.value == parseFloat(document.frmProduct.qty.value)) 
    {
    amount = intPackQty * Math.round(document.frmProduct.qty.value /intPackQty);

    if (amount != 0) 
    {
    if (amount != document.frmProduct.qty.value) 
    {
    alert('Rounding to closest qty of ' + amount);
    }
    }
    
    if (amount == 0) 
    {
    amount = intMinQty;
    alert('Rounding to min qty of ' + intMinQty);
    }
    } else {
    amount = intMinQty 
    alert('Rounding to min qty of ' + intMinQty);
    }
    
    if (amount < intMinQty)  
    {
    amount = intMinQty;
    alert('Rounding to min qty of ' + intMinQty);
    }
      
    document.frmProduct.qty.value = amount;
    
   
      
if(document.frmProduct.email.value == '') {
    alert('Please enter your email');
    bolSubmit = 'False';
    return;
}

if(document.frmProduct.name.value == '') {
    alert('Please enter your name');
    bolSubmit = 'False';
    return;
}

if(document.frmProduct.phone.value == '') {
    alert('Please enter your phone number');
    bolSubmit = 'False';
    return;
}
        
if(emailCheck(document.frmProduct.email.value) == false) {
    bolSubmit = 'False';
    return;
}

        if (checkInternationalPhone(document.frmProduct.phone.value)==false){
            alert('Please Enter a Valid Phone Number');
            bolSubmit = 'False';
            return;
        }   
        

 
document.frmProduct.submit();
}