//INCLUDES
// Function to allow one JavaScript file to be included by another.
// Copyright (C) 2006 www.cryer.co.uk
function IncludeJavaScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"></script>'); 
}

IncludeJavaScript('../ajax/prototype.js');
IncludeJavaScript('../ajax/blendtrans.js');
IncludeJavaScript('ajax/prototype.js');
IncludeJavaScript('ajax/blendtrans.js');
IncludeJavaScript('http://www.google-analytics.com/urchin.js');

function enter(){
	opacity('logo',100,0,1000);
	setTimeout("new Ajax.Updater('entrar','loading.html',{method:'get',evalScripts:true});",1100);
}
function showContacto(){
	currentStep = 1;
	totalSteps = 5;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('nosotrosDiv').style.display='none';
		$('tiendaDiv').style.display='none';
		$('contacto').style.display='none';
		$('elMenu').style.display='none';

		$('teteraYvaso').style.display = 'block';
		$('skycrapper').style.display = 'block';
		$('skycrappera').style.display = 'block';
		$('fotoTeteria').style.display='none';
		changeOpac(100,'contacto');
		$('cargandoDiv').style.display='none';
		$('mailForm').style.display='block';
		changeOpac(0,'emailFondoId');
		changeOpac(0,'addressValue');
		changeOpac(0,'messageValue');
		changeOpac(0,'papelFondoId');
		changeOpac(0,'buttonId');
		$('contacto').style.display='block';
		fadeIn('emailFondoId',500);
		setTimeout("changeOpac(100,'addressValue');",1000);
		setTimeout("fadeIn('papelFondoId',800);",1000);
		setTimeout("changeOpac(100,'messageValue');",2000);
		setTimeout("fadeIn('buttonId',800);",2000);
	}
	$('cargandoDiv').style.display = 'block';
	new Ajax.Updater('contacto','../php/contact.php',{method:'post'});
}

function sendMail(){
	var params = Form.serialize($('mailForm'));
	fadeOut('contacto',1000);
	setTimeout("$('mailForm').style.display='none';",1100);
	setTimeout("$('contacto').style.display='none';",1100);
	new Ajax.Updater('answer','../php/mail.php', {
  		method: 'post',
  		parameters: params,
  		onComplete: function(){
  			$('answer').style.display='block';
  			changeOpac(0,'answer'); 
			fadeIn('answer');
  		}
  	});
}

function continuar(){
	fadeOut('answer',1000);
	setTimeout("$('answer').style.display='none';",1100);
	$('fotoTeteria').style.display='block';
}

function shop(){
	_uacct = "UA-4894080-1";
	urchinTracker('/tienda');
	currentStep = 1;
	totalSteps = 6;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('nosotrosDiv').style.display='none';
		$('fotoTeteria').style.display = 'none';
		$('skycrapper').style.display = 'none';
		$('skycrappera').style.display = 'none';
		$('teteraYvaso').style.display = 'none';
		$('letras').style.display = 'none';
		$('elMenu').style.display = 'none';
		$('contacto').style.display = 'none';
		$('elMenu').style.display = 'none';
		$('tiendaDiv').style.display='block';
		$('cargandoDiv').style.display = 'none';
		$('shopContent').style.display='block';	
		$('tesDiv').style.display='block';
		try{
		setTimeout("blendimage('animacionTienda','shopblendimage','images/shopfoto1a.jpg',1000);", 2000);
		setTimeout("blendimage('animacionTienda','shopblendimage','images/shopfoto1b.jpg',1000);", 6000);
		setTimeout("blendimage('animacionTienda','shopblendimage','images/shopfoto1c.jpg',1000);", 10000);
		}
		catch(err){
		}
	}
	$('cargandoDiv').style.display = 'block';	
	new Ajax.Updater('tiendaDiv','../php/tienda.php',{method:'post',evalScripts:true});
}
function nosotros(){
	currentStep = 1;
	totalSteps = 1;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('fotoTeteria').style.display='none';
		$('tiendaDiv').style.display='none';
		$('contacto').style.display='none';
		$('elMenu').style.display = 'none';
		$('letras').style.display='none';
		$('teteraYvaso').style.display='block';
		$('skycrapper').style.display = 'block';
		$('skycrappera').style.display = 'block';
		$('maila').style.display = 'block';
		changeOpac(0,'nosotrosDiv');
		$('cargandoDiv').style.display = 'none';	
		$('nosotrosDiv').style.display='block';
		fadeIn('nosotrosDiv',1000);
	}

	$('cargandoDiv').style.display='block';
	new Ajax.Updater('nosotrosDiv','../php/nosotros.php',{method:'post',evalScripts:true});
}
function showFotoShow(){
	currentStep = 1;
	totalSteps = 15;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('cargandoDiv').style.display='none';
		location.href = "fotos.html";
	}
	$('cargandoDiv').style.display='block';
	new Ajax.Updater('fotoShow','../php/fotos.php',{method:'post',evalScripts:true});
}
function elMenu(){
	currentStep = 1;
	totalSteps = 20;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('nosotrosDiv').style.display='none';
		$('fotoTeteria').style.display='none';
		$('teteraYvaso').style.display='none';
		$('letras').style.display='none';
		$('tiendaDiv').style.display='none';
		$('contacto').style.display='none';
		changeOpac(0,'elMenu');
		$('elMenu').style.display='block';
		$('cargandoDiv').style.display = 'none';
		$('skycrapper').style.display = 'block';
		$('skycrappera').style.display = 'block';
		$('maila').style.display = 'block';
		fadeIn('elMenu',1000);
		if (($('skycrapper').style.opacity == '0') &&($('skycrapper').style.MozOpacity == '0')){
			fadeIn('skycrapper',1000);
			fadeIn('skycrappera',1000);
			fadeIn('maila',1000);
		}	
	}
	$('cargandoDiv').style.display = 'block';
	new Ajax.Updater('elMenu','../php/menu.php',{method:'post',evalScripts:true});
	
}
function showContenido(input){
	    if (input=='cachimba'){
	    		var cerrarElement = document.createElement('a');
	    		cerrarElement.setAttribute('href','#');
	    		cerrarElement.innerHTML = 'cerrar';
	    		cerrarElement.style.position='absolute';
	    		cerrarElement.style.left='551px';
	    		cerrarElement.style.top='5px';
	    		cerrarElement.style.fontSize='16px';
	    		cerrarElement.style.color = 'DarkGray';
	    		cerrarElement.onmouseover = function() {this.style.color='DarkOrange';};
	            cerrarElement.onmouseout = function() {this.style.color='DarkGray';};
	    		cerrarElement.onclick = function() {cerrarContenido();};
	    		$('contenidoMenu').appendChild(cerrarElement);
	    		var inicioElement = document.createElement('a');
	    		inicioElement.setAttribute('href','#');
	    		inicioElement.style.position='absolute';
	    		inicioElement.style.left='555px';
	    		inicioElement.style.top='415px';
	    		inicioElement.style.fontSize='16px';
	    		inicioElement.style.color = 'DarkGray';
	    		inicioElement.innerHTML = 'inicio';
	    		inicioElement.onmouseover = function() {this.style.color='DarkOrange';};
	            inicioElement.onmouseout = function() {this.style.color='DarkGray';};
	    		inicioElement.onclick = function() {$('pCont').innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>"+
	            "Ofrecemos cachimbas de calidad preparadas por manos expertas "+
	            "para el deleite de nuestros apreciados clientes. <br><br>"+ 
	            "De dulce manzana, delicada fresa, refrescante menta o delicioso melocotón, " +
	            "si las cachimbas son lo tuyo no dudes en pasarte por Tetería La Oriental y probar nuestros sabores "+
	            " de calidad superior."+
	            "<br><br>¡Os esperamos!";};
	    		$('contenidoMenu').appendChild(inicioElement);
		        var abuElement = document.createElement('img'); 
	            abuElement.setAttribute('src','images/abuCachimba.jpg');
	            abuElement.style.position='absolute';
	            abuElement.style.left='25px';
	            abuElement.style.top='52px';
	            $('contenidoMenu').appendChild(abuElement);
	            var sinTabacoElement = document.createElement('p');
	            sinTabacoElement.innerHTML = '0% TABACO - 0% NICOTINA - 0% ALQUITRAN'; 
	            sinTabacoElement.setAttribute('src','images/sinTabaco.jpg');
	            sinTabacoElement.style.position='absolute';
	            sinTabacoElement.style.left='157px';
	            sinTabacoElement.style.top='417px';
	            sinTabacoElement.style.size = '18px';
	            sinTabacoElement.style.fontFamily = 'Arial';
	            sinTabacoElement.style.color = 'DarkSeaGreen';
	            $('contenidoMenu').appendChild(sinTabacoElement);
	            var tituloElement = document.createElement('p');
	            tituloElement.innerHTML = 'Cachimbas';
	            tituloElement.style.position='absolute';
	            tituloElement.style.left='320px';
	            tituloElement.style.top='25px';
	            tituloElement.style.color = 'Black';
	            tituloElement.style.fontSize='24px';
	            tituloElement.style.fontFamily='Arial';
	            $('contenidoMenu').appendChild(tituloElement);
	            var contElement = document.createElement('p');
	            contElement.innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>"+
	            "Ofrecemos cachimbas de calidad preparadas por manos expertas "+
	            "para el deleite de nuestros apreciados clientes. <br><br>"+ 
	            "De dulce manzana, delicada fresa, refrescante menta o delicioso melocotón, " +
	            "si las cachimbas son lo tuyo no dudes en pasarte por Tetería La Oriental y probar nuestros sabores "+
	            " de calidad superior."+
	            "<br><br>¡Os esperamos!";
	            contElement.setAttribute('id','pCont');
	            contElement.style.position='absolute';
	            contElement.style.left='270px';
	            contElement.style.top='70px';
	            contElement.style.color = 'Black';
	            contElement.style.fontSize='16px';
	            contElement.style.fontFamily='Arial';
	            contElement.style.width='250px'; 
	            $('contenidoMenu').appendChild(contElement);
	            var linkQue = document.createElement('a');
	            linkQue.setAttribute('href','#');
	            linkQue.innerHTML = 'Que es?';
	            linkQue.style.position='absolute';
	            linkQue.style.left='95px';
	            linkQue.style.top='310px';
	            linkQue.style.color='Black';
	            linkQue.style.fontFamily='Arial';
	            linkQue.onmouseover = function() {this.style.color='DarkOrange';};
	            linkQue.onmouseout = function() {this.style.color='Black';};
	            linkQue.onclick = function() {$('pCont').innerHTML = "Originarias de la India, se extendieron bastante por el mundo árabe sobre todo durante la época del Imperio Otomano.<br><br>"+
	            "Las pipas de agua estan construidas de cristal y se utilizan para fumar tabaco de sabores.<br><br>"+
	            "Dependiendo del lugar se las puede llamar de distintas formas.<br><br>Por ejemplo, en Líbano, Siria y Oriente Medio "+
	            "se las llama Narguile, mientras que en el Norte de Africa se las conoce como Shisha."};
	            $('contenidoMenu').appendChild(linkQue);
	            var linkComo = document.createElement('a');
	            linkComo.setAttribute('href','#');
	            linkComo.innerHTML = 'Como se prepara';
	            linkComo.style.position='absolute';
	            linkComo.style.left='95px';
	            linkComo.style.top='350px';
	            linkComo.style.color='Black';
	            linkComo.style.fontFamily='Arial';
	            linkComo.onclick = function() {$('pCont').innerHTML = "Lo primero que hacemos cuando pides una cachimba "+
	            "es encender el carbon para que se vaya calentando.<br>"+
	            "Despues preparamos el tabaco de sabor que nos hayas pedido y lo introducimos en la pequeña copa "+
	            "que hay encima de la cachimba. Lo cubrimos con papel de aluminio y cuidadosamente hacemos "+
	            "pequeños agujeros del tamaño preciso para que puedas disfrutar tu cachimba. <br><br>"+
	            "Por último añadimos una boquilla higiénica y te la servimos <br><br>"+
	            "Buen provecho!";} 
                linkComo.onmouseover = function() {this.style.color='DarkOrange';};
	            linkComo.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkComo);
	            var linkOfertas = document.createElement('a');
	            linkOfertas.setAttribute('href','ofertasOnline.pdf');
	            linkOfertas.innerHTML = 'Ofertas';
	            linkOfertas.style.position='absolute';
	            linkOfertas.style.left='95px';
	            linkOfertas.style.top='390px';
	            linkOfertas.style.color='Black';
	            linkOfertas.style.fontFamily='Arial';
	            linkOfertas.onmouseover = function() {this.style.color='DarkOrange';};
	            linkOfertas.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkOfertas);
	            var bullet1 = document.createElement('img');
	            bullet1.setAttribute('src','images/bulletLogo.jpg');
	            bullet1.style.position='absolute';
	            bullet1.style.left='50px';
	            bullet1.style.top='304px';
	            $('contenidoMenu').appendChild(bullet1);
	            var bullet2 = document.createElement('img');
	            bullet2.setAttribute('src','images/bulletLogo.jpg');
	            bullet2.style.position='absolute';
	            bullet2.style.left='50px';
	            bullet2.style.top='344px';
	            $('contenidoMenu').appendChild(bullet2);
	            var bullet3 = document.createElement('img');
	            bullet3.setAttribute('src','images/bulletLogo.jpg');
	            bullet3.style.position='absolute';
	            bullet3.style.left='50px';
	            bullet3.style.top='384px';
	            $('contenidoMenu').appendChild(bullet3);    
	            $('contenidoMenu').style.display = 'block';
	           }
		if (input=='tes'){
	    		var cerrarElement = document.createElement('a');
	    		cerrarElement.setAttribute('href','#');
	    		cerrarElement.innerHTML = 'cerrar';
	    		cerrarElement.style.position='absolute';
	    		cerrarElement.style.left='551px';
	    		cerrarElement.style.top='5px';
	    		cerrarElement.style.fontSize='16px';
	    		cerrarElement.style.color = 'DarkGray';
	    		cerrarElement.onmouseover = function() {this.style.color='DarkOrange';};
	            cerrarElement.onmouseout = function() {this.style.color='DarkGray';};
	    		cerrarElement.onclick = function() {cerrarContenido();};
	    		$('contenidoMenu').appendChild(cerrarElement);
	    		var inicioElement = document.createElement('a');
	    		inicioElement.setAttribute('href','#');
	    		inicioElement.style.position='absolute';
	    		inicioElement.style.left='555px';
	    		inicioElement.style.top='415px';
	    		inicioElement.style.fontSize='16px';
	    		inicioElement.style.color = 'DarkGray';
	    		inicioElement.innerHTML = 'inicio';
	    		inicioElement.onmouseover = function() {this.style.color='DarkOrange';};
	            inicioElement.onmouseout = function() {this.style.color='DarkGray';};
	    		inicioElement.onclick = function() {$('pCont').innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>"+
	            "Nuestros tés e infusiones son de primerísima calidad. Contamos con un distribuidor "+
	            "con más de 30 años de experiencia en esta campo que nos trae los tes "+ 
	            "de mejor calidad directamente de India, China, Japón y los primeros productores de té " +
	            "mundiales. <br><br> Tanto como si quieres probar los clásicos, o los exóticos tés de la época musulmana "+
	            " granadina estamos seguros de poder ofrecerte calidad superior y los auténticos."+
	            "<br><br>¡Os esperamos!";};
	    		$('contenidoMenu').appendChild(inicioElement);
		        var abuElement = document.createElement('img'); 
	            abuElement.setAttribute('src','images/temenu.jpg');
	            abuElement.style.position='absolute';
	            abuElement.style.left='25px';
	            abuElement.style.top='52px';
	            $('contenidoMenu').appendChild(abuElement);
	            var tituloElement = document.createElement('p');
	            tituloElement.innerHTML = 'Tes e Infusiones';
	            tituloElement.style.position='absolute';
	            tituloElement.style.left='320px';
	            tituloElement.style.top='25px';
	            tituloElement.style.color = 'Black';
	            tituloElement.style.fontSize='24px';
	            tituloElement.style.fontFamily='Arial';
	            $('contenidoMenu').appendChild(tituloElement);
	            var contElement = document.createElement('p');
	            contElement.innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>"+
	            "Nuestros tés e infusiones son de primerísima calidad. Contamos con un distribuidor "+
	            "con más de 30 años de experiencia en esta campo que nos trae los tes "+ 
	            "de mejor calidad directamente de India, China, Japón y los primeros productores de té " +
	            "mundiales. <br><br> Tanto como si quieres probar los clásicos, o los exóticos tés de la época musulmana "+
	            " granadina estamos seguros de poder ofrecerte calidad superior."+
	            "<br><br>¡Os esperamos!";
	            contElement.setAttribute('id','pCont');
	            contElement.style.position='absolute';
	            contElement.style.left='270px';
	            contElement.style.top='70px';
	            contElement.style.color = 'Black';
	            contElement.style.fontSize='16px';
	            contElement.style.fontFamily='Arial';
	            contElement.style.width='250px'; 
	            $('contenidoMenu').appendChild(contElement);
	            var linkQue = document.createElement('a');
	            linkQue.setAttribute('href','#');
	            linkQue.innerHTML = 'Que es?';
	            linkQue.style.position='absolute';
	            linkQue.style.left='95px';
	            linkQue.style.top='310px';
	            linkQue.style.color='Black';
	            linkQue.style.fontFamily='Arial';
	            linkQue.onmouseover = function() {this.style.color='DarkOrange';};
	            linkQue.onmouseout = function() {this.style.color='Black';};
	            linkQue.onclick = function() {$('pCont').innerHTML = "El té es una planta arbusto.<br><br>La costumbre de servirse de las hojas de té para conferir un buen sabor al agua hervida se utilizó por primera vez en la China hacia el 2500 a. C.<br><br> El té entró en contacto con los europeos por primera vez en la India, cuando los portugueses llegan a ella en 1497, ya que en la India el uso del té estaba muy extendido."};
	            $('contenidoMenu').appendChild(linkQue);
	            var linkComo = document.createElement('a');
	            linkComo.setAttribute('href','#');
	            linkComo.innerHTML = 'Como se prepara';
	            linkComo.style.position='absolute';
	            linkComo.style.left='95px';
	            linkComo.style.top='350px';
	            linkComo.style.color='Black';
	            linkComo.style.fontFamily='Arial';
	            linkComo.onclick = function() {$('pCont').innerHTML = "Porque preparar un té no es simplemente echar unas cuantas hojas en una tetera, nosotros damos mucha importancia a preparar cada té e infusión de la manera adecuada, como cada cultura lo ha preparado durante cientos de años. <br><br>Ésto, junto con los ingredientes de la más alta calidad, da a nuestros tes e infusiones un sabor puro y genuino, que los caracteriza.<br><br>No te conformes con menos, ven a Teteria La Oriental y saborea el placer del auténtico té.";} 
                linkComo.onmouseover = function() {this.style.color='DarkOrange';};
	            linkComo.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkComo);
	            var linkOfertas = document.createElement('a');
	            linkOfertas.setAttribute('href','ofertasOnline.pdf');
	            linkOfertas.innerHTML = 'Ofertas';
	            linkOfertas.style.position='absolute';
	            linkOfertas.style.left='95px';
	            linkOfertas.style.top='390px';
	            linkOfertas.style.color='Black';
	            linkOfertas.style.fontFamily='Arial';
	            linkOfertas.onmouseover = function() {this.style.color='DarkOrange';};
	            linkOfertas.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkOfertas);
	            var bullet1 = document.createElement('img');
	            bullet1.setAttribute('src','images/bulletLogo.jpg');
	            bullet1.style.position='absolute';
	            bullet1.style.left='50px';
	            bullet1.style.top='304px';
	            $('contenidoMenu').appendChild(bullet1);
	            var bullet2 = document.createElement('img');
	            bullet2.setAttribute('src','images/bulletLogo.jpg');
	            bullet2.style.position='absolute';
	            bullet2.style.left='50px';
	            bullet2.style.top='344px';
	            $('contenidoMenu').appendChild(bullet2);
	            var bullet3 = document.createElement('img');
	            bullet3.setAttribute('src','images/bulletLogo.jpg');
	            bullet3.style.position='absolute';
	            bullet3.style.left='50px';
	            bullet3.style.top='384px';
	            $('contenidoMenu').appendChild(bullet3);    
	            $('contenidoMenu').style.display = 'block';
		}
		if (input=='batidos'){
	    		var cerrarElement = document.createElement('a');
	    		cerrarElement.setAttribute('href','#');
	    		cerrarElement.innerHTML = 'cerrar';
	    		cerrarElement.style.position='absolute';
	    		cerrarElement.style.left='551px';
	    		cerrarElement.style.top='5px';
	    		cerrarElement.style.fontSize='16px';
	    		cerrarElement.style.color = 'DarkGray';
	    		cerrarElement.onmouseover = function() {this.style.color='DarkOrange';};
	            cerrarElement.onmouseout = function() {this.style.color='DarkGray';};
	    		cerrarElement.onclick = function() {cerrarContenido();};
	    		$('contenidoMenu').appendChild(cerrarElement);
	    		var inicioElement = document.createElement('a');
	    		inicioElement.setAttribute('href','#');
	    		inicioElement.style.position='absolute';
	    		inicioElement.style.left='555px';
	    		inicioElement.style.top='415px';
	    		inicioElement.style.fontSize='16px';
	    		inicioElement.style.color = 'DarkGray';
	    		inicioElement.innerHTML = 'inicio';
	    		inicioElement.onmouseover = function() {this.style.color='DarkOrange';};
	            inicioElement.onmouseout = function() {this.style.color='DarkGray';};
	    		inicioElement.onclick = function() {$('pCont').innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>"+
	            "Refrescantes y llenos de vitaminas. <br><br> Nosotros NO utilizamos zumos de botella. En Tetería La Oriental puedes estar tranquilo, para preparar nuestros deliciosos y nutritivos batidos, zumos y limonadas utilizamos productos naturales y frutas recién exprimidas. <br><br> Saborea el sabor de la naturaleza en Tetería La Oriental.";};
	    		$('contenidoMenu').appendChild(inicioElement);
		        var abuElement = document.createElement('img'); 
	            abuElement.setAttribute('src','images/zumo.jpg');
	            abuElement.style.position='absolute';
	            abuElement.style.left='25px';
	            abuElement.style.top='52px';
	            $('contenidoMenu').appendChild(abuElement);
	            var tituloElement = document.createElement('p');
	            tituloElement.innerHTML = 'Batidos y Zumos Naturales';
	            tituloElement.style.position='absolute';
	            tituloElement.style.width='300px';
	            tituloElement.style.left='270px';
	            tituloElement.style.top='25px';
	            tituloElement.style.color = 'Black';
	            tituloElement.style.fontSize='24px';
	            tituloElement.style.fontFamily='Arial';
	            $('contenidoMenu').appendChild(tituloElement);
	            var contElement = document.createElement('p');
	            contElement.innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>"+
	            "Refrescantes y llenos de vitaminas. <br><br> Nosotros NO utilizamos zumos de botella. En Tetería La Oriental puedes estar tranquilo, para preparar nuestros deliciosos y nutritivos batidos, zumos y limonadas utilizamos productos naturales y frutas recién exprimidas. <br><br> Saborea el sabor de la naturaleza en Tetería La Oriental.";
	            contElement.setAttribute('id','pCont');
	            contElement.style.position='absolute';
	            contElement.style.left='270px';
	            contElement.style.top='70px';
	            contElement.style.color = 'Black';
	            contElement.style.fontSize='16px';
	            contElement.style.fontFamily='Arial';
	            contElement.style.width='250px'; 
	            $('contenidoMenu').appendChild(contElement);
	            var linkQue = document.createElement('a');
	            linkQue.setAttribute('href','#');
	            linkQue.innerHTML = 'Que es?';
	            linkQue.style.position='absolute';
	            linkQue.style.left='95px';
	            linkQue.style.top='310px';
	            linkQue.style.color='Black';
	            linkQue.style.fontFamily='Arial';
	            linkQue.onmouseover = function() {this.style.color='DarkOrange';};
	            linkQue.onmouseout = function() {this.style.color='Black';};
	            linkQue.onclick = function() {$('pCont').innerHTML = "La fruta esta llena de vitaminas y ricos nutrientes que contribuyen al bienestar de nuestro cuerpo.<br><br> Además está riquísima...<br><br>Los zumos y batidos naturales son una manera de cuidarte mientras disfrutas del delicioso sabor de la fruta, yogur, y demas ingredientes naturales. <br><br>Platano, mango, naranja, almendras, ... prueba nuestros batidos y zumos naturales y no te arrepentiras."};
	            $('contenidoMenu').appendChild(linkQue);
	            var linkComo = document.createElement('a');
	            linkComo.setAttribute('href','#');
	            linkComo.innerHTML = 'Como se prepara';
	            linkComo.style.position='absolute';
	            linkComo.style.left='95px';
	            linkComo.style.top='350px';
	            linkComo.style.color='Black';
	            linkComo.style.fontFamily='Arial';
	            linkComo.onclick = function() {$('pCont').innerHTML = "Para que la fruta conserve sus vitaminas es imprescindible servirla cuanto antes.<br><br> Por eso cuando pides un batido, zumo, limonada,... en Teteria La Oriental lo preparamos en el momento y te lo servimos fresco. <br><br>Hemos estudiado cuidadosamente nuestras recetas en busca de un sabor único e ingredientes buenos para tu salud. <br><br> Porque nos importa la satisfacción de nuestros clientes.";}; 
                linkComo.onmouseover = function() {this.style.color='DarkOrange';};
	            linkComo.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkComo);
	            var linkOfertas = document.createElement('a');
	            linkOfertas.setAttribute('href','ofertasOnline.pdf');
	            linkOfertas.innerHTML = 'Ofertas';
	            linkOfertas.style.position='absolute';
	            linkOfertas.style.left='95px';
	            linkOfertas.style.top='390px';
	            linkOfertas.style.color='Black';
	            linkOfertas.style.fontFamily='Arial';
	            linkOfertas.onmouseover = function() {this.style.color='DarkOrange';};
	            linkOfertas.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkOfertas);
	            var bullet1 = document.createElement('img');
	            bullet1.setAttribute('src','images/bulletLogo.jpg');
	            bullet1.style.position='absolute';
	            bullet1.style.left='50px';
	            bullet1.style.top='304px';
	            $('contenidoMenu').appendChild(bullet1);
	            var bullet2 = document.createElement('img');
	            bullet2.setAttribute('src','images/bulletLogo.jpg');
	            bullet2.style.position='absolute';
	            bullet2.style.left='50px';
	            bullet2.style.top='344px';
	            $('contenidoMenu').appendChild(bullet2);
	            var bullet3 = document.createElement('img');
	            bullet3.setAttribute('src','images/bulletLogo.jpg');
	            bullet3.style.position='absolute';
	            bullet3.style.left='50px';
	            bullet3.style.top='384px';
	            $('contenidoMenu').appendChild(bullet3);    
	            $('contenidoMenu').style.display = 'block';
	           }
		if (input=='cafes'){
	    		var cerrarElement = document.createElement('a');
	    		cerrarElement.setAttribute('href','#');
	    		cerrarElement.innerHTML = 'cerrar';
	    		cerrarElement.style.position='absolute';
	    		cerrarElement.style.left='551px';
	    		cerrarElement.style.top='5px';
	    		cerrarElement.style.fontSize='16px';
	    		cerrarElement.style.color = 'DarkGray';
	    		cerrarElement.onmouseover = function() {this.style.color='DarkOrange';};
	            cerrarElement.onmouseout = function() {this.style.color='DarkGray';};
	    		cerrarElement.onclick = function() {cerrarContenido();};
	    		$('contenidoMenu').appendChild(cerrarElement);
	    		var inicioElement = document.createElement('a');
	    		inicioElement.setAttribute('href','#');
	    		inicioElement.style.position='absolute';
	    		inicioElement.style.left='555px';
	    		inicioElement.style.top='415px';
	    		inicioElement.style.fontSize='16px';
	    		inicioElement.style.color = 'DarkGray';
	    		inicioElement.innerHTML = 'inicio';
	    		inicioElement.onmouseover = function() {this.style.color='DarkOrange';};
	            inicioElement.onmouseout = function() {this.style.color='DarkGray';};
	    		inicioElement.onclick = function() {$('pCont').innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>Aunque somos una tetería contamos con uno de los mas sabrosos cafés de Granada.<br><br>Nuestro café es SIEMPRE café 100% Arábica por eso el sabor es inconfudible.<br><br> Te ofrecemos además cafés del mundo árabe y occidental y exclusivas recetas propias.<br><br>Os esperamos!";};
	    		$('contenidoMenu').appendChild(inicioElement);
		        var abuElement = document.createElement('img'); 
	            abuElement.setAttribute('src','images/cafemenu.jpg');
	            abuElement.style.position='absolute';
	            abuElement.style.left='25px';
	            abuElement.style.top='52px';
	            $('contenidoMenu').appendChild(abuElement);
	            var tituloElement = document.createElement('p');
	            tituloElement.innerHTML = 'Cafés';
	            tituloElement.style.position='absolute';
	            tituloElement.style.left='320px';
	            tituloElement.style.top='25px';
	            tituloElement.style.color = 'Black';
	            tituloElement.style.fontSize='24px';
	            tituloElement.style.fontFamily='Arial';
	            $('contenidoMenu').appendChild(tituloElement);
	            var contElement = document.createElement('p');
	            contElement.innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>Aunque somos una tetería contamos con uno de los mas sabrosos cafés de Granada.<br><br>Nuestro café es SIEMPRE café 100% Arábica por eso el sabor es inconfudible.<br><br> Te ofrecemos además cafés del mundo árabe y occidental y exclusivas recetas propias.<br><br>Os esperamos!";
	            contElement.setAttribute('id','pCont');
	            contElement.style.position='absolute';
	            contElement.style.left='270px';
	            contElement.style.top='70px';
	            contElement.style.color = 'Black';
	            contElement.style.fontSize='16px';
	            contElement.style.fontFamily='Arial';
	            contElement.style.width='250px'; 
	            $('contenidoMenu').appendChild(contElement);
	            var linkQue = document.createElement('a');
	            linkQue.setAttribute('href','#');
	            linkQue.innerHTML = 'Que es?';
	            linkQue.style.position='absolute';
	            linkQue.style.left='95px';
	            linkQue.style.top='310px';
	            linkQue.style.color='Black';
	            linkQue.style.fontFamily='Arial';
	            linkQue.onmouseover = function() {this.style.color='DarkOrange';};
	            linkQue.onmouseout = function() {this.style.color='Black';};
	            linkQue.onclick = function() {$('pCont').innerHTML = "El café es una planta que se cree tiene origen en Etiopía.<br><br> Al parecer las tribus africanas que sabían desde la Antiguedad del café molian sus granos y utilizban la pasta para alimentar a los animales y aumentar la fuerza de los guerreros.<br><br> Los musulmanes lo dieron a conocer al resto del mundo con el nombre de Qahwa."};
	            $('contenidoMenu').appendChild(linkQue);
	            var linkComo = document.createElement('a');
	            linkComo.setAttribute('href','#');
	            linkComo.innerHTML = 'Como se prepara';
	            linkComo.style.position='absolute';
	            linkComo.style.left='95px';
	            linkComo.style.top='350px';
	            linkComo.style.color='Black';
	            linkComo.style.fontFamily='Arial';
	            linkComo.onclick = function() {$('pCont').innerHTML = "Con café 100% Arábica y recetas muy estudiadas preparamos un café exquisito capaz de satisfacer a los paladares más exigentes. <br><br>Tanto como si te gusta lo clásico o prefieres atreverte con un cafe árabe o turco tenemos confianza en que no te decepcionaremos. <br><br>No dudes en pasarte por La Oriental y disfrutar el placer del buen café.";} 
                linkComo.onmouseover = function() {this.style.color='DarkOrange';};
	            linkComo.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkComo);
	            var linkOfertas = document.createElement('a');
	            linkOfertas.setAttribute('href','ofertasOnline.pdf');
	            linkOfertas.innerHTML = 'Ofertas';
	            linkOfertas.style.position='absolute';
	            linkOfertas.style.left='95px';
	            linkOfertas.style.top='390px';
	            linkOfertas.style.color='Black';
	            linkOfertas.style.fontFamily='Arial';
	            linkOfertas.onmouseover = function() {this.style.color='DarkOrange';};
	            linkOfertas.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkOfertas);
	            var bullet1 = document.createElement('img');
	            bullet1.setAttribute('src','images/bulletLogo.jpg');
	            bullet1.style.position='absolute';
	            bullet1.style.left='50px';
	            bullet1.style.top='304px';
	            $('contenidoMenu').appendChild(bullet1);
	            var bullet2 = document.createElement('img');
	            bullet2.setAttribute('src','images/bulletLogo.jpg');
	            bullet2.style.position='absolute';
	            bullet2.style.left='50px';
	            bullet2.style.top='344px';
	            $('contenidoMenu').appendChild(bullet2);
	            var bullet3 = document.createElement('img');
	            bullet3.setAttribute('src','images/bulletLogo.jpg');
	            bullet3.style.position='absolute';
	            bullet3.style.left='50px';
	            bullet3.style.top='384px';
	            $('contenidoMenu').appendChild(bullet3);    
	            $('contenidoMenu').style.display = 'block';
	           }
		if (input=='crepes'){
	    		var cerrarElement = document.createElement('a');
	    		cerrarElement.setAttribute('href','#');
	    		cerrarElement.innerHTML = 'cerrar';
	    		cerrarElement.style.position='absolute';
	    		cerrarElement.style.left='551px';
	    		cerrarElement.style.top='5px';
	    		cerrarElement.style.fontSize='16px';
	    		cerrarElement.style.color = 'DarkGray';
	    		cerrarElement.onmouseover = function() {this.style.color='DarkOrange';};
	            cerrarElement.onmouseout = function() {this.style.color='DarkGray';};
	    		cerrarElement.onclick = function() {cerrarContenido();};
	    		$('contenidoMenu').appendChild(cerrarElement);
	    		var inicioElement = document.createElement('a');
	    		inicioElement.setAttribute('href','#');
	    		inicioElement.style.position='absolute';
	    		inicioElement.style.left='555px';
	    		inicioElement.style.top='415px';
	    		inicioElement.style.fontSize='16px';
	    		inicioElement.style.color = 'DarkGray';
	    		inicioElement.innerHTML = 'inicio';
	    		inicioElement.onmouseover = function() {this.style.color='DarkOrange';};
	            inicioElement.onmouseout = function() {this.style.color='DarkGray';};
	    		inicioElement.onclick = function() {$('pCont').innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>Tenemos crepes dulces y salados.<br><br>Tu eliges si quieres comer un saciante y sano crepe vegetariano, mediterraneo con atún o un crepe postre malibu con chocolate, platano y nata.<br><br>Tenemos fama de tener los mejores crepes y no es por casualidad.";};
	    		$('contenidoMenu').appendChild(inicioElement);
		        var abuElement = document.createElement('img'); 
	            abuElement.setAttribute('src','images/crepemenu.jpg');
	            abuElement.style.position='absolute';
	            abuElement.style.left='25px';
	            abuElement.style.top='52px';
	            $('contenidoMenu').appendChild(abuElement);
	            var tituloElement = document.createElement('p');
	            tituloElement.innerHTML = 'Crepes Dulces y Salados';
	            tituloElement.style.position='absolute';
	            tituloElement.style.left='270px';
	            tituloElement.style.top='25px';
	            tituloElement.style.color = 'Black';
	            tituloElement.style.fontSize='24px';
	            tituloElement.style.fontFamily='Arial';
	            $('contenidoMenu').appendChild(tituloElement);
	            var contElement = document.createElement('p');
	            contElement.innerHTML = "Bienvenidos a Teteria La Oriental.<br><br>Tenemos crepes dulces y salados.<br><br>Tu eliges si quieres comer un saciante y sano crepe vegetariano, mediterraneo con atún o un crepe postre malibu con chocolate, platano y nata.<br><br>Tenemos fama de tener los mejores crepes y no es por casualidad.";
	            contElement.setAttribute('id','pCont');
	            contElement.style.position='absolute';
	            contElement.style.left='270px';
	            contElement.style.top='70px';
	            contElement.style.color = 'Black';
	            contElement.style.fontSize='16px';
	            contElement.style.fontFamily='Arial';
	            contElement.style.width='250px'; 
	            $('contenidoMenu').appendChild(contElement);
	            var linkQue = document.createElement('a');
	            linkQue.setAttribute('href','#');
	            linkQue.innerHTML = 'Que es?';
	            linkQue.style.position='absolute';
	            linkQue.style.left='95px';
	            linkQue.style.top='310px';
	            linkQue.style.color='Black';
	            linkQue.style.fontFamily='Arial';
	            linkQue.onmouseover = function() {this.style.color='DarkOrange';};
	            linkQue.onmouseout = function() {this.style.color='Black';};
	            linkQue.onclick = function() {$('pCont').innerHTML = "Los crêpes son originarios de la región de Bretaña, al oeste de Francia, en donde se llaman krampouezh.<br><br> Actualmente es un plato consumido a diario en todo el país europeo. <br><br>La masa esta principalmente compuesta de leche,huevos, y azucar además de otros ingredientes que añadimos a nuestra receta y que le dan un toque especial."};
	            $('contenidoMenu').appendChild(linkQue);
	            var linkComo = document.createElement('a');
	            linkComo.setAttribute('href','#');
	            linkComo.innerHTML = 'Como se prepara';
	            linkComo.style.position='absolute';
	            linkComo.style.left='95px';
	            linkComo.style.top='350px';
	            linkComo.style.color='Black';
	            linkComo.style.fontFamily='Arial';
	            linkComo.onclick = function() {$('pCont').innerHTML = "En Tetería La Oriental preparamos todos nuestros crepes in situ y a partir de ingredientes base.<br><br>Además no llevan ningun tipo de aditivo artificial.<br><br>La mezcla de la masa lleva además de otros, harina de trigo, huevos y leche, como siempre todo de la mejor calidad.";} 
                linkComo.onmouseover = function() {this.style.color='DarkOrange';};
	            linkComo.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkComo);
	            var linkOfertas = document.createElement('a');
	            linkOfertas.setAttribute('href','ofertasOnline.pdf');
	            linkOfertas.innerHTML = 'Ofertas';
	            linkOfertas.style.position='absolute';
	            linkOfertas.style.left='95px';
	            linkOfertas.style.top='390px';
	            linkOfertas.style.color='Black';
	            linkOfertas.style.fontFamily='Arial';
	            linkOfertas.onmouseover = function() {this.style.color='DarkOrange';};
	            linkOfertas.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkOfertas);
	            var bullet1 = document.createElement('img');
	            bullet1.setAttribute('src','images/bulletLogo.jpg');
	            bullet1.style.position='absolute';
	            bullet1.style.left='50px';
	            bullet1.style.top='304px';
	            $('contenidoMenu').appendChild(bullet1);
	            var bullet2 = document.createElement('img');
	            bullet2.setAttribute('src','images/bulletLogo.jpg');
	            bullet2.style.position='absolute';
	            bullet2.style.left='50px';
	            bullet2.style.top='344px';
	            $('contenidoMenu').appendChild(bullet2);
	            var bullet3 = document.createElement('img');
	            bullet3.setAttribute('src','images/bulletLogo.jpg');
	            bullet3.style.position='absolute';
	            bullet3.style.left='50px';
	            bullet3.style.top='384px';
	            $('contenidoMenu').appendChild(bullet3);    
	            $('contenidoMenu').style.display = 'block';
	           }
	           if (input=='pizzas'){
	    		var cerrarElement = document.createElement('a');
	    		cerrarElement.setAttribute('href','#');
	    		cerrarElement.innerHTML = 'cerrar';
	    		cerrarElement.style.position='absolute';
	    		cerrarElement.style.left='551px';
	    		cerrarElement.style.top='5px';
	    		cerrarElement.style.fontSize='16px';
	    		cerrarElement.style.color = 'DarkGray';
	    		cerrarElement.onmouseover = function() {this.style.color='DarkOrange';};
	            cerrarElement.onmouseout = function() {this.style.color='DarkGray';};
	    		cerrarElement.onclick = function() {cerrarContenido();};
	    		$('contenidoMenu').appendChild(cerrarElement);
	    		var inicioElement = document.createElement('a');
	    		inicioElement.setAttribute('href','#');
	    		inicioElement.style.position='absolute';
	    		inicioElement.style.left='555px';
	    		inicioElement.style.top='415px';
	    		inicioElement.style.fontSize='16px';
	    		inicioElement.style.color = 'DarkGray';
	    		inicioElement.innerHTML = 'inicio';
	    		inicioElement.onmouseover = function() {this.style.color='DarkOrange';};
	            inicioElement.onmouseout = function() {this.style.color='DarkGray';};
	    		inicioElement.onclick = function() {$('pCont').innerHTML = "Bienvenidos a Tetería a La Oriental!<br><br> Nos complace presentaros nuestros producto estrellas: el tradicional batbot marroquí y la pizza moruna. <br><br>El batbot es un pan tradicional marroquí que rellenamos de carne, pescado o verduras y se sirve con ensalada y salsas.<br><br>La pizza moruna es una creación propia basada en un producto tradicional marroquí.<br><br>No te lo pierdas, seguro que te gusta!";};
	    		$('contenidoMenu').appendChild(inicioElement);
		        var abuElement = document.createElement('img'); 
	            abuElement.setAttribute('src','images/batbotmenu.jpg');
	            abuElement.style.position='absolute';
	            abuElement.style.left='25px';
	            abuElement.style.top='52px';
	            $('contenidoMenu').appendChild(abuElement);
	            var tituloElement = document.createElement('p');
	            tituloElement.innerHTML = 'Batbos y Pizzas Morunas';
	            tituloElement.style.position='absolute';
	            tituloElement.style.left='270px';
	            tituloElement.style.top='25px';
	            tituloElement.style.color = 'Black';
	            tituloElement.style.fontSize='24px';
	            tituloElement.style.fontFamily='Arial';
	            $('contenidoMenu').appendChild(tituloElement);
	            var contElement = document.createElement('p');
	            contElement.innerHTML = "Bienvenidos a Tetería a La Oriental!<br><br> Nos complace presentaros nuestros producto estrellas: el tradicional batbot marroquí y la pizza moruna. <br><br>El batbot es un pan tradicional marroquí que rellenamos de carne, pescado o verduras y se sirve con ensalada y salsas.<br><br>La pizza moruna es una creación propia basada en un producto tradicional marroquí.<br><br>No te lo pierdas, seguro que te gusta!";
	            contElement.setAttribute('id','pCont');
	            contElement.style.position='absolute';
	            contElement.style.left='270px';
	            contElement.style.top='70px';
	            contElement.style.color = 'Black';
	            contElement.style.fontSize='16px';
	            contElement.style.fontFamily='Arial';
	            contElement.style.width='250px'; 
	            $('contenidoMenu').appendChild(contElement);
	            var linkQue = document.createElement('a');
	            linkQue.setAttribute('href','#');
	            linkQue.innerHTML = 'Que es?';
	            linkQue.style.position='absolute';
	            linkQue.style.left='95px';
	            linkQue.style.top='310px';
	            linkQue.style.color='Black';
	            linkQue.style.fontFamily='Arial';
	            linkQue.onmouseover = function() {this.style.color='DarkOrange';};
	            linkQue.onmouseout = function() {this.style.color='Black';};
	            linkQue.onclick = function() {$('pCont').innerHTML = "Los Batbots han sido consumidos tradicionalmente durante cientos de años por los pueblos bereberes y marroquíes.<br><br>Ahora Tetería La Oriental los introduce en el mundo occidental para nuestros clientes.<br><br>Verdaderamente deliciosos!<br><br> Déjanos invitarte a un almuerzo o cena al estilo La Oriental."};
	            $('contenidoMenu').appendChild(linkQue);
	            var linkComo = document.createElement('a');
	            linkComo.setAttribute('href','#');
	            linkComo.innerHTML = 'Como se prepara';
	            linkComo.style.position='absolute';
	            linkComo.style.left='95px';
	            linkComo.style.top='350px';
	            linkComo.style.color='Black';
	            linkComo.style.fontFamily='Arial';
	            linkComo.onclick = function() {$('pCont').innerHTML = "Desde el pan en los batbots o la masa de nuestras pizzas morunas hastas los rellenos y toppings todo es preparado artesanalmente a partir de ingredientes base y sin ningún tipo de aditivos.<br><br>Con esmero y mimo nuestras manos expertas amasan el pan y la masa de pizza moruna para que quede en su justo punto.<br><br>Todo ello aderezado con salsas, ensaladas árabes y cuscus.<br><br>Un festival de sabores!";} 
                linkComo.onmouseover = function() {this.style.color='DarkOrange';};
	            linkComo.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkComo);
	            var linkOfertas = document.createElement('a');
	            linkOfertas.setAttribute('href','ofertasOnline.pdf');
	            linkOfertas.innerHTML = 'Ofertas';
	            linkOfertas.style.position='absolute';
	            linkOfertas.style.left='95px';
	            linkOfertas.style.top='390px';
	            linkOfertas.style.color='Black';
	            linkOfertas.style.fontFamily='Arial';
	            linkOfertas.onmouseover = function() {this.style.color='DarkOrange';};
	            linkOfertas.onmouseout = function() {this.style.color='Black';};
	            $('contenidoMenu').appendChild(linkOfertas);
	            var bullet1 = document.createElement('img');
	            bullet1.setAttribute('src','images/bulletLogo.jpg');
	            bullet1.style.position='absolute';
	            bullet1.style.left='50px';
	            bullet1.style.top='304px';
	            $('contenidoMenu').appendChild(bullet1);
	            var bullet2 = document.createElement('img');
	            bullet2.setAttribute('src','images/bulletLogo.jpg');
	            bullet2.style.position='absolute';
	            bullet2.style.left='50px';
	            bullet2.style.top='344px';
	            $('contenidoMenu').appendChild(bullet2);
	            var bullet3 = document.createElement('img');
	            bullet3.setAttribute('src','images/bulletLogo.jpg');
	            bullet3.style.position='absolute';
	            bullet3.style.left='50px';
	            bullet3.style.top='384px';
	            $('contenidoMenu').appendChild(bullet3);    
	            $('contenidoMenu').style.display = 'block';
	           }
}

function cerrarContenido(){
	    $('contenidoMenu').style.display='none';
	    $('contenidoMenu').innerHTML = "&nbsp";
	}
function showClasicos(){
	currentStep = 1;
	totalSteps = 10;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('cargandoDiv').style.display = 'none';
		$('entries').style.display = 'block';
	}
	$('cargandoDiv').style.display = 'block';
	new Ajax.Updater('tesDiv','../php/clasicos.php',{method:'post',evalScripts:true});
}

function showMundo(){
	currentStep = 1;
	totalSteps = 16;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('cargandoDiv').style.display = 'none';
		$('entries').style.display = 'block';
	}
	$('cargandoDiv').style.display = 'block';
	new Ajax.Updater('tesDiv','../php/mundo.php',{method:'post',evalScripts:true});
}

function showAndalus(){
	currentStep = 1;
	totalSteps = 8;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		$('cargandoDiv').style.display = 'none';
		$('entries').style.display = 'block';
	}
	$('cargandoDiv').style.display = 'block';
	new Ajax.Updater('tesDiv','../php/andalus.php',{method:'post',evalScripts:true});
}

var html_string = '';
var prodHash = new Object();
var subTotalHash = new Object();
var precioHash = new Object();
var counter = 0;
var cantidad;
var total = 0;

function addToCart(producto,precio){
		_uacct = "UA-4894080-1";
		urchinTracker('/addToCART');
		total = total + precio;
		precioHash[producto] = parseFloat(precio).toFixed(2); 
		if (prodHash[producto]){
			prodHash[producto] = prodHash[producto]+=1;
			html_string = '';
			for (var i in prodHash){
			if (prodHash[i]!=0){
				cantidad = prodHash[i];
				producto = i;
				subTotal = (parseFloat(precioHash[producto]*cantidad)).toFixed(2);
				subTotalHash[i] = subTotal; 
				html_string = html_string + 
					"<tr><td width=10px style='text-align:left;font-size:11px;'>" +
					cantidad +
					"</td><td width=90px style='text-align:left;font-style:italic;font-size:11px;'>"+
					producto + " - Paq. 100g" +
					"</td><td width=70px style='text-align:right;font-size:11px;'>"+
					subTotal +
					"</td></tr>";	
			}
			}
		}
		else{
			cantidad = prodHash[producto] = 1;
			subTotal = (parseFloat(precio*cantidad)).toFixed(2); 
			subTotalHash[producto] = subTotal;
			html_string = html_string + 
			"<tr><td width=10px style='text-align:left;font-size:11px;'>" +
			cantidad +
			"</td><td width=90px style='text-align:left;font-style:italic;font-size:11px;'>"+
			producto + " - Paq. 100g" +
			"</td><td width=70px style='text-align:right;font-size:11px;'>"+
			subTotal +
			"</td></tr>";
		}
		
		Element.update('cartTable',html_string);
		Element.update('total',"Total&nbsp;&nbsp;&nbsp;" + total.toFixed(2) + " &euro;");
		$('enviarCant').value = total.toFixed(2);
}

function fillCart(){
		var top = -30;
		var value;
		var producto;
		var subTotal;
		for (var i in prodHash){
		if (prodHash[i]!=null){
			value = prodHash[i];
			top = top + 30;
			producto=i;
			subTotal = subTotalHash[producto];
			new Insertion.Bottom('cambiarCartTable',
			'<tr><td style="position:absolute;left:0px;top:'+top+'px;"> <input type="text" value="'+value+'"style="width:21px;text-align:center;" onChange="changed(this,\''+ producto + '\');"></td>'+
			'<td style="position:absolute;left:79px;top:'+(top+6)+'px;font-size:14px;font-style:italic;color:black">'+producto+' - Paq. 100g</td>'+
			'<td style="position:absolute;width:48px;text-align:right;left:289px;top:'+(top+6)+'px;font-size:14px;font-style:italic;color:black">'+subTotal+' &euro;</td>'+
			'<td style="position:absolute;left:385px;top:'+(top)+'px;"><input type="button" value="Eliminar" onClick="eliminar(\''+producto+'\')"></td></tr>')
		}
		}
}
function eliminar(producto){
	prodHash[producto] = 0;
	subTotalHash[producto] = 0;
	total = 0;
	for (var j in subTotalHash){
			total = total + parseFloat(subTotalHash[j]);
	}
	html_string = '';
	for (var i in prodHash){
		if (prodHash[i]!= 0){
				producto = i; 
				html_string = html_string + 
					"<tr><td width=10px style='text-align:left;font-size:11px;'>" +
					prodHash[i] +
					"</td><td width=90px style='text-align:left;font-style:italic;font-size:11px;'>"+
					producto + " - Paq. 100g" +
					"</td><td width=70px style='text-align:right;font-size:11px;'>"+
					subTotalHash[i] +
					"</td></tr>";	
		}
	}
		Element.update('cartTable',html_string);
		Element.update('total',"Total&nbsp;&nbsp;&nbsp;" + total.toFixed(2) + " &euro;");
		$('enviarCant').value = total.toFixed(2);
		Element.update('cambiarCartTable','');
		fillCart();
}
function changed(inputElement,producto){
		var newValue = inputElement.value;
		var precio = precioHash[producto];
		prodHash[producto] = parseInt(newValue);
		subTotalHash[producto] = (parseFloat(precio*parseInt(newValue))).toFixed(2);
		total = 0;
		for (var j in subTotalHash){
			total = total + parseFloat(subTotalHash[j]);
		}
		html_string = '';
		for (var i in prodHash){
		if (prodHash[i]!=0){
				producto = i; 
				html_string = html_string + 
					"<tr><td width=10px style='text-align:left;font-size:11px;'>" +
					prodHash[producto] +
					"</td><td width=90px style='text-align:left;font-style:italic;font-size:11px;'>"+
					producto + " - Paq. 100g" +
					"</td><td width=70px style='text-align:right;font-size:11px;'>"+
					subTotalHash[i] +
					"</td></tr>";	
		}
		}
		Element.update('cartTable',html_string);
		Element.update('total',"Total&nbsp;&nbsp;&nbsp;" + total.toFixed(2) + " &euro;");
		$('enviarCant').value = total.toFixed(2);
		Element.update('cambiarCartTable','');
		fillCart();
}
function cambiarCart(){
	currentStep = 1;
	totalSteps = 1;
	$('cargandoP').innerHTML = "Cargando... 0%";
	updateF = function(c,t){
		$('cargandoP').innerHTML = "Cargando... " + parseInt((100*c)/t) + '%';
	}
	completeF = function(){
		fillCart();
		$('cargandoDiv').style.display = 'none';
		fadeIn('tesDiv',1000);
			
	}
	$('cargandoDiv').style.display='block';
	fadeOut('tesDiv',1000);
	setTimeout("new Ajax.Updater('tesDiv','../php/cambiarCart.php',{method:'post',evalScripts:true})",1100);
}

function enviarArticulos(){
	_uacct = "UA-4894080-1";
	urchinTracker('/pagar');
	var saleRef = '';
	for (var i in prodHash){
		saleRef = saleRef + ' - ' + i + ':' + prodHash[i];
	}
	var d = new Date();
	var fecha = "Fecha pedido: " + d.getDate() +"/"+ (d.getMonth()+1)+"/"+d.getFullYear();
	$('saleRefId').value = saleRef;
	$('fecha').value = fecha; 
}

function fadeIn(id,ms){
	if (ms == null){
		ms = 1000;
	}
	changeOpac(0,id)
	opacity(id,0,100,ms)
}

function fadeOut(id,ms) {
	if (ms == null){
		ms = 1000;
	}
	opacity(id,100,0,ms);
}

function move(id,x,y){
	document.getElementById(id).style.left = x + 'px';
	document.getElementById(id).style.top = y + 'px';
}

function changeTeImage() {
        newImage = "url(../es/images/carta/teHover.jpg)";
        document.getElementById('aTeDiv').style.backgroundImage = newImage;
}	

function changeTeImageBack() {
        newImage = "url(../es/images/carta/te.jpg)";
        document.getElementById('aTeDiv').style.backgroundImage = newImage;
}

function changeBatImage() {
        newImage = "url(../es/images/carta/batidoHover.jpg)";
        document.getElementById('aBatidoDiv').style.backgroundImage = newImage;
}	

function changeBatImageBack() {
        newImage = "url(../es/images/carta/batido.jpg)";
        document.getElementById('aBatidoDiv').style.backgroundImage = newImage;
}

function changeCafImage() {
        newImage = "url(../es/images/carta/cafesHover.jpg)";
        document.getElementById('aCafesDiv').style.backgroundImage = newImage;
}	

function changeCafImageBack() {
        newImage = "url(../es/images/carta/cafes.jpg)";
        document.getElementById('aCafesDiv').style.backgroundImage = newImage;
}

function changeCreImage() {
        newImage = "url(../es/images/carta/crepesHover.jpg)";
        document.getElementById('aCrepesDiv').style.backgroundImage = newImage;
}	

function changeCreImageBack() {
        newImage = "url(../es/images/carta/crepes.jpg)";
        document.getElementById('aCrepesDiv').style.backgroundImage = newImage;
}

function changePizBatImage() {
        newImage = "url(../es/images/carta/pizzasBatbotsHover.jpg)";
        document.getElementById('aPizzasBatbotsDiv').style.backgroundImage = newImage;
}	

function changePizBatImageBack() {
        newImage = "url(../es/images/carta/pizzasBatbots.jpg)";
        document.getElementById('aPizzasBatbotsDiv').style.backgroundImage = newImage;
}

function changeCachImage() {
        newImage = "url(../es/images/carta/cachimbasHover.jpg)";
        document.getElementById('aCachimbasDiv').style.backgroundImage = newImage;
}	

function changeCachImageBack() {
        newImage = "url(../es/images/carta/cachimbas.jpg)";
        document.getElementById('aCachimbasDiv').style.backgroundImage = newImage;
}

