function checkFormEntry()
{	
	var error="";
	document.getElementById("errorMessage").innerHTML="";
	document.getElementById("successMessage").innerHTML="";
	
	if(document.getElementById("username").value.length<5)
	{
		error="The username must be at least 5 characters. <br />";
	}
	
	if(document.getElementById("subscribe").checked==false)
	{
		error += "You must signed up.";
	}		
		
	if(error!="")
	{
		document.getElementById("errorMessage").innerHTML=error;
	}
	else
	{
		//document.getElementById("successMessage").innerHTML="You have successfully signed up";
		
		window.location.href="Success.html";
	}	
	
	return false;
}

document.getElementById("form1").onsubmit=checkFormEntry;