var NumeroImagenes = 5;
var texto=
'Pr&oacute;ximamente';



/*===================================================================
FIN CONFIGURACION
===================================================================*/





function PreCarga (objetoImagen, rutaImagen) 
{
    if (document.images)
    {
	eval (objetoImagen +' = new Image()')
	eval (objetoImagen +'.src = "' + rutaImagen + '"')
    }
}
function inicio(){

	var i=0
	for(i=1;i<=NumeroImagenes;i++){
		PreCarga ('Image'+i,'image-c'+i+'.jpg');
		PreCarga ('ImageBig'+i,'image-c'+i+'_big.jpg');
		if(i==1){
			document.getElementById('enlaces').innerHTML+='<a href="JavaScript:ShowWork1 (\'null\',\'miImagen\','+i+')" style="color:#FED100;">&bull;</a>\n';
			imagenactual = new Image();
			imagenactual.src = 'image-c'+i+'_big.jpg';
			if(imagenactual.naturalWidth){			
				document.getElementById("ampliar").attributes['href'].value = "javascript:muestra_imagen('image-c"+i+"_big.jpg',"+imagenactual.naturalWidth+","+imagenactual.naturalHeight+")";
			}
			else {				
				document.getElementById("ampliar").attributes['href'].value = "javascript:muestra_imagen('image-c"+i+"_big.jpg',"+imagenactual.width+","+imagenactual.height+")";
			}
		}
		else{
			document.getElementById('enlaces').innerHTML+='<a href="JavaScript:ShowWork1 (\'null\',\'miImagen\','+i+')">&bull;</a>\n';
		}
	}
	document.getElementById('Textos-Obra').innerHTML=texto;
}
var num_imagen = 2;
function ShowWork (capa,nombreImagen,objetoImagen) 
{
    if (document.layers && capa!=null)
	eval('document.' + capa + '.document.images["' + nombreImagen + '"].src = ' + objetoImagen + '.src')
    else
	document.images[nombreImagen].src = eval(objetoImagen + ".src")
}


function ShowWork1 (capa,nombreImagen,objetoImagen) 
{
    if(NumeroImagenes<objetoImagen){
	objetoImagen = 1;
    }
    if (document.layers && capa!=null)
	eval('document.' + capa + '.document.images["' + nombreImagen + '"].src = Image' + objetoImagen + '.src');
    else
	document.images[nombreImagen].src = eval("Image" +objetoImagen + ".src");
   num_imagen = objetoImagen + 1;
document.getElementById('enlaces').innerHTML="";
	for(i=1;i<=NumeroImagenes;i++){
		if(i==objetoImagen){
			document.getElementById('enlaces').innerHTML+='<a href="JavaScript:ShowWork1 (\'null\',\'miImagen\','+i+')" style="color:#FED100;">&bull;</a>\n';
			imagenactual = new Image();
			imagenactual.src = 'image-c'+i+'_big.jpg';
			if(imagenactual.naturalWidth){			
				document.getElementById("ampliar").attributes['href'].value = "javascript:muestra_imagen('image-c"+i+"_big.jpg',"+imagenactual.naturalWidth+","+imagenactual.naturalHeight+")";
			}
			else {				
				document.getElementById("ampliar").attributes['href'].value = "javascript:muestra_imagen('image-c"+i+"_big.jpg',"+imagenactual.width+","+imagenactual.height+")";
			}
		

		}
		else {
		document.getElementById('enlaces').innerHTML+='<a href="JavaScript:ShowWork1 (\'null\',\'miImagen\','+i+')">&bull;</a>\n';
		}
	}
}

OCULTO="none";
VISIBLE="block";
 
function mostrar(blo) {
  document.getElementById(blo).style.display=VISIBLE;
  document.getElementById('ver_off').style.display=VISIBLE;
  document.getElementById('ver_on').style.display=OCULTO;
}
 
function ocultar(blo) {
  document.getElementById(blo).style.display=OCULTO;
  document.getElementById('ver_off').style.display=OCULTO;
  document.getElementById('ver_on').style.display=VISIBLE;
}


function shownNext(){
	ShowWork1(null,"miImagen",num_imagen);	
}

function Textos(nombrediv) {
	if(document.getElementById(nombrediv).style.display == '') {
        	document.getElementById(nombrediv).style.display = 'none';
	} else {
        	document.getElementById(nombrediv).style.display = '';
        }
}

function muestra_imagen(archivo,ancho,alto){
	//xInnerHtml('c1','')
	
	xWidth ('ampliacion',ancho + 6)
	xHeight ('ampliacion',alto + 6 + 20)
	xWidth ('c1',ancho)
	xHeight ('c1',alto)
	xWidth ('cerrarampliacion',ancho)
	
	
	xInnerHtml('c1','<img src="' + archivo + '" width="' + ancho + '" height="' + alto + '" border="2">')
	
	xShow('ampliacion');	
}

function cerrar_ampliacion(){
	xHide('ampliacion');
	
}
