function validatefunc()
{
	myform = document.form1
	
	if (myform.name.value == "" )
	{
		alert("Please key in your name!")
		myform.name.focus();
		return false;
	}
	else if (myform.company.value =="" )
	{
		alert("Please key in your company name!")
		myform.company.focus();
		return false;
	} 
	else if (myform.email.value =="" )
	{
		alert("Please key in your email address!")
		myform.email.focus();
		return false;
	}
	else if(myform.email.value!="")
	{
		email = myform.email.value;
		AtPos = email.indexOf("@")
		StopPos = email.lastIndexOf(".")
		
		if (AtPos == -1 || StopPos == -1) {
			
			alert("Please key in valid email address!")
			myform.email.focus();
			return false;
		}

		if (StopPos < AtPos) {
			alert("Please key in valid email address!")
			myform.email.focus();
			return false;
		}

		if (StopPos - AtPos == 1) {
			alert("Please key in valid email address!")
			myform.email.focus();
			return false;
		}
	}
	else
	{
		return true;
	}
	return true;
}

function OpenFlavour() {
	
	window.open("new-flavour.html",null,"height=858,width=602,status=no,toolbar=no,menubar=no,location=no"); 
}

