function United_S() {

	this.showInfo = function(obj) {
		
		jQuery.noConflict();
		
		if ($(obj.getAttribute("id")).className!="onerror") {			
			$("info_"+obj.getAttribute("id")).innerHTML = obj.getAttribute("title");
		}	
	}
	
	this.hideInfo = function(obj) {
		
		jQuery.noConflict();
		
		if ($(obj.getAttribute("id")).className!="onerror") {			
			$("info_"+obj.getAttribute("id")).innerHTML = "&nbsp;&nbsp;&nbsp;";
		}	
	}
	
	this.loadCidades = function(objSource,objTarget) {		
		
		jQuery.noConflict();
		parans = "";
		uf = objSource.options[objSource.selectedIndex].value;		
		if (uf!="") {
			$(objTarget).options[0].text = "Carregando...";
			$(objTarget).disabled = true;			
			Ajax.addParameter("page","cidades");
			Ajax.addParameter("uf",uf);
			Ajax.addParameter("objTgt",objTarget);			
			Ajax.Request({
				url:"ajaxRequest.php",
				pack:"ajax"		
			});				
		}	
	}
	
	this.lockForm = function(obj,wForm) {
	
		obj.value = "Enviando...";
		obj.disabled = true;		
	
	}
	this.unLockForm = function(obj,valor) {
	
		$(obj).value = valor;
		$(obj).disabled = false;		
	
	}
	this.changeButton = function(obj,e) {
		
		obj.style.background = (e.type=="mouseover") ? "url('/imgs/bg_link_fale_conosco_hover.jpg') repeat-x #ccc":" url('/imgs/bg_link_fale_conosco.jpg') repeat-x #ccc"  
	
	}
	this.none = function(obj,obj_antes) {
		
		if(obj!="")
		$(obj).style.display="none";
		if(obj_antes!="")
		$(obj_antes).style.display="block";
	
	}
	var size = 13;	
	this.sizeFont = function(obj,sinal,blog) {
		
		if ((sinal == "+") && (size < 16)){
			size += 1;	
		}
		else if ((sinal == "-") && (size > 12)){
			size -= 1;		
		}
		if(blog==0)
		$(obj).style.fontSize = size+"px";
		else if(blog==1){
			for(var i=0;i<$(obj).getElementsByTagName("p").length;i++) {
				
				$(obj).getElementsByTagName("p")[i].style.fontSize = size+"px";
			}
		}
		
	}
	
	this.submitPrepareUrl = function(e,url,texto,pag) {
		
		if(e.keyCode==13) 
		this.prepareUrl(url,texto,pag);
	}
	this.prepareUrl = function(url,texto,pag) {
		
		if($("#"+texto).val().length>=2) 
		window.top.location = ""+url +'?pesquisa='+$("#"+texto).val()+'&pag='+pag+"";
		else alert('Digite no minimo 2 caracteres para a pesquisa seja efetuada corretamente!');
	}
	var iterat = 1;
	var player_timeout = "";
	var time_play = 8000;
	
	this.passBanner = function(div,limit) {	
		
		clearTimeout(player_timeout);
		document.getElementById(div+iterat).style.display = "none";
		iterat++;
		if (iterat>limit) {
			iterat = 1;
		}
		document.getElementById(div+iterat).style.display = "block";
		
		player_timeout = setTimeout("US.passBanner('"+div+"',"+limit+")",time_play);
	}
	this.showHide = function(obj) {
		
		jQuery("#"+obj).slideToggle("fast");
				
	}
}

var US = new United_S();