﻿var texto;

function aoClicar()
{
	if(document.txt_Nome.value == "Nome")
	{
		texto = document.txt_Nome.value; 
		//txt_Nome.value = "";
	}
}

//function aoSair()
//{
 //if(txt_Nome.value == "")
 //{
 // txt_Nome.value = texto;
// }
//}


if(screen.width >=800){
var tabela= "<table align=center width=760 height=701 border=0 cellpadding=0 cellspacing=0 background=imagens/fundo1.jpg style=background-repeat:no-repeat>";
}
if(screen.width >=1024){
var tabela= "<table align=center width=955 height=701 border=0 cellpadding=0 cellspacing=0 background=imagens/fundo.jpg style=background-repeat:no-repeat>";
}


function clearfield1() {
	if(document.form_busca.txt_Email.value == " E-mail") {
	document.form_busca.txt_Email.value = "";
	}
}
function clearfield2() {
	if(document.form_busca.txt_Nome.value == " Nome") {
	document.form_busca.txt_Nome.value = "";
	}
}


function validar_11()
{
<!--

var txt_Nome = document.form_newsletter.txt_Nome.value
if (txt_Nome==" Nome"){
	alert("É necessário o preenchimento do nome.");
	document.form_newsletter.txt_Nome.focus()
	return false
	}
if (txt_Nome==""){
	alert("É necessário o preenchimento do nome.");
	document.form_newsletter.txt_Nome.focus()
	return false
	}
	
var txt_Email = document.form_newsletter.txt_Email.value
if (txt_Email==" E-mail"){
	alert("É necessário o preenchimento do e-mail.");
	document.form_newsletter.txt_Email.focus()
	return false
	}
if (txt_Email==""){
	alert("É necessário o preenchimento do e-mail.");
	document.form_newsletter.txt_Email.focus()
	return false
	}
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form_newsletter.txt_Email.value))){
	alert("É necessário o preenchimento de um endereço de e-mail válido.");
	document.form_newsletter.txt_Email.focus()
	return false
    }
	
	var dr_manequim = document.form_newsletter.dr_manequim.value
if (dr_manequim=="36"){
	alert("Por favor preencha o seu manequim!");
	document.form_newsletter.dr_manequim.focus()
	return false
	}
	
	var dr_sapato = document.form_newsletter.dr_sapato.value
if (dr_sapato=="35"){
	alert("Por favor preencha o número do seu sapato!");
	document.form_newsletter.dr_sapato.focus()
	return false
	}
}
//-->

function fVerificaAspas(sPalavra) {
while(sPalavra.indexOf("'") > -1) {
sPalavra = sPalavra.substring(0,sPalavra.indexOf("'"))+" "+sPalavra.substring(sPalavra.indexOf("'")+1,sPalavra.length);
};
while(sPalavra.indexOf('"') > -1) {
sPalavra = sPalavra.substring(0,sPalavra.indexOf('"'))+" "+sPalavra.substring(sPalavra.indexOf('"')+1,sPalavra.length);
};

return sPalavra;
}
//-->


function valida_busca() {

     var Form, URL, resposta, s;
     Form = document.form_busca;
     URL = document.URL.toString();

if (Form.categoria.selectedIndex == 0 ) {
alert("Selecione uma categoria!");
Form.categoria.focus();
 return false;
}
}

function MM_formTel(e,src,mask) {
    if(window.event) { _TXT = e.keyCode; }
    else if(e.which) { _TXT = e.which; }
    if(_TXT >=48 && _TXT <=57) {
 var i = src.value.length; var saida = mask.substring(0,1); var texto = mask.substring(i)
 if (texto.substring(0,1) != saida) { src.value += texto.substring(0,1); }
    return true; } else { if (_TXT != 10) { return false; }
 else { return true; }
    }
}

