

function goTo(place){
	window.location = place;
} 


function loadContact(){
	$('#partcont').animate({
	    height:300
	  }, 2000, function() {
	    // Animation complete.
	  });
	  var browserName=navigator.appName; 
	   
	if (browserName=="Microsoft Internet Explorer"){
		
		$('#mainbod').load('contact.html');
	} else {
	 		$('#partcont').load('contact.html');
	}
}
function preSend(){
	var email = $("#email").val();
	var mes = $("#message").val();
	var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/;
	if(filter.test(email)){
		if(mes.length>9){
			$.post("mailthis.php", { email: email, messa: mes  },
   			function(data){
     				if(data == 'success'){
     					$('#contCon').html("Thanks for getting in Touch!<br\> Your message has been sent.<br\><br\>"+mes);
     				} else {
     					alert('It looks like we encoutered an error, please try your message again later.');
     				}
   			});
		} else {
			alert('Please check that your message is at least 10 letters long');
		}
	} else {
		alert('Please check that you are using a valid email address');
	}
		
}

