/**
* this file contains php coding for client side validation of get quote
* File Scope : Front
* @author Segnant
* @version 1.0
* @package Creative Handworks
*/

var rules=new Array();
rules[0]='quantityValuecheck()|custom';
rules[1]='firstname|required|First name found empty.';
rules[2]='firstname|alphaspace|First name must only contain alphabetic, numeric, underscore,space or hypen.';
rules[3]='email|required|Email found empty.';
rules[4]='email|email|Email found invalid.';
rules[5]='phone|required|Phone found empty.';
rules[6]='services|required|Service found empty.';

function quantityValuecheck()
{
  var quantity = document.frmGetQuote.quantity.value;
  if(quantity=='')
  {
    return ('Quantity found empty.');
  }
  else
  {
    if(isNaN(quantity))
    {
      return('Quantity must be numeric.');
    }
    else if(quantity<1000)
    {
      return('You must order minimum of 1000 cards.');
    }
  }  
}
