function swapImg(img2Enlarge){
	var viewImgBox = document.getElementById('viewImgBox');
	viewImgBox.src=viewImgArray[img2Enlarge][1];
	viewImgBox.width=viewImgArray[img2Enlarge][4];
	viewImgBox.height=viewImgArray[img2Enlarge][5];
	var theDiv = document.getElementById('captionDiv');
	theDiv.innerHTML = viewImgArray[img2Enlarge][3];
}//end swapImg

function emailForm(adid, gp_id)
{ 
	window.open("http://www.queenslandbrides.com.au/email/?adid=" + adid + "&gp_id=" + gp_id,"","location=no,width=410,height=475,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;
  }
  
}
