<!--
function verTamTela(){
	if(screen.width<700)
	{
		location.href = "mobile/index.asp";
	} else
		location.href = "index3.asp";
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
/*
randomico = somente na home

AplicarFundo = aplicar o fundo
AplicarTitulo = aplicar o titulo
RecuperaQueryString = recupera a querystring
AtribuirHiddenNumero = atribui o numero no hidden
ExecutaPagina = executa a pagina
*/


function randomico() 
{
	var rand_no = Math.random();
	rand_no = rand_no * 1;
	rand_no = Math.ceil(rand_no);
	document.getElementById("hdnRandom").value = rand_no;
}

function AplicarFundo(numero)
{
	var imgFundo;
	switch(numero)
	{		

/*		case "1": imgFundo = "img/bala.jpg";    break;
		case "2": imgFundo = "img/bandaid.jpg"; break;
		case "3": imgFundo = "img/flores.jpg"; 	break;
		case "4": imgFundo = "img/cassete.jpg";    break;*/
		case "1": imgFundo = "img/fundo_dez.jpg";    break;
	}
	//document.body.style.background = "background-image: url(" + imgFundo + ")";
	document.body.style.backgroundImage = "url(" + imgFundo + ")";
}

function AplicarHome(numero)
{
	var imgHome;
	switch(numero)
	{		
/*		case "1": imgHome = "_bala"; break;
		case "2": imgHome = "_bandaid"; break;
		case "3": imgHome = "_flores"; break;
		case "4": imgHome = "_cassete";    break;*/
		case "1": imgHome = "_dez"; break;
	}
	html = "";
	imgHover="_lilas";
	html += "<ul><li><a href='javascript:ExecutaPagina(\"quemsomos.html\");' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage(\"Image6\",\"\",\"img/quemsomos" + imgHover + ".png\",1)'><img src='img/quemsomos" + imgHome + ".png' name='Image6' width=510 height=70 border=0 id='Image6' /></a></li>";
	html += "<li><a href='javascript:ExecutaPagina(\"salsalario.html\");' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage(\"Image8\",\"\",\"img/salsalario" + imgHover + ".png\",1)'><img src='img/salsalario" + imgHome + ".png' name='Image8' width='510' height='70' border='0' id='Image8' /></a></li>";
	html += "<li><a href='javascript:ExecutaPagina(\"simplifique.html\");'><img src='img/simplifique_gde.png' alt='simplifique' name='simplifique' width='800' height='101' border='0' id='simplifique' /></a></li>";
	html += "<li><a href='javascript:ExecutaPagina(\"osmelhores.html\");' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage(\"Image7\",\"\",\"img/osmelhores" + imgHover + ".png\",1)'><img src='img/osmelhores" + imgHome + ".png' name='Image7' width='510' height='70' border='0' id='Image7' /></a></li>";
	html += "<li><a href='javascript:ExecutaPagina(\"contato.html\");' onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage(\"Image9\",\"\",\"img/contato" + imgHover + ".png\",1)'><img src='img/contato" + imgHome + ".png' name='Image9' width='510' height='70' border='0' id='Image9' /></a></li>";
	html += "</ul>";
	document.getElementById("menu").innerHTML = html;
}

function AplicarTitulo(numero, titulo)
{
	var imgTit = titulo;
	switch(numero)
	{
/*		case "1": imgHome = "_bala"; break;
		case "2": imgHome = "_bandaid"; break;
		case "3": imgHome = "_flores"; break;
		case "4": imgHome = "_cassete";    break;*/
		case "1": imgTit += "_dez"; break;
	}
	imgHover="_lilas";
	html="<a href=# onmouseout='MM_swapImgRestore()' onmouseover='MM_swapImage(\"imgTitulo\",\"\",\"img/" + titulo + imgHover + ".png\",1)'><img src='img/" + imgTit + ".png' border=0 name='imgTitulo' id='imgTitulo'  /></a>";
	document.getElementById("titulo").innerHTML = html;
}

function RecuperaQueryString(nomeParametro)
{
	var endereco = location.href;
	var partes = endereco.split("?");
	var retorno = "";
	if (partes.length == 2)
	{
		var partesParam = partes[1].split("&");
		for (var a=0; a < partesParam.length; a++)
		{
			var conteudo = partesParam[a].split("=");
			if (nomeParametro == conteudo[0])
			{
				retorno = conteudo[1];
				break;
			}
		}
	}
	return retorno;
}

function AtribuirHiddenNumero()
{
	document.getElementById("hdnRandom").value = RecuperaQueryString("numero");
}

function ExecutaPagina(pagina)
{
	var numero = document.getElementById("hdnRandom").value;
	location.href = pagina + "?numero=" + numero;
}

function LibCreateRequestObject()
{
	var request_o;
	if(navigator.appName == "Microsoft Internet Explorer")
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	else
		request_o = new XMLHttpRequest();
	return request_o;
}

function CarrPagina(Pagina)
{

	var httpPesquisar = LibCreateRequestObject();
	var strEnvio = Pagina;
	httpPesquisar.open('get', strEnvio);
	httpPesquisar.onreadystatechange = function HandlePesquisa()
	{
		if(httpPesquisar.readyState == 4)
		{
			document.getElementById("dixsalsalario").innerHTML = httpPesquisar.responseText;
		}
	}
	httpPesquisar.send(null);	
}

function OcultaDiv(div)
{
	var Div = document.getElementById(div);
	//alert(Div.id);
	if(Div.style.display == "")
	{
		Div.style.display = "none";
	} else {
		Div.style.display = "";
 	}	
}
