/* EXIBE E OCULTA DIVS */
function MostraOculta(div){
	for(i= 1 ;i <10;i++){
		if(i==div){
			$('#'+i).toggle('normal');
		} //IF
		else{
			$('#'+i).hide('slow');			  
		} //ELSE
	} //FOR
} //FECHA
/* FIM - EXIBE E OCULTA DIVS */

function url_encode(str) {
	var hex_chars = "0123456789ABCDEF";
	var noEncode = /^([a-zA-Z0-9\_\-\.])$/;
	var n, strCode, hex1, hex2, strEncode = "";

	for(n = 0; n < str.length; n++) {
		if (noEncode.test(str.charAt(n))) {
			strEncode += str.charAt(n);
		} else {
			strCode = str.charCodeAt(n);
			hex1 = hex_chars.charAt(Math.floor(strCode / 16));
			hex2 = hex_chars.charAt(strCode % 16);
			strCode = hex1 + hex2;
			strEncode += (strCode.length == 2 ? "%" + strCode : "-");
		}
	}
return strEncode;
}


function PesquisaOG(div) {
	if (div == 1) {
		document.getElementById('PesquisaOGA').style.display="block";
		document.getElementById('PesquisaOGB').style.display="none";
		document.getElementById('PesquisaOGC').style.display="none";
	}
	if (div == 2) {
		document.getElementById('PesquisaOGB').style.display="block";
		document.getElementById('PesquisaOGA').style.display="none";
		document.getElementById('PesquisaOGC').style.display="none";
	}
	if (div == 3) {
		document.getElementById('PesquisaOGC').style.display="block";
		document.getElementById('PesquisaOGA').style.display="none";
		document.getElementById('PesquisaOGB').style.display="none";
	}
}

// FUNÇÕES POPUP
function AbrePopUp(pURL, pLarg, pAlt){
	pEsq = ((screen.width - pLarg) / 2);
	pTop = ((screen.height - pAlt) / 2);
   	var alerta = window.open(pURL,"UNIARARAS","width="+pLarg+",height="+pAlt+",toolbar=no,location=no,scrollbars=no,menubar=no,status=no,resizable=no,fullscreen=no");
   	if(!alerta) {
      alert('Pop-up bloqueado!\n\nVerifique se você possui em sua máquina algum bloqueador de pop-up.\n\n>> Ferramentas\n>> Bloqueador de Pop-up\n>> Selecione a opção DESATIVAR BLOQUEADOR DE POP-UP \n>> Tente novamente.');
   }		
	//window.open(pURL, "toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width="+pLarg+",height="+pAlt+",left="+pEsq+",top="+pTop);
}

function vopenw() {	
	tbar = 'location=no,status=yes,resizable=yes,scrollbars=yes,width=560,height=535';	
	sw   = window.open('https://www.certisign.com.br/seal/splashcerti.htm','CRSN_Splash',tbar);	
	sw.focus();
}

function popUp(URL, FILE) {
	day = new Date();
	id = day.getTime();
	URLFINAL = URL + "?url=" + FILE;
	eval("page" + id + " = window.open(URLFINAL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=357,height=500,left = 327.5,top = 284.5');");
}
// FIM FUNÇÕES POPUP




