var req;
var varsecao;
var carregandoBranco = '<span id="branco"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="53"><param name="movie" value="swf/gisele_carregando.swf"><param name="quality" value="high"><param name="flashVars" value="cor=branco&txt_carregando='+textoEstrela+'"><param name="wmode" value="transparent"><embed src="swf/gisele_carregando.swf" width="300" height="53" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashVars="cor=branco&txt_carregando='+textoEstrela+'" wmode="transparent"></embed></object></span>' ;
var carregandoPreto = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="53"><param name="movie" value="swf/gisele_carregando.swf"><param name="quality" value="high"><param name="flashVars" value="cor=preto&txt_carregando='+textoEstrela+'"><param name="wmode" value="transparent"><embed src="swf/gisele_carregando.swf" width="300" height="53" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashVars="cor=preto&txt_carregando='+textoEstrela+'" wmode="transparent"></embed></object>' ;
function construirArray(qtdElementos){
	this.length = qtdElementos
}
var arrayMes = new construirArray(12);
arrayMes[1] = strJaneiro;
arrayMes[2] = strFevereiro;
arrayMes[3] = strMarco;		
arrayMes[4] = strAbril;
arrayMes[5] = strMaio;
arrayMes[6] = strJunho;
arrayMes[7] = strJulho;
arrayMes[8] = strAgosto;
arrayMes[9] = strSetembro;
arrayMes[10] = strOutubro;
arrayMes[11] = strNovembro;
arrayMes[12] = strDezembro;

function getMesExtenso(mes){
	return this.arrayMes[mes];
}

function loadXMLDoc(url,registro,secao){
	req = null;
	varsecao = secao;
	var noCache = Math.floor(Math.random()*1234);
	// Procura por um objeto nativo (Mozilla/Safari)
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.onreadystatechange = processReqChange;
		req.open("GET", url+'?idRegistro='+registro+'&noCache='+noCache, true);
		req.send(null);
	// Procura por uma versao ActiveX (IE)
	} else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
		if (req) {
			req.onreadystatechange = processReqChange;
			req.open("GET", url+'?idRegistro='+registro+'&noCache='+noCache, true);
			req.send();
		}
	}
}
function processReqChange(){
	// apenas quando o estado for "completado"
	if (req.readyState == 4) {
		// apenas se o servidor retornar "OK"
		if (req.status == 200) {
			if(varsecao != ''){
				var span = document.getElementById(varsecao);
				span.innerHTML = req.responseText;
			}
		} else {
			
		}
	}
}

function mostraTermoUso(registro){
	loadXMLDoc('gisele_popup_rodape.asp',registro,'popUp');
	//document.body.scrollTop = 0;
	document.getElementById('popUp').style.top = (getScrOfY() + 90) + 'px';
}

function mostraTermoUsoHome(registro){
	loadXMLDoc('gisele_popup_rodape_home.asp',registro,'popUp');
	document.body.scrollTop = 0;

}

