function Busca() {
	
	this.eventClick = function() {
		var form1 = document.getElementById("frmSearch1");
		var form2 = document.getElementById("frmSearch2");
		
		if (form1 != null)
			form1.onsubmit = function() {
				var q = form1.q1.value;
				
				if (validate(form1,q)) {
					return true;
				} else {
					return false;
				}
			}
		
		if (form2 != null)
			form2.onsubmit = function() {
				var q = form2.q.value;
				
				if (validate(form2,q)) {
					return true;
				} else {
					return false;
				}
			}
	}
	
	function validate(form,campo) {
		if (campo != null && campo != "")
			return true;
		else {
			alert("Preencha o campo de busca");
			return false;
		}
	}
	
	this.eventMouseOver = function() {
		var arrayDivs = document.getElementsByTagName("DIV");
		
		for (var i=0; i<arrayDivs.length; i++)
			if (arrayDivs[i].className == "dicas-busca") {
				var questionShow = arrayDivs[i];
				
				questionShow.style.cursor = "pointer";
				
				questionShow.onmouseover = function(e) {
					for (var j=0; j<this.childNodes.length; j++)
						if (this.childNodes[j].tagName == "SPAN")
								this.childNodes[j].style.display = "block";
				}
				
				questionShow.onmouseout = function(e) {
					for (var j=0; j<this.childNodes.length; j++)
						if (this.childNodes[j].tagName == "SPAN")
							this.childNodes[j].style.display = "none";
				}
			}
	}
	
	this.clickOtherLinks = function(elem) {
		var elemParent = elem.parentNode;
		var p = elemParent.getElementsByTagName("P");
		
		if (p.length == 1) {
			if (p[0].style.display == "none") {
				p[0].style.display = "block";
				elem.className = "expans aberto";
			} else {
				p[0].style.display = "none";
				elem.className = "expans fechado";
			}
		}
	}
	
	this.hndevdn = function(id, booleanValue) {
		try {
			document.getElementById("atk").src = "/busca/jsp/check.jspx?i="+ id +"&a="+ booleanValue;
		} catch(e) {}
	}
	
	this.changeComboState = function(state) {
		document.getElementById("t1").disabled = !state;
	}
	
}

var busca = new Busca;

google_ad_client = "pub-2809266142650922";
/* Resultado de Busca, 160x600 */
google_ad_slot = "3112990027";
google_ad_width = 160;
google_ad_height = 600;
