function contactform() {


	var name = document.getElementById("name").value; 
	var email = document.getElementById("email").value; 
	var contact_no = document.getElementById("contact_no").value; 
	var message = document.getElementById("message").value; 
	
    var focus = "";
    var errormsg = "";	
	
	
	if(name.length == 0 ){
        errormsg+='Please enter your Name!\n';
        if (focus=="") focus = "name";
        document.getElementById("name").style.backgroundColor = 'red';
    }
	
	if(name  == 'Name'){
        errormsg+='Please enter your Name\n';
        if (focus=="") focus = "name";
        document.getElementById("name").style.backgroundColor = 'red';
    }

	if(email.length == 0){
		errormsg+="Please Enter your Email Address!\n";
            if (focus=="") focus = "email";
            document.getElementById("email").style.backgroundColor = 'red';
	}
	if(email  == 'Email Address'){
        errormsg+='Please enter your Email Address\n';
        if (focus=="") focus = "email";
        document.getElementById("email").style.backgroundColor = 'red';
    }
	else if(email!= ''){
		if (email.indexOf('@')==-1||email.indexOf('.')==-1||email.indexOf('@.')!=-1){
			errormsg+="Please Enter a valid Email Address!\n";
			if (focus=="") focus = "email";
			document.getElementById("email").style.backgroundColor = 'red';
		}    
	}
	if(contact_no.length==0){
        errormsg+='Please enter your Contact Number!\n';
        if (focus=="") focus = "contact_no";
        document.getElementById("contact_no").style.backgroundColor = 'red';
    }
	if(contact_no  == 'Contact Number'){
        errormsg+='Please enter your your Contact Number\n';
        if (focus=="") focus = "contact_no";
        document.getElementById("contact_no").style.backgroundColor = 'red';
    }
    else if(contact_no.length > 13){
        errormsg+='Please enter at least 13 numbers for your Contact Number!\n';
        if (focus=="") focus = "contact_no";
        document.getElementById("contact_no").style.backgroundColor = 'red';
    }
    else if (!/^-?\d+$/.test(contact_no)){
        errormsg+='Please enter only numbers for your Contact Number!\n';
        if (focus=="") focus = "contact_no";
        document.getElementById("contact_no").style.backgroundColor = 'red';
    }	
	if(message.length == 0 ){
        errormsg+='Please enter your Enquiry!\n';
        if (focus=="") focus = "message";
        document.getElementById("message").style.backgroundColor = 'red';
    }
	if(message  == 'Type your enquiry here'){
        errormsg+='Please enter your Enquiry\n';
        if (focus=="") focus = "message";
        document.getElementById("message").style.backgroundColor = 'red';
    }
	
	
    if (errormsg!= ""){
        document.getElementById(focus).focus();
        alert(errormsg);
        return false;

    }else{
        return true;
    }
}
