$(document).ready(function () {
		$('#leadForm').bValidator();
	});

function checkSubmission()
 {
	 	
		var phone = $('#dareacode').val() + $('#dphonefirst').val() + $('#dphonelast').val();
	    $('#contact_phone').val(phone);//sdocument.getElementById("dareacode").value + document.getElementById("dphonefirst").value + document.getElementById("dphonelast").value;
		//alert($('#contact_phone').val());
 		var options = {
        beforeSubmit: function() {
			return $('#leadForm2').validate().form();
        },
        target: '#detailsView'
    	};
 }

function phonevalidator(number){
		number = number.replace(/\s+/g, "");
		if(number.length > 9 && number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/))
			return true;
		return false;
	}



