/* ####### Funcao Barra de Status ############*/
window.defaultStatus=":: Global Link"


/* ####### Funcao Verificacao do Formulario ############*/
function consistir(theForm)
{

// VERIFICA NOME

  if (theForm.nome.value == "") 
   {
		alert("Informe seu Nome.");
		theForm.nome.focus();
		theForm.nome.select();
		return false;
   }

// VERIFICA EMAIL

  if (theForm.email.value == "") {
		alert("Informe seu e-mail.");
		theForm.email.focus();
		theForm.email.select();
		return false;
	} else {
		prim = theForm.email.value.indexOf("@")
		if(prim < 2) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("@",prim + 1) != -1) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf(".") < 1) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf(" ") != -1) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("zipmeil.com") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("hotmeil.com") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf(".@") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("@.") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf(".com.br.") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("/") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("[") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("]") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("(") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf(")") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
		if(theForm.email.value.indexOf("..") > 0) {
			alert("O e-mail informado parece não estar correto.");
			theForm.email.focus();
			theForm.email.select();
			return false;
		}
      }
// VERIFICA MENSAGEM

  if (theForm.mensagem.value == "") 
   {
		alert("Escreva sua Mensagem.");
		theForm.mensagem.focus();
		theForm.mensagem.select();
		return false;
   }
	
  return (true);
}

/* ####### Funcao Verificacao do Formulario de Inclusão e Alteração de Pedidos ############*/
function verif(theForm)
{

// VERIFICA NOME DO IMPORTADOR

  if (theForm.importador.value == "")
   {
		alert("Informe o Importador");
		theForm.importador.focus();
		theForm.importador.select();
		return false;
   }

  if (theForm.referencia.value == "")
   {
		alert("Informe a Referência");
		theForm.referencia.focus();
		theForm.referencia.select();
		return false;
   }

  if (theForm.quant1.value == "")
   {
		alert("Informe a Quantidade do Pedido");
		theForm.quant1.focus();
		theForm.quant1.select();
		return false;
   }

  if (theForm.produto1.value == "")
   {
		alert("Informe o Produto");
		theForm.produto1.focus();
		theForm.produto1.select();
		return false;
   }

  return (true);
}

/* ####### Funcao Verificacao do Formulario de Inclusão e Alteração de Clientes ############*/
function verifcli(theForm)
{

// VERIFICA LOGIN DO CLIENTE

  if (theForm.logincli.value == "")
   {
		alert("Informe o Login");
		theForm.logincli.focus();
		theForm.logincli.select();
		return false;
   }

  if (theForm.senhacli.value == "")
   {
		alert("Informe a Senha");
		theForm.senhacli.focus();
		theForm.senhacli.select();
		return false;
   }

  if (theForm.grupocli.value == "")
   {
		alert("Informe o Grupo");
		return false;
   }

  if (theForm.clientecli.value == "")
   {
		alert("Informe o Cliente");
		theForm.clientecli.focus();
		theForm.clientecli.select();
		return false;
   }

  return (true);
}

/* ####### Funcao Verificacao do Formulario de Alteração de Clientes (Login) ############*/
function veriflogin(theForm)
{

// VERIFICA LOGIN DO CLIENTE

  if (theForm.logincli.value == "")
   {
		alert("Informe o Login");
		theForm.logincli.focus();
		theForm.logincli.select();
		return false;
   }
}

/* ####### Funcao Verificacao do Formulario de Alteração de Clientes (Login) ############*/
function verif_imp(theForm)
{

// VERIFICA PO

  if (theForm.PO.value == "")
   {
		alert("Informe código PO");
		theForm.PO.focus();
		theForm.PO.select();
		return false;
   }
}