function sendQuote()
{
	var name 		= $('#quote_name').val();
	var email 		= $('#quote_email').val();
	var message 	= $('#quote_message').val();
	
	if(trim(name) == '' || trim(name) == 'Name'){
		$('#info2').html("");
		return false;	
	}
	if(trim(email) == '' || trim(email) == 'E-mail'){
		$('#info2').html("");
		return false;	
	}
	if(trim(message) == '' || trim(message) == 'Message'){
		$('#info2').html("");
		return false;	
	}/*
	if(trim(scope) == '' || trim(scope) == 'Scope'){
		$('#info2').html("* Scope selection is required.");
		return false;	
	}
	if(trim(timeline) == '' || trim(timeline) == 'Timeline'){
		$('#info2').html("* Timeline selection is required.");
		return false;	
	}
	if(trim(message) == '' || trim(message) == 'Message'){
		$('#info2').html("* Message is a required field.");
		return false;	
	}*/
	
	validate = validate_email(email);
	
	if(validate != '200'){
		$('#info2').html("");	
		return false;
	}
	
	var pars ="name="+name+"&email="+email+"&message="+message;
	$.ajax({
			type: "POST",
			url: 'inc/php/send_message.php?type=quote',
			data: pars,
			dataType: 'text',
			beforeSend: ShowLoader2,
			success: HideLoader2,
			complete: CallAjaxResponse2
	})
}

function CallAjaxResponse(){$('#info').html("");}
function ShowLoader(){$('#info').html("");}
function HideLoader(){$('#info').html("");}

function CallAjaxResponse2(){$('#info2').html("");}
function ShowLoader2(){$('#info2').html("");}
function HideLoader2(){$('#info2').html("");}



function validate_email(email) {
  	var reg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9\.]{2,10})+$/.test(email);
  	if(reg == false) {
   		return '404'; // not valid
   	} else {
   		return '200'; // valid
   	}
}

function trim(str){
		trimed = str.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
		return trimed;
}
