// JavaScript Document

function valPhotoUpload()
{
		
		if(document.photoUpload.txtFamilyName.value=='')
		{
			alert("Please fill in Family Name");
			return false;
		}
	
		if(document.photoUpload.txtGivenName.value=='')
		{
			alert("Please fill in your name");
			return false;
		}
		
		if(document.photoUpload.txtCountry.value=='')
		{
			alert("Please fill in your country name");
			return false;
		}
		
		if(document.photoUpload.txtEmail.value=='')
		{
			alert("Please fill in your email address");
			return false;
		}
		if(document.photoUpload.txtVerify.value=='')
		{
			alert("Please verify your email address.");
			return false;
		}
		if(document.photoUpload.txtVerify.value!=document.photoUpload.txtEmail.value)
		{
			alert("Error : Unmatched email address for verification.");
			return false;
		}
	
		if(document.photoUpload.fileUpload.value=='')
		{
			alert("Please choose a photo to be upload");
			return false;
		}
		if(document.photoUpload.txtCamModel.value=='')
		{
			alert("Please fill in your camera model");
			return false;
		}
		if(document.photoUpload.txtLocation.value=='')
		{
			alert("Please fill in photo shooting location. ");
			return false;
		}
		if(document.photoUpload.txtStory.value=='')
		{
			alert("Please tell us briefly story behind this photo");
			return false;
		}
		if(document.photoUpload.chkAccept.value=='')
		{
			alert("Please click Accept to proceed.");
			return false;
		}
		else  
		{
			
		document.photoUpload.method = "POST"
		document.photoUpload.action = "process/process.php";
          document.photoUpload.submit();
		return true;
			
			//window.location="../process.php";
			//return true;
		}
		//window.location="../process.php";
		//return true;

}
