<!--

//////////////////////// PRELOAD DE IMAGENS /////////////////////////
image1 = new Image();
image1.src = "../_img/layout_fundo_01_hover.gif";
image2 = new Image();
image2.src = "../_img/layout_menu_bullet_01_hover.gif";
image3 = new Image();
image3.src = "../_img/layout_banner_botao_01_hover.gif";
image4 = new Image();
image4.src = "../_img/layout_banner_botao_02_hover.gif";
image5 = new Image();
image5.src = "../_img/layout_banner_botao_03_hover.gif";
/////////////////////////////////////////////////////////////////////

////////////////////////////// AJAX /////////////////////////////////
function openAjax()
{ 
	var Ajax; 
	try
	{
		Ajax = new XMLHttpRequest(); // XMLHttpRequest para browsers mais populares, como: Firefox, Safari, dentre outros. 
	}
	catch(ee) 
	{ 
		try
		{
			Ajax = new ActiveXObject("Msxml2.XMLHTTP"); // Para o IE da MS 
		}
		catch(e)
		{ 
			try
			{
				Ajax = new ActiveXObject("Microsoft.XMLHTTP"); // Para o IE da MS 
			}
			catch(e)
			{
				Ajax = false; 
			} 
		} 
	} 
	return Ajax; 
} 

function carregaAjax(id, pagina, metodo)
{ 
	if(document.getElementById)  // Para os browsers complacentes com o DOM W3C.
	{ 
		var exibeResultado = document.getElementById(id); // div que exibirá o resultado. 
		var Ajax = openAjax(); // Inicia o Ajax. 
		
		Ajax.open(metodo, pagina, true); // fazendo a requisição 
		
		Ajax.onreadystatechange = function() 
		{ 
			if(Ajax.readyState == 1) // Quando estiver carregando, exibe: carregando...
			{ 
				exibeResultado.innerHTML = "<div style='width:80px; height:18px; background-color:#CC3300; padding-left:2px; padding-top:1px;'><font color='#FFFFFF'>Cadastrando...</font></div>"; 
			} 
			
			if(Ajax.readyState == 4) // Quando estiver tudo pronto. 
			{
				if(Ajax.status == 200)
				{ 
					var resultado = Ajax.responseText; // Coloca o retornado pelo Ajax nessa variável 
					resultado = resultado.replace(/\+/g," "); // Resolve o problema dos acentos (saiba mais aqui: http://www.plugsites.net/leandro/?p=4) 
					resultado = unescape(resultado); // Resolve o problema dos acentos 
					exibeResultado.innerHTML = resultado; 
				}
				else
				{ 
					exibeResultado.innerHTML = "<div align='center'><strong>Erro: Problemas com a conexão.</strong></div>"; 
				} 
			} 
		} 
	Ajax.send(null); // submete 
	} 
} 
/////////////////////////////////////////////////////////////////////


// MENUS DO LAYOUT //////////////////////////////////////////////////
	function MENU_OVER( td_id, img_id )
	{
		var td_mudar = document.getElementById(td_id); 
		td_mudar.style.background = 'url(../_img/layout_fundo_01_hover.gif)';
		td_mudar.style.cursor = 'pointer';
		
		var img_mudar = document.getElementById(img_id); 
		img_mudar.src = '../_img/layout_menu_bullet_01_hover.gif';
	}
	
	function MENU_OUT( td_id, img_id )
	{
		var td_mudar = document.getElementById(td_id); 
		td_mudar.style.background = 'url()';
		
		var img_mudar = document.getElementById(img_id); 
		img_mudar.src = '../_img/layout_menu_bullet_01.gif';
	}
	
	function BANNER_OVER( td_id, numero )
	{
		var td_mudar = document.getElementById(td_id); 
		td_mudar.style.background = 'url(../_img/layout_banner_botao_'+numero+'_hover.gif)';
		td_mudar.style.cursor = 'pointer';
	}
	
	function BANNER_OUT( td_id, numero )
	{
		var td_mudar = document.getElementById(td_id); 
		td_mudar.style.background = 'url(../_img/layout_banner_botao_'+numero+'.gif)';
	}
/////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////
// FUNÇÃO PARA LIMPAR O INPUT              //
function input_limpar( elm )
{
	if (!elm.base) 
		elm.base = elm.value
		
	if (elm.value == elm.base) 
		elm.value = "";
	else if (elm.value == "") 
		elm.value = elm.base;
}
/////////////////////////////////////////////

-->