
var sNumber = /^[0-9]+$/;
var sFloatNumber = /^[0-9\.]+$/;
var sEmail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;

function quoteValidate() {
var name = trim(document.frmQuote.txtName.value);
var mail = trim(document.frmQuote.txtEmail.value);
var phone = trim(document.frmQuote.txtPhone.value);
var message = trim(document.frmQuote.txtMsg.value);

	if (name == "Your Name :" || name == ""){
		alert("Name should not be empty.");
		document.frmQuote.txtName.focus();
		return false
	}
	
	if (mail == "Your Email :" || mail == ""){
		alert("Please enter your contact EMail");
		document.frmQuote.txtEmail.focus();
		return false
	}
	
	if (mail.search(sEmail) == -1){
		alert("Please enter a valid Email address.");
		document.frmQuote.txtEmail.focus();
		return false
	}
	
	if (phone ==  "Phone :" || phone == ""){
		alert("Please enter a Phone Number.");
		document.frmQuote.txtPhone.focus();
		return false
	}
	
	if (message ==  "Message :" || message == ""){
		alert("Please type a Message.");
		document.frmQuote.txtMsg.focus();
		return false
	}
	return true;
}

function trackValidate(){
var id = trim(document.frmtrackProject.txtTrack.value);

	document.frmtrackProject.txtTrack.focus();
	if (id ==  "Enter Your Track ID" || id=="" ){
		alert("Please Enter your Project Tracking ID");
		document.frmtrackProject.txtTrack.focus();
		return false
	}
	return true;
}

function contactusValidate(){
var name = trim(document.frmQuote.txtName.value);
var mail = trim(document.frmQuote.txtEmail.value);
var phone = trim(document.frmQuote.txtPhone.value);
var message = trim(document.frmQuote.txtMsg.value);

	if (trim(document.frmContact.txtName.value) == ""){
		alert("Name should not be empty.");
		document.frmContact.txtName.focus();
		return false;
	}
	if(document.frmContact.txtEmail.value.search(sEmail) == -1){
		alert("Please enter a valid Email address.");
		document.frmContact.txtEmail.focus();
		return false;
	}
	if(trim(document.frmContact.txtPhone.value) == ""){
	{
		alert("Phone number should not be Empty...");
		document.frmContact.txtPhone.focus();
		return false;	
	}
	return true;
}

