

// ----- GALERIA ----- //

function galeria_troca(id)
{
	obGaleria = GetObject('galeriaR1');
	if(typeof(obGaleria) == "object")
	{
		if(typeof(galeria_fotos[id]) == "object")
		{
			html = '';
			html += '<h4><img src="'+galeria_fotos[id]['imagem_grande']+'" alt="'+galeria_fotos[id]['legenda']+'" /></h4>';
			html += '<p> '+galeria_fotos[id]['legenda']+' </p>';
			obGaleria.innerHTML = html;
		}
	}
	return void(0);
}

// - FIM GALERIA ----- //

// ----- GALERIA 	AMPLIA----- //

function amplia(img){
	if(arguments[2]!="" && arguments[3]!=""){
		width=arguments[2];
		height=arguments[3];
	}
	else{
		width=600;
		height=600;
	}
	
	if(arguments[1] != "")
		titulo = arguments[1];
	else
		titulo = "viaje aqui!";

	janela = window.open('','foto','width='+width+',height='+height+',top=0,left=0,scrollbars=no,status=no,menubars=no,location=no');
	janela.document.open();
	janela.document.write('<html><head><'+'scri'+'pt>function resize() {i=20; if (navigator.appName == \'Netscape\') i=5;if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+90-i);self.focus();}</s'+'cript'+'>');
	janela.document.write('<title>'+titulo+'</title>');
	janela.document.write('</head><body topmargin=0 leftmargin=0 marginwidth=0 rightmargin=0 bgcolor="#000000" onload="resize();">');
	janela.document.write('<div align=center><img src="'+img+'" alt="'+titulo+'" title="'+titulo+'" /></div>');
	janela.document.write('<div align=right style="color: #fff; margin-right: 20px; margin-top: 4px; font-size: 11px; font-family: Verdana;">'+titulo+'</div>');
	janela.document.write('</body></html>');
	janela.document.title=titulo;
	janela.document.close();
	janela.focus()
}

// - FIM FOTO ----- //


// ----- SCROLL --- //

function left(obj,mask){
	y = parseInt(obj.style.left);
	altura_obj = parseInt(obj.clientWidth);
	largura_mask = parseInt(mask.clientWidth);
	if(y >= (largura_mask - altura_obj))
	{
		obj.style.left = y-5+'px';
	}
		
}

function right(obj,mask){
	y = parseInt(obj.style.left);
	if(y+2 <= 0)
	{
		obj.style.left = y+5+'px';
	}
}
// - FIM SCROLL --- //

