		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 on_load() {
		atualizaData();
	}
	
	function atualizaData() {
        c = document.getElementById("hoje");
        if (c != null) {
                c.innerHTML = '<div style="font-family:verdana; color: #5F5E5E; font-size: 10px">' + hoje() + '</div>';
        }
	}

	function buildEnquete(x, numero){
	   var width = 520;
	   var height = 450;
	   
	   var left = 99;
	   var top = 99;   
	
	   var url = "/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 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();
	}
	
	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 go(url){
		window.location.href = url;
	}	
	
	function doInitLogin(){
		setValue("windowsizevalue", window.screen.width);
		return true;
	}

	function doLogin(){
		var obj_form = document.getElementById("formExtraLogin");
		setValue("windowsizevalue", window.screen.width);
		if ( getValue("user") != ""
			&& getValue("pass") != "")
			obj_form.submit();
		else
			alert("Campo usuário ou senha não informado");
	}


	function hoje() {
	
	var day="";
	var month="";
	var myweekday="";
	var year="";
	newdate = new Date();
	mydate = new Date();
	dston =  new Date('April 4, 1999 2:59:59');
	dstoff = new Date('october 31, 1999 2:59:59');
	var myzone = newdate.getTimezoneOffset();
	newtime=newdate.getTime();
	
	var zone = 6;  // references your time zone
	
	if (newdate > dston && newdate < dstoff ) {
	zonea = zone - 1 ;
	dst = "  Pacific Daylight Savings Time";
	}
	else {
	zonea = zone ; dst = " Horï¿½rio de Brasï¿½lia - Brasil";
	}
	var newzone = (zonea*30*30*1000);
	newtimea = newtime+(myzone*30*1000)-newzone;
	mydate.setTime(newtimea);
	myday = mydate.getDay();
	mymonth = mydate.getMonth();
	myweekday= mydate.getDate();
	myyear= mydate.getYear();
	year = myyear;
	
	if (year < 2000)    // Y2K Fix, Isaac Powell
	year = year + 1900; // http://onyx.idbsu.edu/~ipowell
	myhours = mydate.getHours();
	if (myhours >= 12) {
	myhours = (myhours == 12) ? 12 : myhours - 12; mm = " ";
	}
	else {
	myhours = (myhours == 0) ? 12 : myhours; mm = " ";
	}
	myminutes = mydate.getMinutes();
	if (myminutes < 10){
	mytime = ":0" + myminutes;
	}
	else {
	mytime = ":" + myminutes;
	};
	arday = new Array("Domingo"," Segunda-feira","Ter&ccedil;a-feira","Quarta-feira","Quinta-feira","Sexta-feira","S&aacute;bado")
	armonth = new Array("janeiro ","fevereiro","mar&ccedil;o ","abril ","maio","junho ","julho","agosto ","setembro ", "outubro ","novembro ","dezembro ")

	var cHoje = ( arday[myday] +", " + myweekday + " de " + armonth[mymonth] + " de " + year);
	
	return cHoje;
	}

		
// ------------------------------- marquee ---------------------------------------


		var pausetime = 4000;
		var msginc = 30;
		var interval = 5;
		var ppat = new Array();
		var ipat = new Array();
		var wraptime = false;

		var direction = 'up';
		var dpat = new Array('left','left','left','left');

		var transition = 'contig';
		var tpat = new Array('cover','uncover','contig');

		var bgcolor = 'pattern';
		var cpat = new Array('');

		var mhalign = 'center';	
		var mvalign = 'middle';	
		var csspat = new Array();

		var dispv = 5;		
		var disph = 5;		

		var nsafe = false;	

		mdump = true;
		dumptest = false;		