		fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
		_menuCloseDelay=500;
		_menuOpenDelay=150;
		_subOffsetTop=2;
		_subOffsetLeft=-2;

// ---------------------------------------------- MISC --------------------------------------------- //
	function btOn(obj, name){
		obj.src = "/img/"+name+"_on.jpg";
	}
	
	function btOff(obj, name){
		obj.src = "/img/"+name+"_off.jpg";
	}

	function btOn_gif(obj, name){
		obj.src = "/img/"+name+"_on.gif";
	}
	
	function btOff_gif(obj, name){
		obj.src = "/img/"+name+"_off.gif";
	}

	function on_load() {
		atualizaData();
	}
	
	function atualizaData() {
        c = document.getElementById("hoje");
        if (c != null) {
                c.innerHTML = '<div style="font-family:verdana; color: #000000; font-size: 10px"><nobr><b></b></nobr></div>';
        }
	}

	function buildEnquete(x, numero){
	   var width = 520;
	   var height = 300;
	   
	   var left = 99;
	   var top = 99;   
	
	   var url = "/forms/enquete/resultadoenquete.jsp?result=" ;
	   var ok = false;
	   for ( var i = 1; i <= numero; i ++ ){ 
			if ( document.getElementById(x + i).checked ){ 
				url += document.getElementById(x + i).value;
	  			ok = true; 
				break;
			}
	   }
	
	   if ( !ok ){
			alert("Você tem que escolher uma opção");
			return ;
	   }
	
	   window.open(url, 'Enquete', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
	}

	function visualizaEnquete(idienquete){
	   var width = 520;
	   var height = 300;
	   
	   var left = 99;
	   var top = 99;   
	
	   var url = "/forms/enquete/resultadoenquete.jsp?result="+idienquete ;
	
	   window.open(url, 'Enquete', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
	}



	function openWindow(url){
	   var width = 569;
	   var height = 450;
	   
	   var left = 99;
	   var top = 55;   
	
	   window.open(url, 'Programas', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
	}
	
	function doEmail(){
		var f = document.getElementById("formExtraLogin");
		f.action = 'http://webmail.vetorweb.com.br/src/redirect.php';
		document.getElementById("login_username").value = document.getElementById("user").value;
		document.getElementById("secretkey").value = document.getElementById("pass").value;			
		f.submit();
	}

	var bt_click = false;
	function doLogin(email){
		if ( bt_click )
			return;
	
		var obj_form = document.getElementById("formExtraLogin");
		if ( email ){
			obj_form.action = "http://webmail.metodista.com.br/horde/imp/redirect.php";
			var e = getValue("user");
			if ( e != null && e != ""
				&& getValue("pass") != "" ){
				if ( e.indexOf("@metodista.com.br") == -1 )
					e = e + "@metodista.com.br";
				setValue("imapuser", e);
				//setValue("secretkey", getValue("pass"));
				obj_form.target = "blank";
				bt_click = true;
				obj_form.submit();	
			}else
				alert("Campo usuário ou senha não informado");
		}
	}

	var bt_click = false;
	function doInitLogin(){
		if ( bt_click )
			return false;
		setValue("windowsizevalue", window.screen.width);
		if ( getValue("user") != ""
			&& getValue("pass") != ""){
			bt_click = true;
			return true;
		}
		alert("Campo usuário ou senha não informado");
		
		return false;
	}

	function doLoginSQUIRREL(email){
		var obj_form = document.getElementById("formExtraLogin");
		if ( email ){
			obj_form.action = "http://mail.metodista.com.br/src/redirect.php";
			var e = getValue("user");
			if ( e != null && e != ""
				&& getValue("pass") != "" ){
				if ( e.indexOf("@metodista.com.br") == -1 )
					e = e + "@metodista.com.br";
				setValue("login_username", e);
				setValue("secretkey", getValue("pass"));
				obj_form.submit();	
			}else
				alert("Campo usuário ou senha não informado");
		}else{
			if ( getValue("user") != ""
				&& getValue("pass") != "")
				obj_form.submit();
			else
				alert("Campo usuário ou senha não informado");
		}
	}	
	
	

	
	function go(url){
		window.location.href = url;
	}	