//no second mouse

//function NSclick(e) {
//	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { 
//		if (e.which == 3) {
//			return false;
//		}
//	}
//	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) { 
  //  		if (e.button == 2 || e.button == 3) {
    //  			e.preventDefault();
	//		return false;
  	//	}
//	}
//}

//if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { 
//	document.onmousedown=NSclick;
//	document.captureEvents(Event.MOUSEDOWN);
//}
//if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=5) { 
//	document.onmouseup=NSclick;
//}
//if (navigator.appName=="Microsoft Internet Explorer") { 
//	document.oncontextmenu = new Function("return false;")
//}

///////////////////////////////////////////////////////////////
//desabilita botão do meio
///////////////////////////////////////////////////////////////

function click() {
  if (event.button==1) {
                       }
  else {
     if (event.button==2) {
	                      }
	 else {
	 	alert('Função desabilitada!');
	      }
       }
                 }
document.onmousedown=click

///////////////////////////////////////////////////////////////
//desabilita clicar e arrastar
///////////////////////////////////////////////////////////////

function selecao()
{
return(false);
}
function trataTecla() {
if((event.keyCode == 121)&&(event.shiftKey));
}
document.onselectstart=selecao;
document.ondragstart=selecao;


///////////////////////////////////////////////////////////////
//abrir janela
///////////////////////////////////////////////////////////////

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

////////////////////////////////////////////////////////////
//status fixo
////////////////////////////////////////////////////////////

var hellotext="diassantos programações & designs"
var thetext="diassantos programações & designs"
var started=false
var step=0
var times=1
 function welcometext()
    {
      times--
      if (times==0)
      {
        if (started==false)
        {
          started = true;
          window.status = hellotext;
          setTimeout("anim()",1);
        }
        thetext = hellotext;
      }
    }
 function showstatustext(txt)
    {
      thetext = txt;
      setTimeout("welcometext()",4000)
      times++
    }
 function anim()
    {
     step++
      if (step==2) {step=1}
      if (step==1) {window.status='...::'+thetext+'::...'}
      if (step==2) {window.status='...::'+thetext+'::...'}
      setTimeout("anim()",200);
    }
welcometext();

 
////////////////////////////////////////////////////////////
//validando formulario
////////////////////////////////////////////////////////////
 
 function MM_validateForm() {
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' e-mail inválido.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '• Campo -> '+nm+ ' \n'; }
  } if (errors) alert('Preenchimento obrigatório :\n'+errors);
  document.MM_returnValue = (errors == '');
}

///////////////////////////////////////////////////////
// Validar formulário Fale conosoco ///////////////////

function REG_Validar(fale)
{

  if (fale.TP_PESSOA.value == "PJ")
  {
      if (fale.QL_EMPRESA.value == "")
	  {
		  alert("Por Favor, preencha o Campo \"Empresa\".");
		  fale.QL_EMPRESA.focus();
		  return (false);
	  }
    return (false);
  }
  
  if (fale.NM_CONTATO.value == "")
  {
    alert("Por Favor, preencha o Campo \"Contato\".");
    fale.NM_CONTATO.focus();
    return (false);
  }
  
  if (fale.QL_EMAIL.value == "")
  {
    alert("Por Favor, preencha o Campo \"E-Mail\".");
    fale.QL_EMAIL.focus();
    return (false);
  }   
      
  if (fale.QL_MENSAGEM.value == "")
  {
    alert("Por Favor, escreva a sua Mensagem.");
    fale.QL_MENSAGEM.focus();
    return (false);
  }   
    
  return (true);
}


///////////////////////////////////////////////////////
// Mostrar e ocultar campos ///////////////////////////


    	function pessoaPJ() {
		  document.getElementById('pessoa').style.display = "block";	  					
		}
		
    	function pessoaPF() {
		  document.getElementById('pessoa').value = "";	  					
		  document.getElementById('pessoa').style.display = "none";	  					
		}
			
    	function orcamento() {
		  document.getElementById('pedido').style.display = "block";	  					
		}
		
    	function outro() {
		  document.getElementById('pedido').value = "";	  					
		  document.getElementById('pedido').style.display = "none";	  					
		}

    	function orcamento2() {
		  document.getElementById('pedido2').style.display = "block";	  					
		}
		
    	function outro2() {
		  document.getElementById('pedido2').value = "";	  					
		  document.getElementById('pedido2').style.display = "none";	  					
		}
