/*******************************************************/
function abreVentana(mypage,myname,ancho,alto,posx,posy){ 
	w=ancho; h=alto; l=posx; t=posy; 
	settings ='height='+h+',width='+w+',top='+t+',left='+l+',scrollbars=yes,resizable=yes' 
	win = window.open(mypage,myname,settings); 
} 
/*******************************************************/
function pedirInformacion(url,capa,ver){
    var ajax = false;
	var cadena='';
	
	if (window.XMLHttpRequest) {
		ajax= new XMLHttpRequest();
	}else if (window.ActiveXObject) {
		ajax = new ActiveXObject("Microsoft.XMLHttp");
	}
   
   if(ajax) {
         ajax.open ('GET', url+'?verDatos='+ver, true);
         ajax.onreadystatechange = function() {
         if (ajax.readyState==1) {
				document.getElementById(capa).innerHTML='Cargando Datos...';
         }else if (ajax.readyState==4){
              if(ajax.status==200) {
				  cadena=unescape(ajax.responseText);
				  var cadenafinal=cadena.replace(/\+/gi," ");
				  document.getElementById(capa).innerHTML=cadenafinal;
			  }else if(ajax.status==404){
                      document.getElementById(capa).innerHTML = "Dirección erronea...";
                    }else {
                       document.getElementById(capa).innerHTML = "Error: ".ajax.status;
                    }
               }//else
         }//else if
		 ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
         ajax.send(null);
	}
    return;
}
/*******************************************************/
navHover = function() {
	var lis = document.getElementById("navmenu-h").getElementsByTagName("li");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
/*******************************************************/
//FUNCION PARA VER LA GALERIA DE LOS EXPOSITORES
function galeria() {
		
		$('ul#ListImg').addClass('gallery_demo'); // adds new class name to maintain degradability
		$('.nav').css('display','none'); // hides the nav initially
		
		$('ul#ListImg').galleria({
			history   : false, // deactivates the history object for bookmarking, back-button etc.
			clickNext : false, // helper for making the image clickable. Let's not have that in this example.
			insert    : undefined, // the containing selector for our main image. 
								   // If not found or undefined (like here), galleria will create a container 
								   // before the ul with the class .galleria_container (see CSS)
			//onImage   : function() { $('.nav').css('display','block'); } // shows the nav when the image is showing
			onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
				
				// fade in the image & caption
				image.css('display','none').fadeIn(1000);
				caption.css('display','none').fadeIn(1000);
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// fade out inactive thumbnail
				_li.siblings().children('img.selected').fadeTo(500,0.3);
				
				// fade in active thumbnail
				thumb.fadeTo('fast',1).addClass('selected');
				
				// add a title for the clickable image
				image.attr('title','Siguiente imagen >>').click(function(){$.galleria.next();});
			},
			onThumb : function(thumb) { // thumbnail effects goes here
				
				// fetch the thumbnail container
				var _li = thumb.parents('li');
				
				// if thumbnail is active, fade all the way.
				var _fadeTo = _li.is('.active') ? '1' : '0.3';
				
				// fade in the thumbnail when finnished loading
				thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
				
				// hover effects
				thumb.hover(
					function() { thumb.fadeTo('fast',1); },
					function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
				)
			}
		});
}//function galeria();