function submitContactForm(){
    var reg = /^[A-Z0-9._%+-]+@([A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
    var fname = $('#fname').val();
    var lname = $('#lname').val();
    var cname = $('#cname').val();
	var role = $('#role').val();
	var email = $('#email').val();
	var phone = $('#phone').val();

    if(fname.trim() == '' )
	{
        $('#fname').focus();
        return false;
    }
	else if(lname.trim() == '' )
	{
        $('#lname').focus();
        return false;
	}
	else if(cname.trim() == '' )
	{
        $('#cname').focus();
        return false;
	}
	else if(role.trim() == '' )
	{
        $('#role').focus();
        return false;
	}
	else if(email.trim() == '' ){
        $('#email').focus();
        return false;
    }else if(email.trim() != '' && !reg.test(email)){
        $('#email').focus();
        return false;
    }else if(phone.trim() == '' ){
        $('#phone').focus();
        return false;
    }else{
        $.ajax({
            type:'POST',
            url:'request_do.php',
           data:'contactFrmSubmit=1&fname='+fname+'&lname='+lname+'&cname='+cname+'&role='+role+'&email='+email+'&phone='+phone,
			

            beforeSend: function () {
                $('.submitBtn').attr("disabled","disabled");
                $('.modal-body').css('opacity', '.5');
            },
            success:function(msg){
                if(msg == 'ok'){

					$('.statusMsg').html('<div class="alert alert-success" role="alert">Thanks for contacting us; we\'ll get back to you soon.</div>');
					$("#requestform")[0].reset();

					
                }else{
                    $('.statusMsg').html('<div class="alert alert-danger" role="alert">Some problem occurred, please try again.</div>');
                }
                $('.submitBtn').removeAttr("disabled");
                $('.modal-body').css('opacity', '');
            }
        });
    }
}
