/******************************************************************
 Galeria de imagenes x Bruno Fagúndez (c) SOHO 2007
******************************************************************/

//
// Galeria / Opacidad 
//
function opacidad_thumbs(){
	var thumbs_galeria = $('galeria');
	var imgs = thumbs_galeria.getElementsByTagName('img');
		for(var i=0; i<imgs.length ;i++){
			new Effect.Opacity(imgs[i], {duration:0.5, from:1.0, to:0.5 });			
		}
}

function over_thumb(element){
	if(element.style.opacity != 1.0) {
	   	new Effect.Opacity(element, {duration:0.2, from:0.5, to:1.0 });
		}
	}

function out_thumb(element){
	if(element.style.opacity != 1.0) {
	   	new Effect.Opacity(element, {duration:0.2, from:1.0, to:0.5 });
		}
	}

//	
// Scroll
//

function toTop(id){
document.getElementById(id).scrollTop=0
}

defaultStep=1
step=defaultStep
function scrollDivDown(id){
document.getElementById(id).scrollLeft+=step
timerDown=setTimeout("scrollDivDown('"+id+"')",10)
}

function scrollDivUp(id){
document.getElementById(id).scrollLeft-=step
timerUp=setTimeout("scrollDivUp('"+id+"')",10)
}

function toBottom(id){
document.getElementById(id).scrollTop=document.getElementById(id).scrollHeight
}

function toPoint(id){
document.getElementById(id).scrollTop=100
}