// JavaScript Document: por Marcelino Garcia Rico
//    Selectores de Eventos

var Rules = {
	
	  '#tab-principal:click': function(element) {
	 var app=element.id;
	 element.href='#'
	 new Ajax.Updater('left_menu','inicio_menu.asp',{
  		method: 'get',
  		evalScripts: true});
	 new Ajax.Updater('left_contenido','inicio_principal.asp',{
  		method: 'get',
  		evalScripts: true});	 
	 etiquetaseleccionada('tab-principal');
	 $('left').innerHTML="";
	 $('right').innerHTML="";
	 $('left').hide();
	 $('right').hide();
	 return false;
	},
  
  '#tab-restaurantes:click': function(element) {
	 var app=element.id;
	 element.href='#';
	  $('left_menu').innerHTML="";
	  $('left_contenido').innerHTML="";
	  $('left').show();
	  $('right').show();
	 new Ajax.Updater('left','restaurantes.asp',{
  		method: 'get',
  		evalScripts: true});
	 new Ajax.Updater('right','derecha.asp?noticiaslateral=restaurantes',{
  		method: 'get',
  		evalScripts: true});	 
	 etiquetaseleccionada('tab-restaurantes');
	 return false;
	},
	
	  '#tab-alojamientos:click': function(element) {
	 var app=element.id;
	 element.href='#';
	  $('left_menu').innerHTML="";
	  $('left_contenido').innerHTML="";
	  $('left').show();
	  $('right').show();
	 new Ajax.Updater('left','alojamientos.asp',{
  		method: 'get',
  		evalScripts: true});
	 new Ajax.Updater('right','derecha.asp?noticiaslateral=alojamientos',{
  		method: 'get',
  		evalScripts: true});
	etiquetaseleccionada('tab-alojamientos');
	 return false;
	},
	
	'#tab-actividades:click': function(element) {
	 var app=element.id;
	 element.href='#';
	  $('left_menu').innerHTML="";
	  $('left_contenido').innerHTML="";
	  $('left').show();
	  $('right').show();
	 new Ajax.Updater('left','ocio.asp',{
  		method: 'get',
  		evalScripts: true});
	 new Ajax.Updater('right','derecha.asp?noticiaslateral=ocio',{
  		method: 'get',
  		evalScripts: true});
	 etiquetaseleccionada('tab-actividades');
	 return false;
	},
	
	'#tab-productos:click': function(element) {
	 var app=element.id;
	 element.href='#';
	  $('left_menu').innerHTML="";
	  $('left_contenido').innerHTML="";
	  $('left').show();
	  $('right').show();
	 new Ajax.Updater('left','productos.asp',{
  		method: 'get',
  		evalScripts: true});
	 new Ajax.Updater('right','derecha.asp?noticiaslateral=productos',{
  		method: 'get',
  		evalScripts: true});
	 etiquetaseleccionada('tab-productos');
	 initLightbox();
	 return false;
	},
	
	'#tab-aturje:click': function(element) {
	 var app=element.id;
	 element.href='#';
	  $('left_menu').innerHTML="";
	  $('left_contenido').innerHTML="";
	  $('left').show();
	  $('right').show();
	 new Ajax.Updater('left','aturje.asp');
	 new Ajax.Updater('right','derecha.asp?noticiaslateral=alojamientos',{
  		method: 'get',
  		evalScripts: true});
	 etiquetaseleccionada('tab-aturje');
	 return false;
	},
	
	'#tab-galerias:click': function(element) {
	 var app=element.id;
	 element.href='#';
	  $('left_menu').innerHTML="";
	  $('left_contenido').innerHTML="";
	  $('left').show();
	  $('right').show();
	 new Ajax.Updater('left','articulos/galeriaimagenes.asp',{
  	 method: 'get',
  	 evalScripts: true});
	 new Ajax.Updater('right','derecha.asp?noticiaslateral=galeria',{
  	  method: 'get',
  	  evalScripts: true});
	 etiquetaseleccionada('tab-galerias');
	 var FO = {	movie:"flvplayer.swf",width:"425",height:"350",majorversion:"7",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",
		flashvars:"file=videos/Subidaalospilones.flv&image=videos/inicio.gif" };
	 var oScript = document.createElement("script");
     oScript.src = "ufo.js";
     document.body.appendChild(oScript);
	 //UFO.create(	FO, "player1");
	 return false;
	},
	
	'#cuerpo_alojamiento1:mouseover,#cuerpo_alojamiento2:mouseover,#cuerpo_alojamiento3:mouseover,#cuerpo_alojamiento4:mouseover,#cuerpo_alojamiento5:mouseover,#cuerpo_alojamiento6:mouseover,#cuerpo_alojamiento6:mouseover,#cuerpo_alojamiento7:mouseover,#cuerpo_alojamiento8:mouseover,#cuerpo_alojamiento9:mouseover,#cuerpo_alojamiento10:mouseover,#cuerpo_alojamiento11:mouseover,#cuerpo_alojamiento12:mouseover,#cuerpo_alojamiento13:mouseover,#cuerpo_alojamiento14:mouseover': function(element) {
	 var app=element.id;
   		 var app = element.id;
		 orden=element.readAttribute('orden');
		 //alert(orden);
		 //element.className='smallboxsel';
		 $('cuerpo_alojamiento'+orden).className='smallboxsel';
		 $('superior_alojamiento'+orden).className='smallboxtopsel';
		 //$(app).className='smallboxmo';
    	 //$('cuerpo_alojamiento1').bgcolor="cafe69";
		 //new Effect.BlindDown(app, {queue: 'end', duration: 0.2});
		 //alert("llega aqui");
	 return false;
	},
	
	'#cuerpo_alojamiento1:mouseout,#cuerpo_alojamiento2:mouseout,#cuerpo_alojamiento3:mouseout,#cuerpo_alojamiento4:mouseout,#cuerpo_alojamiento5:mouseout,#cuerpo_alojamiento6:mouseout,#cuerpo_alojamiento6:mouseout,#cuerpo_alojamiento7:mouseout,#cuerpo_alojamiento8:mouseout,#cuerpo_alojamiento9:mouseout,#cuerpo_alojamiento10:mouseout,#cuerpo_alojamiento11:mouseout,#cuerpo_alojamiento12:mouseout,#cuerpo_alojamiento13:mouseout,#cuerpo_alojamiento14:mouseout': function(element) {
	 var app=element.id;
   		 var app = element.id;
		 orden=element.readAttribute('orden');
		 $('cuerpo_alojamiento'+orden).className='smallbox';
		 $('superior_alojamiento'+orden).className='smallboxtop';
		 //$(app).className='smallboxmo';
    	 //$('cuerpo_alojamiento1').bgcolor="cafe69";
		 //new Effect.BlindDown(app, {queue: 'end', duration: 0.2});
		 //alert("llega aqui");
	 return false;
	},
	
	'#cuerpo_alojamiento1:click,#cuerpo_alojamiento2:click,#cuerpo_alojamiento3:click,#cuerpo_alojamiento4:click,#cuerpo_alojamiento5:click,#cuerpo_alojamiento6:click,#cuerpo_alojamiento6:click,#cuerpo_alojamiento7:click,#cuerpo_alojamiento8:click,#cuerpo_alojamiento9:click,#cuerpo_alojamiento10:click,#cuerpo_alojamiento11:click,#cuerpo_alojamiento12:click,#cuerpo_alojamiento13:click,#cuerpo_alojamiento14:click': function(element) {
	 var app=element.id;
   		 var app = element.id;
		 orden=element.readAttribute('orden');
		 	vfx.ivfx.style.display="block";
			vfx.contvfx.style.display="block";
		new Ajax.Updater('contvfx','datossocio.asp?socio='+orden,{
  		method: 'get',
		onComplete: function(){
			document.getElementById("vfxcancel").onclick=function(){
			vfx.contvfx.innerHTML = "";
			vfx.ivfx.style.display=vfx.contvfx.style.display="none";}
		},
  		evalScripts: true});
		
		//vfx.carga(true,"datossocio.asp?socio="+orden);		 
		 //$(app).className='smallboxmo';
    	 //$('cuerpo_alojamiento1').bgcolor="cafe69";
		 //new Effect.BlindDown(app, {queue: 'end', duration: 0.2});
		 //alert("llega aqui");
	 return false;
	}
	
}