<!--

	var a = 0;
	//var MaxSC = 900;
	//var MaxWW = 500;
	var Sep = 20;
	var acc = 0;

function avanza(n){

	a = a + Sep*n;
	if(a>fotos.MaxSC) a = fotos.MaxSC;
	if(a<0) a = 0;
	fotos.scrollTo(a,0);
	if(acc==1) setTimeout("avanza("+n+")", 20);
}
function para(){
	acc = 0;
}

function cambiaFoto(ff,p,w,h){

	document.imageGAL.src = "galeria_a/jpg2jpg_pro.php?w="+w+"&h="+h+"&id="+ff;
	escribe("piefoto",p)

}
function escribe(d,p) {
	
	
	myReference = getRefToDiv(d);
	
	if( typeof( myReference.innerHTML ) != 'undefined' ) {
	  myReference.innerHTML = p;
	} else if( myReference.document && myReference.document != window.document ) {
	  myReference.document.open();
	  myReference.document.write(p);
	  myReference.document.close();
	} else if( window.frames && window.frames.length && window.frames['nameOfIframe'] ) {
	  myReference = window.frames['nameOfIframe'].window;
	  myReference.document.open();
	  myReference.document.write(p);
	  myReference.document.close();
	}
}

function getRefToDiv(divID,oDoc) {

	if( document.getElementById ) {
		return document.getElementById(divID);
	}
	if( document.all ) {
		return document.all[divID];
	}
	if( !oDoc ) {
		oDoc = document; 
	}
	if( document.layers ) {
		if( oDoc.layers[divID] ) { 
			return oDoc.layers[divID];
		} else {
			for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
				y = getRefToDiv(divID,oDoc.layers[x].document);
			}
			return y;
		}
	}
	return false;
}

// -->