// JavaScript Document

var bannerCount = 0;
var wndImage = new Object();

wndImage.closed = true;

function writeFooter() {
	var data = new Date();
	document.writeln('<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" style="background: url(http://www.anthasanfibius.com.br/media/bg_00.gif);">');
	document.writeln('<tr><td class="texto_06" style="padding: 4px 15px 4px 15px;">');
	document.writeln('&copy; ' + data.getFullYear() + ' <b>Anthas Anfibius Eco Adventures</b>&nbsp;&nbsp;|&nbsp;&nbsp;Cria&ccedil;&atilde;o: <a href="http://www.planetpropaganda.com.br" target="_blank" class="texto_06"><b>Planet House Propaganda</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;Desenvolvimento: <a href="http://www.vizza.com.br" target="_blank" class="texto_06"><b>Inv&eacute;xis Vizza</b></a>');
	document.writeln('</td></tr></table>')
}

function writeBanner(path, width, height) {	
	var fo = new FlashObject(path, "banner" + this.bannerCount, width, height, "7", "#FFFFFF");			
	fo.addParam("AllowScriptAccess", "always");
	fo.addParam("menu", "false");
	fo.addParam("wmode", "transparent");
	
	document.writeln('<div id="bn_' + this.bannerCount + '" style="width: ' + width + 'px; height: ' + height + 'px; background: white;"></div>');
							
	fo.write("bn_" + this.bannerCount);
	
	this.bannerCount++;	
}

function windowOpen(path, name, width, height, prop) {
	if (prop != null) window.open(path, name, 'width=' + width + ', height=' + height + ', ' + prop);
	else window.open(path, name, 'width=' + width + ', height=' + height);
}

function showImage(name,width,height,formato){
	if (!wndImage.closed) wndImage.close();
	
	var extensao = (formato == null)?'.jpg':formato;
	
	wndImage = window.open('','imagem','top=10,left=10,width=' + (width + 17) + ',height=' + (height + 70) + ',scrollbars,resizable');
    wndImage.document.writeln('<html>');
	wndImage.document.writeln('<head>');
	wndImage.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
	wndImage.document.writeln('<title>Anthas Anfibius Adventures</title>');
    wndImage.document.writeln('<link rel="stylesheet" type="text/css" href="styles.css">');
	wndImage.document.writeln('</head>');
	wndImage.document.writeln('<body bgcolor="#ffffff">');
	wndImage.document.writeln('<table width="100%" height=100% border="0" cellpadding="0" cellspacing="0">');
	wndImage.document.writeln('<tr>');
	wndImage.document.writeln('<td align="center" valign="middle"><img src="media/imagens/' + name + extensao + '" border="0">');
	wndImage.document.writeln('</tr>');
	wndImage.document.writeln('<tr>');
	wndImage.document.writeln('<td align=center valign=bottom><table width="50" border="0" cellspacing="0" cellpadding="2">');
    wndImage.document.writeln('<tr>');
    wndImage.document.writeln('<td><a href="javascript:window.close()" class="texto_03">Fechar</a></td>');
    wndImage.document.writeln('<td><a href="javascript:window.close()"><img src="media/ic_30.gif" width="36" height="42" border="0"></a></td>');
    wndImage.document.writeln('</tr>');
    wndImage.document.writeln('</table></td>');
	wndImage.document.writeln('</tr>');
	wndImage.document.writeln('</table>');
	wndImage.document.writeln('</body>');
    wndImage.document.close();
    wndImage.focus();
}

function showImage2(name,width,height,formato,categoria,total){
	if (!wndImage.closed) wndImage.close();
	
	var extensao = (formato == null)?'.jpg':formato;
	
	wndImage = window.open('','imagem','top=10,left=10,width=' + (width + 30) + ',height=' + (height + 70) + ',scrollbars,resizable');
    wndImage.document.writeln('<html>');
	wndImage.document.writeln('<head>');
	wndImage.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
	wndImage.document.writeln('<title>Anthas Anfibius Adventures</title>');
    wndImage.document.writeln('<link rel="stylesheet" type="text/css" href="styles.css">');
	wndImage.document.writeln('<script language="javascript" type="text/javascript" src="scripts_fotos.js"></script>');
	wndImage.document.writeln('<script language="javascript" type="text/javascript">');
	wndImage.document.writeln('var total = ' + (parseInt(total) - 1) + ';');
	wndImage.document.writeln('var atual = ' + name.split("_")[1] + ';');
	wndImage.document.writeln('var formato = "' + formato + '";');
	wndImage.document.writeln('var path = "media/imagens/' + categoria + '";');
	wndImage.document.writeln('</script>');
	wndImage.document.writeln('</head>');
	wndImage.document.writeln('<body bgcolor="#ffffff">');
	wndImage.document.writeln('<table width="100%" height=100% border="0" cellpadding="0" cellspacing="0">');
	wndImage.document.writeln('<tr><td align="center" valign="middle">')
	wndImage.document.writeln('<table border="0" cellpadding="0" cellspacing="0"><tr><td align="center" valign="middle"><img id="foto" src="media/imagens/' + categoria + name + '.' + extensao + '" border="0"></td></tr>');
    wndImage.document.writeln('<tr><td align=center valign=bottom><table height="50" border="0" cellspacing="0" cellpadding="2">');
    wndImage.document.writeln('<tr><td width="120"><a href="#" class="texto_07" onClick="anterior(); return false;" style="display: compact;" id="anterior"><img src="media/bl_02.gif" border="0" align="absmiddle" hspace="4"><b>Anterior</b></a></td>');
	wndImage.document.writeln('<td><a href="javascript:window.close()" class="texto_03">Fechar</a></td>');
	wndImage.document.writeln('<td><a href="javascript:window.close()"><img src="media/ic_30.gif" width="36" height="42" border="0"></a></td>');
	wndImage.document.writeln('<td width="120" align="right"><a href="#" onClick="proxima(); return false;" class="texto_07" style="display: compact;" id="proxima"><b>Pr&oacute;xima</b><img src="media/bl_00.gif" border="0" align="absmiddle" hspace="4"></a></td></tr>');
    wndImage.document.writeln('</tr>');
    wndImage.document.writeln('</table></td></tr></table></td>');
    wndImage.document.writeln('</tr>');
	wndImage.document.writeln('</table>');
	wndImage.document.writeln('<script language="javascript" type="text/javascript">checkButtons();</script>');
	wndImage.document.writeln('</body>');
    wndImage.document.close();
    wndImage.focus();
	
}


function checkFields(){
	var ok = false;
    var voto;
	var formulario = document.enquete;
	for (i=0; i<5; i++){ if (formulario.opcao[i].checked) { ok = true; voto = i } }
	if (ok) { window.open('http://www.vizza.com.br/cgi-bin/clientes/anthasanfibius/anthasanfibius_enquete.pl?voto=' + voto ,'enquete','width=300,height=280'); }
	else { alert('Favor escolher uma opção!') };
}

function openCadastro() {
	window.open("popup_cadastre_se.htm", "cadastro", "width=310, height=354").focus();
}
