var imgI=0;
var imagensP = new Array("img0","img1","img2","img3","img4");
if(navigator.appName == "Netscape"){//"Microsoft Internet Explorer"){
	margemtopoMenu = 0;
}
else{
	if(navigator.userAgent.indexOf("MSIE 9")!=-1)//navigator.appName == "Microsoft Internet Explorer")
		margemtopoMenu = 214;
	if(navigator.userAgent.indexOf("MSIE 8")!=-1)//navigator.appName == "Microsoft Internet Explorer")
		margemtopoMenu = 214;
	if(navigator.userAgent.indexOf("MSIE 7")!=-1)
		margemtopoMenu = 214;
	if(navigator.userAgent.indexOf("MSIE 6")!=-1)
		margemtopoMenu = 0;
		
}


var cidadesTempo = new Array("Alegrete-RS","BarradoQuarai-RS","Itaqui-RS","Quarai-RS","SaoBorja-RS");
function mudaTempo(index)
{
	t = document.getElementById("tempo");
	if(t!=null)
	t.innerHTML = "<iframe src=\"http://www.tempoagora.com.br/selos/custom/selo.php?cid="+cidadesTempo[index]+";\" name=\"selo\" width=\"120\" height=\"125\"  frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" scrolling=\"no\"></iframe>";
	//selo.location = "http://www.tempoagora.com.br/selos/custom/selo.php?cid="+cidadesTempo[index];
}

function showEventoCalendario(ev){
	document.getElementById('eventocalendario').innerHTML=document.getElementById(ev).innerHTML;
}
function hiddenEventoCalendario(){
	document.getElementById('eventocalendario').innerHTML="";
}

function efeitoMenuOver(id){
	document.getElementById(id).style.backgroundPosition = '0px -32px';
	//document.getElementById(id).style.backgroundImage = "menuitem2_over.png";
}

function efeitoMenuOut(id){
	document.getElementById(id).style.backgroundPosition = '0px 0px';
}

function showMenu1(id){
	//document.getElementById(id).style.visibility = 'visible';
	document.getElementById(id).style.visibility = 'visible';
}

function showMenu(base,id){
	//document.getElementById(id).style.visibility = 'visible';
	y=window.pageYOffset;
	document.getElementById(id).style.top = event.clientY+y+"px";
	//document.getElementById(base).offsetTop+margemtopoMenu+"px";
	document.getElementById(id).style.left = event.clientX-50+"px";
	document.getElementById(id).style.visibility = 'visible';
	//alert();

}

function hiddenMenu(id){
	document.getElementById(id).style.visibility = 'hidden';
}

function mudaImagen(i){
	//window.alert("");
	if(i==-1){
		if(imgI==0){
			document.getElementById("imgpagina").src="imagens/dinamica/evento0"+numeroEvento+"/img3.jpg";
			imgI=numeroFotos;
		}else{
			imgI=imgI+i;
			document.getElementById("imgpagina").src="imagens/dinamica/evento0"+numeroEvento+"/img"+imgI+".jpg";
		}
	}else{
		if(imgI==numeroFotos){
			document.getElementById("imgpagina").src="imagens/dinamica/evento0"+numeroEvento+"/img0.jpg";
			imgI=0
		}else{
			imgI=imgI+i;
			document.getElementById("imgpagina").src="imagens/dinamica/evento0"+numeroEvento+"/img"+imgI+".jpg";
		}
	}
}


