function checkform(){
	var charexp = / /gi
	if(document.user_form.contact_name.value.replace(charexp,"") == ""){
	alert("Contact name cannot be blank");
	return false;
	}
	if(document.user_form.company_name.value.replace(charexp,"") == ""){
	alert("Company name cannot be blank");
	return false;
	}
	if(document.user_form.street.value.replace(charexp,"") == ""){
	alert("Street cannot be blank");
	return false;
	}
	if(document.user_form.city.value.replace(charexp,"") == ""){
	alert("City cannot be blank");
	return false;
	}
	if(document.user_form.postcode.value.replace(charexp,"") == ""){
	alert("Postcode cannot be blank");
	return false;
	}
	if(document.user_form.location.selectedIndex==0){
	alert("You must select a country");
	return false;
	}
	if(document.user_form.email.value.replace(charexp,"") == ""){
	alert("Email cannot be blank");
	return false;
	}
	if(document.user_form.first_choice.value.replace(charexp,"") == ""){
	alert("First choice cannot be blank");
	return false;
	}
	if(document.user_form.stand_type.selectedIndex==0){
	alert("You must select a stand type");
	return false;
	}
}

window.onload = function() {
  var a1,a2,a3,a4,a5;
  a1=document.getElementById('print_map_link');
  a2=document.getElementById('direct_link');
  a3=document.getElementById('direct_by_car_link');
  a4=document.getElementById('parking_link');
  a5=document.getElementById('map_v2');

  if (a1)
  {
		a1.onclick= function() {
			window.open('map.php','MAP','height=410,width=530,scrollbars=yes');
			return false;
		}
  }
 
  if (a2)
  {
		a2.onclick= function() {
			window.open('directions.php','Directions','height=410,width=530,scrollbars=yes');
			return false;
		}
  }
  
  if (a3)
  {
		a3.onclick= function() {
			window.open('directions_by_car.php','DirectionsCar','height=410,width=530,scrollbars=yes');
			return false;
		}
  }

  if (a4)
  {
		a4.onclick= function() {
			window.open('directions_by_car.php','Parking','height=410,width=530,scrollbars=yes');
			return false;
		}  
  }
  
  if (a5)
  {
		a5.onclick= function() {
			window.open('map_v2.php','Map','height=700,width=850,scrollbars=yes');
			return false;
		}  
  }
}