function validform()
{
	with(window.document.registerf)
	{
		if(name.value == "")
		{
			alert("Please enter Name.");
			name.focus();
			return false;
		}
		if(email.value == "")
		{
			alert("Please enter Email.");
			email.focus();
			return false;
		}
		if(college.value == "")
		{
			alert("Please enter your College.");
			college.focus();
			return false;
		}
		if(password.value == "")
		{
			alert("Please enter Password.");
			password.focus();
		return false;
		}
			
		if(password.value.length < 6)
		{
			alert("Password should be of minimum 6 words.");
			password.focus();
			return false;
		}
		if(pass.value == "")
		{
			alert("Please enter Confirm Password.");
			pass.focus();
			return false;
		}
		if(pass.value!= password.value)
		{  
			alert("Password do not match.");
			pass.focus();
			return false;
		}
		return true;
	}
}

function isValidContact(Contact) 
{
	with(window.document.registration)
	{
	var c = contact.value
	if (/^[0-9]+$/.test(c))
	{
		return (true)
	}
	return (false)
	}
}
function isValidContactc(contact) 
{
	with(window.document.registerf)
	{
	var c = contact.value
	if (/^[0-9]+$/.test(c))
	{
		return (true)
	}
	return (false)
	}
}

function contact_enter()
{		
	with(window.document.registerf)
	{
		var c = contact.value
		if(isValidContact('contact')!=false && c.length > 9)
		{
			document.getElementById('31').style.display = "block";
			document.getElementById('30').style.display = "none";
		}
		if(isValidContact('contact')==false && c.length <= 9)
		{
			document.getElementById('30').style.display = "block";
			document.getElementById('31').style.display = "none";
		}
	}
}

function contact_enter()
{		
	with(window.document.registerf)
	{
		var c = contact.value
		if(isValidContactc('contact')!=false && c.length > 9)
		{ 
			return true;
		}
		if(isValidContactc('contact')==false && c.length <= 9)
		{
			alert('Please enter valid contact number');
		}
	}
}
