<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized 
	if (init==true) with (navigator) {
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
		}
	}
	else {
		if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
}

function focaliza(campo){
	campo.style.backgroundColor= "#ffffdb";
	}
function desfocaliza(campo){
	campo.style.backgroundColor= "";
}

function fwLoadMenus() {
	if (window.fw_menu_0) 
	return;
	window.fw_menu_0 = new Menu("root",116,18,"Verdana, Arial, Helvetica, sans-serif",11,"#000066","#ffffff","#ffffff","#0099ff");
	fw_menu_0.addMenuItem("Apresentação","location='proc_geral.php?tipo=outros&id=75'");
	fw_menu_0.addMenuItem("Cursos","location='proc_geral.php?tipo=outros&id=64'");
	fw_menu_0.addMenuItem("Contato","location='proc_geral.php?tipo=outros&id=63php'");
	fw_menu_0.fontWeight="bold";
	fw_menu_0.hideOnMouseOut=true;
	window.fw_menu_1 = new Menu("root",116,18,"Verdana, Arial, Helvetica, sans-serif",11,"#000066","#ffffff","#ffffff","#0099ff");
	fw_menu_1.addMenuItem("Apresentação","location='proc_geral.php?tipo=outros&id=89'");
	fw_menu_1.addMenuItem("Cursos","location='proc_geral.php?tipo=outros&id=79'");
	fw_menu_1.addMenuItem("Contato","location='index.php'");
	fw_menu_1.fontWeight="bold";
	fw_menu_1.hideOnMouseOut=true;
	window.fw_menu_2 = new Menu("root",85,18,"Verdana, Arial, Helvetica, sans-serif",11,"#000066","#ffffff","#ffffff","#0099ff");
	fw_menu_2.addMenuItem("Inglês","location='proc_geral.php?tipo=outros&id=91'");
	fw_menu_2.addMenuItem("Espanhol","location='proc_geral.php?tipo=outros&id=81'");
	fw_menu_2.fontWeight="bold";
	fw_menu_2.hideOnMouseOut=true;
	window.fw_menu_3 = new Menu("root",126,18,"Verdana, Arial, Helvetica, sans-serif",11,"#000066","#ffffff","#ffffff","#0099ff");
	fw_menu_3.addMenuItem("Núcleo Jurídico","location='index.php'");
	fw_menu_3.addMenuItem("Clínicas Odonto","location='proc_geral.php?tipo=noticia&id=28'");
	fw_menu_3.addMenuItem("Escrit. Contábil","location='index.php'");
	fw_menu_3.addMenuItem("Unijunior","location='index.php'");
	fw_menu_3.addMenuItem("Estágio","location='proc_geral.php?tipo=outros&id=98'");
	fw_menu_3.fontWeight="bold";
	fw_menu_3.hideOnMouseOut=true;
	fw_menu_3.writeMenus();
} // fwLoadMenus()

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_preloadimagens() { //v3.0
	var d = document;
	if(d.imagens){
		if(!d.MM_p) d.MM_p = new Array();
	    var i, j = d.MM_p.length;
		var a = MM_preloadimagens.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.0
	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 && document.getElementById) {
		x = document.getElementById(n);
		return x;
	}
}

function MM_swapImage() { //v3.0
	var i, j = 0;
	var 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];
		}
	}
}

function MM_displayStatusMsg(msgStr) { //v1.0
	status=msgStr;
	document.MM_returnValue = true;
}
function comprimenta() {
	today = new Date()
	if(today.getMinutes() < 10) { 
		pad = "0"
	}
	else { 
		pad = "";
		document.write;
	}
	if((today.getHours() >= 6) && (today.getHours() <= 9)) { 
		document.write("<font class= 'cpr'>Bom dia, </font>") 
	}
	if((today.getHours() >=10) && (today.getHours() <=11)) {
    	document.write("<font class= 'cpr'>Bom dia,</font> ")
	}
	if((today.getHours() >=12) && (today.getHours() <=17)){
		document.write("<font class= 'cpr'>Boa tarde,</font> ") 
	} 
	if((today.getHours() >=18) && (today.getHours() <=23)){
		document.write("<font class= 'cpr'>Boa noite,</font> ") 
	}
	if((today.getHours() >=0) && (today.getHours() <=3)){
		document.write("<font class= 'cpr'>Boa noite,</font> ") 
	}
	if((today.getHours() >=4) && (today.getHours() <=5)){
		document.write("<font class= 'cpr'>Boa noite,</font> ")
	}
}
function voto0() {
	var libera = new String;
	for (x = 0; x < enquete0.resp.length; x++) {
		if (enquete0.resp[x].checked) {	
			libera = 'ok';
			naovotou = chk_voto0();
			break;
		}
		else {
			var naovotou = new Number;
		}
	}
	if ((libera == 'ok') && (naovotou == 1)) {
		enquete0.v0.value = 'ok';
		enquete0.submit();
	}
	else {
	    if (naovotou > 1) {
                alert('Você já votou!!! Obrigado por participar!!!');
		}
        else{
			alert('Você precisa escolher uma alternativa antes de votar!');
		}
	}
}
function voto1() {
	var libera = new String;
	for (x = 0; x < enquete1.resp.length; x++) {
		if (enquete1.resp[x].checked) {	
			libera = 'ok';
			naovotou = chk_voto1();
			break;
		}
		else {
			var naovotou = new Number;
		}
	}
	if ((libera == 'ok') && (naovotou == 1)) {
		enquete1.v1.value = 'ok';
		enquete1.submit();
	}
	else {
	    if (naovotou > 1) {
                alert('Você já votou!!! Obrigado por participar!!!');
		}
        else{
			alert('Você precisa escolher uma alternativa antes de votar!');
		}
	}
}

/*
function combo() {
	var vet = new Array;
	vet[0] = 'index.php';
	vet[1] = 'proc_geral.php';
	for (x = 0; x < f_index.cmbcursos.length; x++) {
		if (f_index.cmbcursos.options[x].selected == true) { location.href('http://www.univag.com.br/site/'+vet[x]); }
	}
}
*/

function combo() {
	f_index.envcombo.value = f_index.cmbcursos.value;
	f_index.submit();
}

function chg(a) {
	// informe o tipo de alteracao para a selecao: negrito, italico ou hiperlink
	txt = document.selection.createRange();
	switch(a) {
		case 'negrito': txt.text = '<b>'+txt.text+'</b>'; break;
		case 'italico': txt.text = '<i>'+txt.text+'</i>'; break;
		case 'hiperlink': txt.text = '<a href="insira aqui o link">'+txt.text+'</a>'; break;
	}
}
function chk_boletim() {
    if ((boletim.dianasc.value.length > 1) && (boletim.mesnasc.value.length > 1) && (boletim.anonasc.value.length > 2) && (boletim.matricula.value.length == 10)) {
        return true;
    }
    else {
        alert('Verifique a data de nascimento e a matrícula');
        return false;
    }
}
	
function comp_boletim() {
    if (boletim.dianasc.value.length == 2) {
        boletim.mesnasc.focus();
    }
    if ((boletim.dianasc.value.length == 2) && (boletim.mesnasc.value.length == 2)) {
        boletim.anonasc.focus();
    }
    if ((boletim.dianasc.value.length == 2) && (boletim.mesnasc.value.length == 2) && (boletim.anonasc.value.length == 4)) {
        boletim.matricula.focus();
    }
}

// bloqueador de multiplos votos
function setCookie(name, value, expires, path, domain, secure) {
// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function getCookie(name) {
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function chk_voto0() {
	enq0 = getCookie('enq0');
	if (enq0 == 1) {
		enq0++;
	}
	else {
		setCookie('enq0', 1);
		enq0 = getCookie('enq0');
	}
	return enq0;
}

function chk_voto1() {
	enq1 = getCookie('enq1');
	if (enq1 == 1) {
		enq1++;
	}
	else {
		setCookie('enq1', 1);
		enq1 = getCookie('enq1');
	}
	return enq1;
}




//-->