function emailForm(id)
{ 
	window.open("http://www.spadestinations.com.au/email/?id=" + id,"","location=no,width=400,height=425,resizeable=yes,scrollbars=yes");
}

function emailCheck()
{
	var alertMsg = "You will need to complete the following fields to send this email: \n";
	var tabText = "\t - ";
	var returnText = "\n";
	var sendMsg = false;
 
  
  if (document.emailForm.name.value == "")
  {
    alertMsg += tabText +"Your Name" + returnText;
	sendMsg = true;
	//return false;
  }
  
  if (document.emailForm.email.value.indexOf("@") < 1)
  {
    alertMsg += tabText + "Valid Email Address" + returnText;
	sendMsg = true;
	//return false;
  }
  if (document.emailForm.emailConfirm.value.indexOf("@") < 1)
  {
    alertMsg += tabText + "Valid Email Confirmation" + returnText;
	sendMsg = true;
	//return false;
  }else if (document.emailForm.email.value != "" && document.emailForm.email.value != document.emailForm.emailConfirm.value)
  {
	alertMsg += tabText + "Your Email Address and the Confirmation do not match" + returnText;
	sendMsg = true;
	//return false;
  }
  
  if (document.emailForm.message.value == "" || document.emailForm.message.value.length < 20)
  {
    alertMsg += tabText + "Your message is not long enough to send" + returnText;
	sendMsg = true;
	//return false;
  }
  
 if(sendMsg == true){
  	alert(alertMsg);
  	return false;
  }else{
  	return true;
  }
  
}
