		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: #000000; font-size: 10px"><nobr><b>' + hoje() + '</b></nobr></div>';
        }
	}

	function calckSedex(cepOrigem, cepDestino, peso, urlresposta){
		var p = "1";
		var origem = "04012040";
		var destino = "";
		var resposta = "";
		if ( peso != null && peso != "" ){
			p = peso;
		}
		if ( cepOrigem != null && cepOrigem != "" ){
			origem = cepOrigem;
		}
		if ( cepDestino == null || cepDestino == "" ){
			alert("Digite o CEP para entrega!");
			return;
		} else destino = cepDestino;
		
		if ( urlresposta == null || urlresposta == "" ){
			alert("URL para resposta não existe!");
			return;
		} else resposta = urlresposta;
		post("http://www.correios.com.br/encomendas/precos/calculo.cfm?cepOrigem="+origem+"&cepDestino="+destino+"&peso="+p+"&resposta="+resposta);

	}

	function checkOut(idi){
		setValue("id", idi);
		setValue("qtde", 1);
		document.getElementById("ecommerce").submit();
	}

	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 doRestrita(){
		var obj_form = document.getElementById("formExtraLogin");
		obj_form.action = "/loginrestrito";
		obj_form.submit();	
	}
	
	function doLogin(email){
		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.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 doInitLogin(){
		setValue("windowsizevalue", window.screen.width);
		return true;
	}
	
	function doLogin(){
		var obj_form = document.getElementById("formExtraLogin");
		if ( getValue("user") != ""
			&& getValue("pass") != "")
			obj_form.submit();
		else
			alert("Campo usuário ou senha não informado");
	}

	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 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;		