var active = null;

turnOff=function(active){
	active.style.display = "none";
}

turnOn=function(active){
	active.style.display = "block";
}

switchContent=function(id){	

	if(active){
		turnOff(active);
	}
	active=document.getElementById(id);
	turnOn(active);	
}


function validate() {
	if (document.form1.fullname.value == '')                
    {
        alert('Please enter your full name!');
        return(false);
    }
	var emailAdd = document.form1.email.value;
	if (emailAdd=='')
	{
        alert('Please enter your correct email!');
        return(false);
    }
	for(i=0; i<emailAdd.length; i++){
	if(emailAdd.charAt(i)== "/"){alert('Please enter your correct email!'); return(false);}
	if(emailAdd.charAt(i)== ":"){alert('Please enter your correct email!'); return(false);}
	if(emailAdd.charAt(i)== ","){alert('Please enter your correct email!'); return(false);}
	if(emailAdd.charAt(i)== ";"){alert('Please enter your correct email!'); return(false);}
    }
	if(emailAdd.indexOf("@")==-1){alert('Please enter your correct email!'); return(false);};
	if(emailAdd.indexOf(".")==-1){alert('Please enter your correct email!'); return(false);};
	atpos = emailAdd.indexOf("@")
	emailpos = emailAdd.lastIndexOf(".")
	if((atpos+2)>=emailpos)
		{
		alert('Please enter your correct email!'); return(false);
	}

	
	
}

function emptymail(){
	document.form1.name.value = "";
	document.form1.email.value = "";
	document.form1.commnt.value = "";
}