// Valida Pesquisa/DEFAULT
//function valida(){
		//validar nome
//		d = document.pesquisa;
//		if (d.pesquisa.value == ""){
//			alert("Digite um nome no campo PESQUISA para concluir a sua busca.");
//			d.pesquisa.focus();
//			d.pesquisa.style.backgroundColor = "#FF972F";
//		return false;
//		}
//		else {
//		d.pesquisa.style.backgroundColor = "transparent";
//		}
//		return true;
//	}
//---------------------------------------------------------------------------------------------

function corrigePNG() // Corrige a exibição de PNGs transparentes no IE 5.5 & 6.
{//alert(document.all)
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
		 var imgSRC = img.src
		 var imgAltura = img.height
		 var imgLargura = img.width
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
			img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" +imgSRC + "\', sizingMethod='scale')";
			//prompt(img.style.filter,img.style.filter)
			img.src="images/1x1pixel.gif";//imagem GIF transparente que irá substituir o PNG original
			img.height=imgAltura
			img.width=imgLargura

         }
      }
   
//document.getElementById("fundEsq").progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://jh/viverde/images/backTe.png', sizingMethod='scale')
   }    
}
window.attachEvent("onload", corrigePNG);


//---------------------------------------------------------------------------------------------


//Valida Contato
	function validaContato(){
		//validar nome
		d = document.contato;
		if (d.nome.value == ""){
			alert("O campo NOME deve ser preenchido!");
			d.nome.focus();
			d.nome.style.backgroundColor = "#FFCC00";
			return false;
		}
		else {
		d.nome.style.backgroundColor = "#E2E2E2";
		}
		//validar email
		if (d.email.value == ""){
			alert("O campo E-MAIL deve ser preenchido!");
			d.email.focus();
			d.email.style.backgroundColor = "#FFCC00";
			return false;
		}
		//validar email(verificao de endereco eletronico)
		parte1 = d.email.value.indexOf("@");
		parte2 = d.email.value.indexOf(".");
		parte3 = d.email.value.length;
		if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
			alert("O campo E-MAIL deve ser conter um endereco eletronico!");
			d.email.focus();
			d.email.style.backgroundColor = "#FFCC00";
			return false;
		}
		else {
		d.email.style.backgroundColor = "#E2E2E2";
		}
		//validar telefone
		if (d.telefone.value == ""){
			alert("O campo TELEFONE deve ser preenchido!");
			d.telefone.focus();
			d.telefone.style.backgroundColor = "#FFCC00";
			return false;
		}
		else {
		d.telefone.style.backgroundColor = "#E2E2E2";
		}
		//validar mensagem
		if (d.mensagem.value == ""){
		alert("O campo MENSAGEM deve ser preenchido!");
		d.mensagem.focus();
		d.mensagem.style.backgroundColor = "#FFCC00";
		return false;
		}
		else {
		d.mensagem.style.backgroundColor = "#E2E2E2";
		}
		return true;
	}
//---------------------------------------------------------------------------------------------

// Função IMPRIMIR
function DoPrinting(){
if (!window.print){
alert("Use o Netscape  ou Internet Explorer \n nas versões 4.0 ou superior!")
return
}
window.print()
}

//---------------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------------

// Função ALPHA nos botoes
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);
}
}
if(document.images) {
var offimg = new Array()
offimg["cool"] = new Image(120,50)
offimg["cool"].src = "[INSERT]"
function imageOn(imgName) {
if (document.images) {
document.images[imgName].src = onimg[imgName].src
}
}
function imageOff(imgName) {
if (document.images) {
document.images[imgName].src = offimg[imgName].src
}
}
function setMsg(msg) {
window.status = msg
return true
}
function playIt() {
}
}