<!--
function mostraFoto (imagem)
	{
	var szURL = "mostrarfoto.htm?"+imagem.src;
	NewWindow = open (szURL, "foto", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=310,height=465,left=20,top=20");
	}

function abreFoto (imagem)
	{
	var szURL = "mostrarfoto.htm?"+imagem.src;
	NewWindow = open (szURL, "novidades", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=410,height=365,left=20,top=20,alwaysRised=yes");
	}

function ajustar (altura, largura) 
	{ 
	self.resizeTo (altura, largura);
	}

function extractParams (szText, varPos)
	{
	var szReturnVar;
	var nPass = 0
	var lPos = szText.indexOf("?") + 1;
	var szTempText;
	while (true)
		{
		rPos = szText.indexOf("&", lPos+1);
		if (rPos < 0) szTempText = szText.substring(lPos); 
		else szTempText = szText.substring(lPos, rPos); 
		if (++nPass == varPos) break;
		if (rPos < 0) return ("null");
		lPos = rPos + 1;		
		}
	rPos = szTempText.indexOf("=")
	if (rPos > 0) szReturnVar = szTempText.substring(++rPos); 
	else szReturnVar = szTempText;
	return (szReturnVar);
	}

function abreJanela ()
	{
	NewWindow = open ("desfile2002altoverao2003.htm", "desfile", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=345,height=540,left=20,top=20,alwaysRised=yes");
	}


function mostrarFotoANTIGO(Foto) 
	{
	NewWindow = open ("", Foto, "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width=320,height=520,left=20,top=20,alwaysRised=yes,z-lock=no");
	NewWindow.document.writeln ("<html>");
	NewWindow.document.writeln ("<title>Foto</title>");
	NewWindow.document.writeln ("<body topmargin=\"0\" leftmargin=\"0\">");
	var wLine = "<p align=\"center\"><img src=\""+Foto+".jpg\" alt=\"Aguarde ... carregando a foto\"></p>"
	NewWindow.document.writeln (wLine);
	NewWindow.document.writeln ("<p align=\"center\"><font face=\"Arial\" size=\"2\">[<a href=\"JavaScript:window.close();\">fechar</font></a>]</p>");
	NewWindow.document.writeln ("</body>");
	NewWindow.document.writeln ("</html>");
	}
function preLoadImages() 
	{ 
	szImgSrc = new String;
 	var currentDoc = document; 
	if (!currentDoc.preLoadedImages) currentDoc.preLoadedImages = new Array();
	for (i=1; i <= topFoto; i++)		
		{	
		j = i - 1;
		currentDoc.preLoadedImages [j]     = new Image; 
		currentDoc.preLoadedImages [j].src = "desfile2002dez07x0"+i+"th.jpg";
		}
	timer=setTimeout ("mudaFoto()", 1500);
	}

function mudaFoto()
	{
	currentFoto += 1;
	if (currentFoto > topFoto) currentFoto = 1;
	found = new Boolean;
	found = false;
  	var currentDoc = document; 
	for (currImgPos =0; currImgPos < currentDoc.images.length; currImgPos ++)
		{
		currentDoc.forms[0].wparams.value = currentDoc.images[currImgPos].src;
		szImgSrc = currentDoc.forms[0].wparams.value;
		if (szImgSrc.indexOf ("desfile2002") >= 0) { found = true; break; }
		}
	if (!found) return;
	j = currentFoto - 1;
	currentDoc.images [currImgPos].src = currentDoc.preLoadedImages [j].src;
	clearTimeout (timer);
	timer=setTimeout ("mudaFoto()", 1500);
	}

function mostraProximaFoto ()
	{
	if (++currentFoto > topFoto) currentFoto = 1;
	if (currentFoto < 10) szCurrentFoto = "0"+ currentFoto;
	else szCurrentFoto = currentFoto;
   	document.images[0].src = "fotos/desfile2002dez07/foto"+szCurrentFoto+".jpg";
//	while (!document.images[0].complete);
	clearTimeout (timer);
	timer=setTimeout ("mostraProximaFoto()", 6000);
	}
function mostrarFotoAnterior()
	{
	clearTimeout (timer);
	currentFoto -= 1;
	if (currentFoto < 0) currentFoto = topFoto;
	if (currentFoto < 10) szCurrentFoto = "0"+ currentFoto;
	else szCurrentFoto = currentFoto;
   	document.images[0].src = "fotos/desfile2002dez07/foto"+szCurrentFoto+".jpg";
	}
function mostrarProximaFoto()
	{
	clearTimeout (timer);
	currentFoto += 1;
	if (currentFoto > topFoto) currentFoto = 1;
	if (currentFoto < 10) szCurrentFoto = "0"+ currentFoto;
	else szCurrentFoto = currentFoto;
   	document.images[0].src = "fotos/desfile2002dez07/foto"+szCurrentFoto+".jpg";
	}

function pararExibicao()
	{
	clearTimeout (timer);
	}
function continuarExibicao()
	{
	clearTimeout (timer);
	timer=setTimeout ("mostraProximaFoto()", 6000);
	}

//-->

