function validate(form)
{
	var myfields = new Array(form.state,form.age_to)
	var mynames = new Array("State","Age")
	
	var counter=0;
	var features=0;
	var msg="Please fill in the following fields :\n\n";
	
	for (var i=0; i < myfields.length; i++)
	{
		if(myfields[i].value == "")
		{
			counter=1;
			msg=msg + mynames[i] + "\n";
		}
	}	

	if(counter==1)
	{
		alert(msg);
		return false;
	}


	else
	{
		return true;
	}

}

function checkPostCode(formfield)
{
	if (isNaN(formfield.value))
	{
		alert('Postcode must only contain numbers')
		formfield.focus()
	}
}

function changeUrl(formfield)
{
	if (formfield.value == "")
	{
		formfield.value = "http://www."
	}
}

function clearUrl(formfield)
{
	if (formfield.value ==  "http://www.")
	{
		formfield.value = ""		
	}
}
