function characteronly(e){
var unicode=e.charCode? e.charCode : e.keyCode
if(unicode!=9 && unicode!=13 && unicode!=37 && unicode!=38 && unicode!=39 && unicode!=40 && unicode!=46){
//if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
if ((unicode<64||unicode>122)&&(unicode!=32)&&(unicode!=8)){ //if not a number
alert("Please enter only the characters and space.");
return false //disable key press
}
}
}
function validContact(){
	var msg='';

	if (document.contact.contname.value == "")
	{
		msg+="Name"+"<br>";
	}

	if (document.contact.contemail.value == "")
	{
		msg+="Email"+"<br>";
	}

	if(document.contact.contemail.value.length>0)
	{
	 var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	 var address = document.contact.contemail.value;
	 if(reg.test(address) == false) 
	 {
	 msg=msg+"Valid Email-Id <br>";
	 }
	}

	if (document.contact.msg.value == "")
	{
		msg+="Message"+"<br>";
	}

	if (msg==''){
		return true; 
	}else {
		Sexy.alert('<h1>Skipton</h1><em>Fill the required field for Email us</em><br/>'+"<br>"+msg);return false;
		
	}
}

function validateEvent(){
	var msg='';

	if (document.contact.eventname.value == "")
	{
		msg+="Name"+"<br>";
	}

	if (document.contact.eventemail.value == "")
	{
		msg+="Email"+"<br>";
	}
	

	if(document.contact.eventemail.value.length>0)
	{
	 var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	 var address = document.contact.eventemail.value;
	 if(reg.test(address) == false) 
	 {
	 msg=msg+"Valid Email-Id <br>";
	 }
	}
	if (document.contact.dates.value == "")
	{
		msg+="Dates"+"<br>";
	}
	if (document.contact.details.value == "")
	{
		msg+="Event Details"+"<br>";
	}

	if (msg==''){
		return true; 
	}else {
		Sexy.alert('<h1>Skipton</h1><em>Fill the required field for Add Events to Calender</em><br/>'+"<br>"+msg);return false;
		
	}
}
