function printpic(){
	aux = $("central").src.split("/");
	tot = aux.length - 1;
	foto = "/photogallery/printpic/"+aux[tot]+"/";
	window.open(foto,"window","width=510,height=350,top=100,left=200,scrollbars=NO");
}

function viewgallery(ele, language, site){
	var node = ele.options[ele.selectedIndex].value;
	window.location = '/photogallery/view/' + node + '/' + language + '/' + site;
}

function sendFriend(){
	$("Pic").src = $("central").src;
	$("MailImg").value = $("central").src;
	$("divMail").style.display = "block";
}

function send(){
	$("divMail").style.display = "none";
}

// var stepScroll = 0;
// var s2 = new Control.Slider('knob','area', {});
// s2.options.onSlide = function(value){
//     mover(value);
//};
//
////botones de desplazamiento
//$('btDer').observe('click', function(){
//                                stepScroll += (stepScroll < 0.9)?0.1:(1-stepScroll);
//                                mover(stepScroll);
//                                s2.setValue(stepScroll);
//                                    });
//$('btIzq').observe('click', function(){
//                                stepScroll -= (stepScroll > 0.1)?0.1:stepScroll;
//                                mover(stepScroll);
//                                s2.setValue(stepScroll);
//                                    });
function mover(value){
    porc = Math.round(value*100);
    desplazamiento = $('tabla').getWidth() - $('mascara').getWidth();
    move = (porc * desplazamiento) / 100;
    $('tabla').setStyle({
      left: (move*-1) + 'px'
    });
    stepScroll = value
}

function callLoading(div, algo) {
	$(div).innerHTML ="<img src='/img/" + algo + "' id='loading_galleryload' alt=''/>";
}

//hago q se muestren las manitos
//$('btDer').observe('mouseover', function(){
//                            this.setStyle({cursor:'pointer'});
//                            });
//$('btIzq').observe('mouseover', function(){
//                            this.setStyle({cursor:'pointer'});
//                            });
//$('knob').observe('mouseover', function(){
//                            this.setStyle({cursor:'pointer'});
//                            });
//$('area').observe('mouseover', function(){
//                            this.setStyle({cursor:'pointer'});
//                            });
//
//$('divMail').visibility = false;