var timeID=null;
var timerRunning=false;
function  MostrarCamada(div,a,tipo)
		{
		/*if (tipo==1)
			div.style.visibility="visible";
		else
			div.style.visibility="hidden";*/
			
			if (tipo==1)
			{
				div.style.visibility="visible";
				a.style.background="red";
			}
			else
			{
				div.style.visibility="hidden";
				a.style.background="none";
			}
		}
		
function menuflash()
		{
		var fo = new FlashObject("menu.swf", "color", "778", "600", "6", "#FFFFFF");
		fo.addParam("menu","false");
		fo.addParam("quality","best");
		fo.addParam("salign","LT");
		fo.addParam("scale","noscale");
		fo.addParam("wmode", "transparent");
		fo.write("color_id");
		}
function stopclock()
		{
        if(timerRunning)
        	clearTimeout(timerID);
        timerRunning=false;
        }
function startclock()
		{
        stopclock ();
        showtime ();
        }
function showtime()
		{
        var meses = new Array(12);
        meses[0] = "Janeiro";
        meses[1] = "Fevereiro";
        meses[2] = "Março";
        meses[3] = "Abril";
        meses[4] = "Maio";
        meses[5] = "Junho";
        meses[6] = "Julho";
        meses[7] = "Agosto";
        meses[8] = "Setembro";
        meses[9] = "Outubro";
        meses[10] = "Novembro";
        meses[11] = "Dezembro";
        
        var now=new Date();
        var day=now.getDate();
        var month=now.getMonth();
        var year=now.getYear();
        
        var hours= now.getHours();
        var minutes= now.getMinutes();
        var seconds= now.getSeconds();
        var timeValue= "";
        
        timeValue += "Sorocaba, " + ((day<10) ? "0" : "") + day;
        timeValue += " de " + meses[month] + " ";
        timeValue += " de " + ((year<1900) ? (1900+year) : year);
        timeValue += " - " + ((hours<10) ? "0" : "") + hours;
        timeValue += ":" + ((minutes<10) ? "0" : "") + minutes;
        timeValue += ":" + ((seconds<10) ? "0" : "") + seconds;
 		//"<b>&nbsp;Atualização: 28/02/2009</b>&nbsp;&nbsp;&nbsp;&nbsp;" +
        document.getElementById("relogio").innerHTML = timeValue;
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
        }
function AbrirJanela(URL, Largura, Altura)
{
	if (screen)
	{
		sAltura = screen.height;
		sLargura = screen.width;
	}
	else
	{
		sAltura = 600;
		sLargura = 800;
	}
	iTop = ((sAltura/2)-(Altura));
	iLeft = ((sLargura/2)-(Largura/2));
	
	if(iTop<=0)
		iTop=10;
	if(iLeft<=0)
		iLeft=10;
	
	vJanela = window.open(URL, '', 'top='+ iTop +', left='+ iLeft +', height=' + Altura + ', status=no, resize=no, scrollbars=no, width=' + Largura);
	if (vJanela == null)
	{
		alert('Janela Bloqueada. Desabilite o bloqueador de popup.');
	}
}
function AbrirAnuncios()
{
	alert('Não existem cartazes de eventos no momento.\nVerifique na opção "NEWS" no menu a esquerda.');
	//AbrirJanela('../br/popup.htm',339,485);
	//AbrirJanela('../br/popup2.htm',400,600);
	//AbrirJanela('../br/popup3.htm',400,600);
	//AbrirJanela('../br/popup4.htm',416,600);
	//AbrirJanela('../br/popup5.htm',800,510);
}