// +----------------------------------------------------- J. Eusebio Bolon [SEBI] - 14/05/2005 ---+
// |   REALIZADO EN | HOBERON DESARROLLO E INNOVACION                                             |
// |    DESCRIPCION | Contenedor de funciones JavaScript generales                                |
// +----------------------------------------------------------------------------------------------+

/*
function FnombreWeb(){
// +----------------------------------------------------- J. Eusebio Bolon [SEBI] - 14/05/2005 ---+
// |   Función que captura el nombre de la web en la que nos encontramos actualmente              |
// +----------------------------------------------------------------------------------------------+
	var sPath = window.location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
	
	return sPage;
}
*/
/*
function Fmenu(){
// +----------------------------------------------------- J. Eusebio Bolon [SEBI] - 14/05/2005 ---+
// |   Función que devuelve el menu lateral izquierdo a mostrar en funcion de la seccion          |
// +----------------------------------------------------------------------------------------------+
	var sPage = FnombreWeb();
	var codePage = sPage.substring(0, 1);

	var html = "<a href='index.html'><img src='img/img02.jpg' width='200' height='86' border='0'></a>";

	if (codePage != "1"){
		html += "<a href='10productos.html'><img src='img/menu10.png' width='120' height='36' border='0' title='' alt='Productos'></a><br>\n";
	}else{
		html += "<a href='10productos.html'><img src='img/menu11.png' width='120' height='36' border='0' title='' alt='Productos'></a><br>\n";
	}
	if (codePage != "2"){
		html += "<a href='20calidad.html'><img src='img/menu20.png' width='120' height='36' border='0' title='' alt='Calidad'></a><br>\n";
	}else{
		html += "<a href='20calidad.html'><img src='img/menu21.png' width='120' height='36' border='0' title='' alt='Calidad'></a><br>\n";
	}
	if (codePage != "8"){
		html += "<a href='80MedioAmbiente.html'><img src='img/menu80.png' width='120' height='36' border='0' title='' alt='Medio Ambiente'></a><br>\n";
	}else{
		html += "<a href='80MedioAmbiente.html'><img src='img/menu81.png' width='120' height='36' border='0' title='' alt='Medio Ambiente'></a><br>\n";
	}		
	if (codePage != "3"){
		html += "<a href='30recetas.html'><img src='img/menu30.png' width='120' height='36' border='0' title='' alt='Recetas'></a><br>\n";
	}else{
		html += "<a href='30recetas.html'><img src='img/menu31.png' width='120' height='36' border='0' title='' alt='Recetas'></a><br>\n";
	}
	if (codePage != "4"){
		html += "<a href='40empresa.html'><img src='img/menu40.png' width='120' height='36' border='0' title='' alt='Empresa'></a><br>\n";
	}else{
		html += "<a href='40empresa.html'><img src='img/menu41.png' width='120' height='36' border='0' title='' alt='Empresa'></a><br>\n";
	}
	if (codePage != "5"){
		html += "<a href='50contacto.html'><img src='img/menu50.png' width='120' height='36' border='0' title='' alt='Contacto'></a><br>\n";
	}else{
		html += "<a href='50contacto.html'><img src='img/menu51.png' width='120' height='36' border='0' title='' alt='Contacto'></a><br>\n";
	}
	if (codePage != "6"){
		html += "<a href='60localizacion.html'><img src='img/menu60.png' width='120' height='36' border='0' title='' alt='Localización'></a><br>\n";
	}else{
		html += "<a href='60localizacion.html'><img src='img/menu61.png' width='120' height='36' border='0' title='' alt='Localización'></a><br>\n";
	}
	html += "<img src='img/img06.png' width='37' height='26' border='0' title='' alt=''><br>\n";
	html += "<img src='img/CertificadoBRC.gif' width='120' height='80' border='0' title='' alt=''><br>\n";
	html += "<img src='img/CertificadoIFS.gif' width='120' height='80' border='0' title='' alt=''><br>\n";
	html += "<img src='img/img06.png' width='37' height='26' border='0' title='' alt=''><br>\n";
	//html += "<img src='img/img03.png' width='200' height='16' border='0'>";
	
	document.write(html);
}
*/
/*
function Fpie(){
// +----------------------------------------------------- J. Eusebio Bolon [SEBI] - 14/05/2005 ---+
// |   Función que devuelve el menu del pie de página                                             |
// +----------------------------------------------------------------------------------------------+
	var html =
	//"<p>"
	//+"Selecione idioma:"
	//+"&nbsp;&nbsp;&nbsp;<a href=''>English</a>"
	//+"&nbsp;&nbsp;&nbsp;<a href=''>Gallego</a>"
	//+"&nbsp;&nbsp;&nbsp;<a href=''>Ruso</a></p>"
	"<p>"
	+"<a href='50contacto.html'>Contacto y atención al cliente</a>"
	+"&nbsp;&nbsp;<a>|</a>&nbsp;&nbsp;"
	//+"<a href='70mapa.html'>Mapa del sitio</a>"
	//+"&nbsp;&nbsp;<a>|</a>&nbsp;&nbsp;"
	+"<a href='71avisolegal.html'>Aviso legal y privacidad</a>"
	+"</p>"
	+"<p>© 2005 Grupo Tres Mares, S.A. Todos los derechos reservados</p>";
	
	document.write(html);
}
*/

function FimprimirReceta(){
// +----------------------------------------------------- J. Eusebio Bolon [SEBI] - 14/05/2005 ---+
// +---  Función que imprime la información el contenido del id="IMPRIME"                       --+
// +----------------------------------------------------------------------------------------------+
	var win = window.open();
	self.focus();
	win.document.open();
	
	var html = "<table cellpadding='0' cellspacing='0' border='0' width='587' align='center'>"
	+"<tr>"
	+"	<td height='87'><img src='img/img01.jpg' width='587' height='87' border='0'></td>"
	+"</tr>"
	+"<tr>"
	+"	<td>"+ document.getElementById("IMPRIME").innerHTML +"</td>"
	+"</tr>"
	+"</table>";
	
	win.document.write(html);
	win.document.close();
	win.print();
	win.close();
}

/*
function FpreLoadFotos() {
// +----------------------------------------------------- J. Eusebio Bolon [SEBI] - 14/05/2005 ---+
// +---  Función que carga en memoria todas las imágenes de la web                              --+
// +----------------------------------------------------------------------------------------------+
	var imagenes = new Array;
	imagenes[0]= "img/img07.png";	imagenes[1]= "img/img04.jpg";	imagenes[2]= "img/enviar.png";
	imagenes[3]= "img/img03.png";	imagenes[4]= "img/img06.png";	imagenes[5]= "img/menu31.png";
	imagenes[6]= "img/menu30.png";	imagenes[7]= "img/menu41.png";	imagenes[8]= "img/menu51.png";
	imagenes[9]= "img/menu21.png";	imagenes[10]= "img/menu40.png";	imagenes[11]= "img/menu50.png";
	imagenes[13]= "img/menu20.png";	imagenes[13]= "img/menu11.png";	imagenes[14]= "img/menu10.png";
	imagenes[15]= "img/menu61.png";	imagenes[16]= "img/menu60.png";	imagenes[17]= "img/menu32.png";
	imagenes[18]= "img/menu42.png";	imagenes[19]= "img/menu52.png";	imagenes[20]= "img/menu22.png";
	imagenes[21]= "img/menu12.png";	imagenes[22]= "img/menu62.png";	imagenes[23]= "img/menu53.jpg";
	imagenes[24]= "img/menu43.jpg";	imagenes[25]= "img/menu63.jpg";	imagenes[26]= "img/menu23.jpg";
	imagenes[27]= "img/menu33.jpg";	imagenes[28]= "img/menu13.jpg";	imagenes[29]= "img/img02.jpg";
	imagenes[30]= "img/img01.jpg";	imagenes[31]= "img/img05.png";
	
	for (var i=0; i<imagenes.length; i++){
		var imaxe = new Image;
		imaxe.src = imagenes[i];

		if (imaxe.width!=0 && imaxe.height!=0){
			imaxe=null
		}else{
			setTimeout("FpreLoadFotos()", 500)
		}
	}
}
*/
