/* Script flash */
	function EscreveFlash(piWid, piHei, psSrc, psId)
	{
	var strSwf;
	
	strSwf = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" id="+psId+" width="+piWid+" height="+piHei+">";
	strSwf += "<param name=\"movie\" value="+psSrc+" />";
	strSwf += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
	strSwf += "<param name=\"quality\" value=\"high\" />";
	strSwf += "<param name=\"wmode\" value=\"transparent\" />";
	strSwf += "<param name=\"menu\" value=\"false\" />";
	strSwf += "<embed id="+psId+" name="+psId+" allowScriptAccess=\"sameDomain\" swLiveConnect=\"true\" src="+psSrc+" quality=\"high\" wmode=\"transparent\" menu=\"false\" Pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width="+piWid+" height="+piHei+"></embed></object>";
	
	this.document.write(strSwf);
	} 
/* Fim Script flash */


// validacao Form1
function Form1_Validator(theForm)
	{
	
	  // check to see if the field is blank
	  if (theForm.Nome.value == "")
	  {
		alert("Name is required.");
		theForm.Nome.focus();
		return (false);
	  }
	
	 // check if email field is blank
	 if (theForm.Email.value == "")
	  {
		alert("Emails is required.");
		theForm.Email.focus();
		return (false);
	  }
	
	 // test if valid email address, must have @ and .
	  var checkEmail = "@.";
	  var checkStr = theForm.Email.value;
	  var EmailValid = false;
	  var EmailAt = false;
	  var EmailPeriod = false;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkEmail.length;  j++)
		{
		  if (ch == checkEmail.charAt(j) && ch == "@")
			EmailAt = true;
		  if (ch == checkEmail.charAt(j) && ch == ".")
			EmailPeriod = true;
		  if (EmailAt && EmailPeriod)
			break;
		  if (j == checkEmail.length)
			break;
		}
		// if both the @ and . were in the string
		if (EmailAt && EmailPeriod)
		{
			EmailValid = true
			break;
		}
	  }
	  if (!EmailValid)
	  {
		alert("Invalid Email.");
		theForm.Email.focus();
		return (false);
	  }
	
	
	  // because this is a sample page, don't allow to exit to the post action
	  // comes in handy when you are testing the form validations and don't
	  // wish to exit the page
	  return (true);
	  // replace the above with return(true); if you have a valid form to submit to
	}


// validacao form reservas
function Form3_Validator(theForm)
	{
	
	  // check to see if the field is blank
	  if (theForm.Roteiro.value == "")
	  {
		alert("Tour is required.");
		theForm.Roteiro.focus();
		return (false);
	  }
	  
	  // check to see if the field is blank
	  if (theForm.Nome.value == "")
	  {
		alert("Name is required.");
		theForm.Nome.focus();
		return (false);
	  }
	
	 // check if email field is blank
	 if (theForm.Email.value == "")
	  {
		alert("Email is required.");
		theForm.Email.focus();
		return (false);
	  }
	
	 // test if valid email address, must have @ and .
	  var checkEmail = "@.";
	  var checkStr = theForm.Email.value;
	  var EmailValid = false;
	  var EmailAt = false;
	  var EmailPeriod = false;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkEmail.length;  j++)
		{
		  if (ch == checkEmail.charAt(j) && ch == "@")
			EmailAt = true;
		  if (ch == checkEmail.charAt(j) && ch == ".")
			EmailPeriod = true;
		  if (EmailAt && EmailPeriod)
			break;
		  if (j == checkEmail.length)
			break;
		}
		// if both the @ and . were in the string
		if (EmailAt && EmailPeriod)
		{
			EmailValid = true
			break;
		}
	  }
	  if (!EmailValid)
	  {
		alert("Invalid Email.");
		theForm.Email.focus();
		return (false);
	  }
	
	
	  // because this is a sample page, don't allow to exit to the post action
	  // comes in handy when you are testing the form validations and don't
	  // wish to exit the page
	  return (true);
	  // replace the above with return(true); if you have a valid form to submit to
	}
	

// validacao form cadastro
function Form2_Validator(theForm)
	{
	
	  // check to see if the field is blank
	  if (theForm.Nome.value == "")
	  {
		alert("Nome is required.");
		theForm.Nome.focus();
		return (false);
	  }
	
	 // check if email field is blank
	 if (theForm.Email.value == "")
	  {
		alert("Email is required.");
		theForm.Email.focus();
		return (false);
	  }
	
	 // test if valid email address, must have @ and .
	  var checkEmail = "@.";
	  var checkStr = theForm.Email.value;
	  var EmailValid = false;
	  var EmailAt = false;
	  var EmailPeriod = false;
	  for (i = 0;  i < checkStr.length;  i++)
	  {
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkEmail.length;  j++)
		{
		  if (ch == checkEmail.charAt(j) && ch == "@")
			EmailAt = true;
		  if (ch == checkEmail.charAt(j) && ch == ".")
			EmailPeriod = true;
		  if (EmailAt && EmailPeriod)
			break;
		  if (j == checkEmail.length)
			break;
		}
		// if both the @ and . were in the string
		if (EmailAt && EmailPeriod)
		{
			EmailValid = true
			break;
		}
	  }
	  if (!EmailValid)
	  {
		alert("Invalid Email.");
		theForm.Email.focus();
		return (false);
	  }
	
	
	  // because this is a sample page, don't allow to exit to the post action
	  // comes in handy when you are testing the form validations and don't
	  // wish to exit the page
	  return (true);
	  // replace the above with return(true); if you have a valid form to submit to
	}



