 <!-- Início da função de criar máscara
  function criaMascara(_RefObjeto, _Modelo){
    var valorAtual = _RefObjeto.value;        
    var valorNumerico = '';
    var nIndexModelo = 0;
    var nIndexString = 0;
    var valorFinal = '';
    var adicionarValor = true;     
      // limpa a string valor atual para verificar 
      // se todos os caracteres são números
      for (i=0;i<_Modelo.length;i++){
        if (_Modelo.substr(i,1) != '#'){
          valorAtual = valorAtual.replace(_Modelo.substr(i,1),'');
      }}
      
      // verifica se todos os caracteres são números
      for (i=0;i<valorAtual.length;i++){
        if (!isNaN(parseFloat(valorAtual.substr(i,1)))){
          valorNumerico = valorNumerico + valorAtual.substr(i,1);
      }}
      
      // aplica a máscara ao campo informado usando
      // o modelo de máscara informado no script
      for (i=0;i<_Modelo.length;i++){
        
        if (_Modelo.substr(i,1) == '#'){
          if (valorNumerico.substr(nIndexModelo,1) != ''){
            valorFinal = valorFinal + valorNumerico.substr(nIndexModelo,1);
            nIndexModelo++;nIndexString++;
          } 
            else {
              adicionarValor = false;
        }}
          
          else {
            if (adicionarValor && valorNumerico.substr(nIndexModelo,1) != ''){
            valorFinal = valorFinal + _Modelo.substr(nIndexString,1)
            nIndexString++;
          }}
      }
    
      //alert(valorFinal)
      _RefObjeto.value = valorFinal 

  }
  //--> Fim da função de criar máscara
  

 <!-- Valida Contato
function valida_contato(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.nome.value.length == 0){
ok = false;
msg += "Digite seu NOME!\n";
}
if (f.email.value.length == 0){
ok = false;
msg += "Digite seu E-MAIL!\n";
}							
if (f.mensagem.value.length == 0){
ok = false;
msg += "Digite sua MENSAGEM!\n";
}
if (!ok) alert(msg); 
return ok;
}
 //-->

   <!-- Valida CEP 2
function valida_cep2(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.cep2.value.length == 0){
ok = false;
msg += "Digite o CEP para calculo do frete!\n";
}
if (!ok) alert(msg); 
return ok;
}
 //-->

  <!-- Valida Newsletter
function valida_news(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.email.value.length == 0){
ok = false;
msg += "Digite seu E-MAIL!\n";
}							
if (!ok) alert(msg); 
return ok;
}
 //-->

    <!-- Valida Pedido
function valida_pedido(f) {
var ok = true;
var msg = "ATENÇÃO!\n\n";
if (f.nome.value.length == 0){
ok = false;
msg += "Digite seu NOME!\n";
}
if (f.email.value.length == 0){
ok = false;
msg += "Digite seu E-MAIL!\n";
}	
if (f.cpf.value.length == 0){
ok = false;
msg += "Digite seu CPF!\n";
}	
if (!ok) alert(msg); 
return ok;
}
 //-->


 
   <!----------Pop Up---------->
function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    this.major = parseInt(navigator.appVersion)
    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav3 = (this.nav && (this.major == 3)) 
    this.ie   = (agt.indexOf("msie") != -1)
}
var is = new Is();

function popup(url,width,height) {
        if (is.nav) {
                width  += (is.nav3) ? 20 : 15;
                height += (is.nav3) ? 30 : 15;
        } else {
                width  += 0;
                height += 0;
        }
        newWinObj = window.open(url,'','toolbar=0,location=0,directories=0,status=0, menubar=0,scrollbars=yes,resizable=0,copyhistory=0,width=' + width + ',height=' + height);

}
<!----------//Pop Up---------->


<!-- Fade nas fotos
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){ 
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout
	("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
   }
}
 //-->
 
<!-- 

function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}

//-->


function insertFlash(movie, width, height, transparent, flashvars) {
    document.write('<object type="application/x-shockwave-flash" data="flash/' + movie + '" width=' + width + '" height="' + height + '">');
    document.write('<param name="allowscriptaccess" value="always" />');
	document.write('<param name="movie" value="flash/' + movie + '" />');
    document.write('<param name="quality" value="high" />');
if (transparent) {
	document.write('<param name="wmode" value="transparent" />');
}
if (flashvars) {
    document.write('<param name="FlashVars" value="arquivo=/flash/' + flashvars + '" />');
}
    document.write('</object>');
}

