//Include Java script for contact and order forms
//formsinclude.js

function FP_popUpMsg(msg) {//v1.0
 alert(msg);
}

function emailvalidation(entered, alertbox){
  with (entered)
  {
  apos=value.indexOf("@"); 
  dotpos=value.lastIndexOf(".");
  lastpos=value.length-1;
  if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
  {if (alertbox) {alert(alertbox);} return false;}
    else {return true;}
  }
}

function ltrim(stringToTrim) {
	return stringToTrim.replace(/^\s+/,"");
}

function emptyvalidation(entered, alertbox){
   with (entered)
  {
  value=ltrim(value);
  if (value==null || value=="" || value.length == 0)
   {if (alertbox!="") {alert(alertbox);} return false;}
     else {return true;}
   }
} 


