<!--
	/**
	 * Variável de controle do formulário
	 */
	var enviarForm = null;


	function verificaForm(form){
	
		var oForm = document.getElementById(form);
		oForm.action = 'sendMail.php';
		var r = true;
		var msg = 'Todos os campos são de preenchimento obrigatório, preencher o campo '; 
	
		if(r == true && oForm.str_nome.value.trim() == ""){
			alert(msg + 'Nome.');
			oForm.str_nome.focus();
			r = false;
		}
	
		if(r == true && oForm.str_rg.value.trim() == ""){
			alert(msg + 'Rg.');
			oForm.str_rg.focus();
			r = false;
		}
	
		if(r == true && oForm.str_email.value.trim() == ""){
			alert(msg+'Email.');
			oForm.str_email.focus();
			r = false;
		}else if(r == true && oForm.str_email.value.trim() != "" && !validarEmail(oForm.str_email.value)){
			oForm.str_email.focus();
			r = false;
		}

		if(r == true && oForm.str_codigo.value.trim() == ""){
			alert(msg + 'Código com o texto da imagem.');
			oForm.str_codigo.focus();
			r = false;
		}

		/*var ttEE = oForm.elements['toMail[]'].length;
		var checkEE = false;
		for(int_i = 0; int_i < ttEE; int_i++){
			if(checkEE == true){
				continue;
			}
			checkEE = oForm.elements['toMail[]'][int_i].checked;
		
		}
		if(r==true && !checkEE){
			alert('É necessário selecionar pelo menos um endereço de Email.');
			oForm.elements['toMail[]'][0].focus();
			r = false;
		}*/
		
		if(r == true && enviarForm == true) {
			alert('Sua requisição esta sendo processada!\n\nAguarde...');	
			return false;
		}
	
		enviarForm = r;
		return r;
	
	}

	/**
     * Permite apenas a inclusão de numeross no objeto
     *
     * @param obj o campo que necessita da alteração
     * @param evt evento do documento
     * @return o valor do campo sem caracteres hexadecimais
     * @example onkeyup="return apenasNumeros(this,event);"
     *
     */
	function apenasNumeros(obj,evt){
		obj.value = obj.value.replace(/[^0-9]/g, '');
		return true;
	}

	/**
     * Remove espaços em branco no inicio e final da String
     *
     * @return a string sem os espaços
     * @example String.trim();
     */

	String.prototype.trim = function(){
		return this.replace(/^\s+/g, '').replace(/\s+$/g, '');
	}

	/**
	 *
	 * Validação de email
	 *
	 */

	 function validarEmail(email){
		var s = new RegExp('^[A-Za-z0-9_.-]+@([A-Za-z0-9_-]+\[.])+[A-Za-z]{2,4}$');
		if(email.match(s) == null) {
	   		alert("O formato de E-mail é voce@dominio.com.br");
	   		return false;
	  	}
	  	return true;
	}

	function toUpper(obj,evt){
		obj.value = obj.value.toUpperCase();
		return true;
	}

//-->
