
function abrirImagen(foto) { 
	
	//alert(foto);
	
	alpha=window.open("","","toolbar=no,location=no,menubar=no,scrollbars=no,status=no,resizable=no,width=800,height=600,top=10,left=10"); 
	x=alpha.document; 
	x.write("<head><SCRIP"+"T>") 
	x.write("function dymanicResize(){") 
	x.write("window.resizeTo(") 
	x.write("document.im1.width+11,") 
	x.write("document.im1.height+53);") 
	x.write("};document.title='---------';</SCRIP"+"T></head>") 
	x.write("<body topmargin=0 leftmargin=0 scroll=no toolbar=no location=no menubar=no scrollbars=no status=no>") 
	//x.write("<img src='"+foto+"' name='im1' width='800' height='600'>") 
	x.write("<img src='"+foto+"' name='im1' onLoad='dymanicResize()'>") 
	
	x.write("</body>") 
	x.close() 
	alpha.focus() 
} 



function abrirImagenRec(foto) { 
	foto = foto.replace("_m_","_g_");
	alpha=window.open("","","toolbar=no,location=no,menubar=no,scrollbars=no,status=no,resizable=no,width=800,height=600,top=10,left=10"); 
	x=alpha.document; 
	x.write("<head><SCRIP"+"T>") 
	x.write("function dymanicResize(){") 
	x.write("window.resizeTo(") 
	x.write("document.im1.width+11,") 
	x.write("document.im1.height+53);") 
	x.write("};document.title='---------';</SCRIP"+"T></head>") 
	x.write("<body topmargin=0 leftmargin=0 scroll=no toolbar=no location=no menubar=no scrollbars=no status=no>") 
	//x.write("<img src='"+foto+"' name='im1' width='800' height='600'>") 
	x.write("<img src='"+foto+"' name='im1' onLoad='dymanicResize()'>") 
	
	x.write("</body>") 
	x.close() 
	alpha.focus() 
} 


function abrirPdf(pdf){
	//alert(pdf);
	window.open(pdf);
	
}

function lanzar(fichero,capa,id)
	{	
	//alert(document.images.length)
			
	
		for (var i=0;i < document.images.length;i++){		
			var elemento = document.images[i];			
				if (elemento.name.indexOf('carpeta')!=-1){
					elemento.src='imagenes/carpeta-cerrada.gif';
				}		
		}
	
	
		document.getElementById('carpeta'+id).src='imagenes/carpeta-abierta.gif'; 
			
		if(window.XMLHttpRequest) {
			objXml = new XMLHttpRequest(); // Gecko (Firefox, Moz), KHTML (Konqueror, Safari), Opera
		} else if(window.ActiveXObject) {
			objXml = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer		
		}					
		
		objXml.open("GET", fichero, true);  
		objXml.onreadystatechange=function() {
   		if (objXml.readyState==4) {      			    			
       			document.getElementById(capa).innerHTML=objXml.responseText; 
  		}
 		}   		      				
		objXml.send(null);		
	
	}

function cambiarFoto(ruta,foto,nomfoto)
{	

	document.getElementById("piefoto").innerHTML=nomfoto;
	
	document.images["img_acambiar"].src = '/imagenes/web/' + ruta + '/' + foto +'_m.jpg';
}


function cambiarFotoPeque(id,foto,carpeta)
{	
	document.images["foto_receta"].src = '/imagenes/web/'+carpeta+'/fotos/' + id + foto;

}

