var menuCuenta = new Array (
	["document.location.href='/micuenta.asp';","MiCuenta"],
	["document.location.href='/micuenta_cambiodedatos.asp';","Actualización de datos"],
	["document.location.href='micuenta_cambiodeemail.asp';","Actualización de e-mail"],
	["document.location.href='micuenta_preferencias.asp';","Cambio de Preferencias"],
	["document.location.href='micuenta_cambiodeclave.asp';","Cambio de Clave"],
	["logOut();","Salir (LogOut)"]);
function initWebmanager(){
	//hideTrans();
	//updateOnload();
	showBannersNew();
}
thisTab = "";
javaBrs = /\n/gi;
window.is_w3cdom = (typeof document.getElementById != "undefined" && typeof document.getElementsByTagName != "undefined" && (typeof document.createElement != "undefined" || typeof document.createElementNS != "undefined"));
window.is_ie = (navigator.userAgent.toLowerCase().indexOf("msie") != -1 && navigator.userAgent.toLowerCase().indexOf("opera") == -1);
window.is_opera = navigator.userAgent.toLowerCase().indexOf("opera") != -1;
window.is_win = (navigator.userAgent.toLowerCase().indexOf("win") != -1);
window.is_mac = (navigator.userAgent.toLowerCase().indexOf("mac") != -1);
function GetXmlHttpObject(){
	var xmlHttp=null;
	try {
	  xmlHttp=new XMLHttpRequest();
	}catch (e){
		try{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		}
	return xmlHttp;
}
function showGaleria(index){
	if(index>lastGaleries.length){return;}
	var html = "<div class=\"galContainer\" onclick=\"document.location.href='/galerias.asp?idGaleria="+lastGaleries[index][0]+"'\">";	
	html+="<table cellspacing=0 cellpadding=0 border=0 width=375 style=\"table-layout:fixed;\">";
	html+="<col width=190><col width=180>";
	html+="<tr valign=top align=left>";
	html+="<td>";
	html+="<div class=galTitulo>"+lastGaleries[index][2]+"</div>";
	html+="<div class=galSubtitulo>"+lastGaleries[index][1]+" ("+lastGaleries[index][4]+" Fotos)</div>";
	html+="<div class=galSumilla>"+lastGaleries[index][6]+"</div>";
	html+="</td>"
	html+="<td>"
	html+="<a href=\"/galerias.asp?idGaleria="+lastGaleries[index][0]+"\">";
	html+="<img src=\"/store/galerias/"+lastGaleries[index][0]+"/"+lastGaleries[index][5].toString().replace("/","/144x106_")+"\" alt border=0 class=\"bevel noshine\" width=180 height=106 />";
	html+="</a>"
	html+="</td>"
	html+="</tr>"
	html+="</table>"
	html+="</div>"
	document.write(html); html=null;
}
function showGaleriaP(index){
	if(index>lastGaleries.length){return;}
	var html = "<div class=\"galContainerP\" onclick=\"document.location.href='/galerias.asp?idGaleria="+lastGaleries[index][0]+"'\">";	
	html+="<div class=galTituloP>"+lastGaleries[index][2]+"</div>";
	html+="<div class=galSubtituloP>"+lastGaleries[index][1]+" ("+lastGaleries[index][4]+" Fotos)</div>";
	html+="<div class=galFotoP>";
	html+="<a href=\"/galerias.asp?idGaleria="+lastGaleries[index][0]+"\">";
	html+="<img src=\"/store/galerias/"+lastGaleries[index][0]+"/"+lastGaleries[index][5].toString().replace("/","/360x270_")+"\" alt border=0 class=\"bevel noshine\" width=400 height=266 />";
	html+="</a>"
	html+="</div>";
	html+="<div class=galSumillaP>"+lastGaleries[index][6]+"</div>";
	html+="</div>";
	html+="</div>";
	document.write(html); html=null;
}
function setHeader(){
	if(document.getElementById("main-nav")){
		var lis = document.getElementById("main-nav").getElementsByTagName("LI")
		for(var i=0;i<lis.length;i++){if(lis[i].innerHTML.indexOf(estaPagina)!=-1){lis[i].className="active";}}
	}
	if(logonName!=""){
		document.getElementById("nologueado").style.display="none";
		document.getElementById("logueado").style.display="block";
		document.getElementById("logonName").innerHTML=logonName;
	}else{
		document.getElementById("nologueado").style.display="block";
		document.getElementById("logueado").style.display="none";			
	}
}
var maxHeight =0;
function reposObjects(){
	return;
	if(!repos){return;}
	if(estaPagina.toLowerCase().indexOf("index.asp")!=-1){return;}
	var sizes = getPageSize();
	if(document.getElementById("containerNegro")){var cn = document.getElementById("containerNegro");}else{return;}
	if(estaPagina.toLowerCase().indexOf("/galerias.asp")!=-1){var newSize = sizes[1]-230;}else{var newSize = sizes[1]-230;}
	if (maxHeight<newSize){maxHeight=newSize;}
	if(parseInt(cn.style.height,10)!=newSize){cn.style.height=maxHeight+"px";}
	
	if(idUsuario!="0"){
		if(document.getElementById("menuCuenta")){
			var posT=findPosY(document.getElementById("cuerpoTop"))
			var posTX=findPosX(document.getElementById("cuerpoTop"))
			document.getElementById("menuCuenta").style.top=(posT+15)+"px";
			document.getElementById("menuCuenta").style.left=(posTX+20)+"px";
			document.getElementById("menuCuenta").style.display="block";
		}
	}	
	
}
function reposObjects_old(){
	return;
	var sizes = getPageSize();var f = document.getElementById("footer") ;var c=document.getElementById("containerNegro");
	c.style.height="auto";var posF = findPosY(f);var posT=findPosY(document.getElementById("cuerpoTop"))
	var posB=findPosY(document.getElementById("cuerpoBottom"))
	if(sizes[1]<=sizes[3]){
		f.style.position="absolute";
		if((posF-posB)>16){
			c.style.height=(posF-posT-16)+"px";
		}else if ((posF-posB)<0){
			c.style.height="auto";
			f.style.position="relative";
		}
	}else{
		f.style.position="relative";
	}
	if(idUsuario!="0"){
		if(document.getElementById("menuCuenta")){
			var posTX=findPosX(document.getElementById("cuerpoTop"))
			document.getElementById("menuCuenta").style.top=(posT+15)+"px";
			document.getElementById("menuCuenta").style.left=(posTX+20)+"px";
			document.getElementById("menuCuenta").style.display="block";
		}
	}
}
function showMenuMiCuenta(){
	var html="<div id=menuCuenta>";
	html+="<div class=title>Opciones disponibles:</div>";
	for (var i=0;i<menuCuenta.length;i++){
		if (i==4){html+="<div style=\"height:10px;\"></div>";};
		html+="<div class=item onclick=\""+menuCuenta[i][0]+"\">"+menuCuenta[i][1]+"</div>";
	}
	html+="<div style=\"clear:both;\"></div>";
	html+="</div>";
	document.write(html);
}
function showLogin(){
	if(!document.getElementById('iframeLogin')){return;}
	hs.htmlExpand(document.getElementById('iframeLogin'),{objectType:'iframe',width:'530',height:'340',align:'center',allowWidthReduction:1,preserveContent:false});
}	
function togleButtons(obj){
	var cClassName=obj.className;if(cClassName==""){return;}
	if(cClassName.toString().toLowerCase().indexOf("hover")!=-1){obj.className=cClassName.replace("Hover","");}else{obj.className=cClassName+"Hover";}
}
function trimString (str) {
  str = this != window? this : str;
  return str.replace(/\s+/g, '');
}
String.prototype.trim = trimString;
function showHS(obj,t,w,h){
	hs.htmlExpand(obj,{objectType:t,width:w,height:h,allowWidthReduction:1,preserveContent:false});
}
function resizeHS(w,h) { 
	var exp = hs.getExpander();if (exp==null){return;}
	var args = {
	  width: w, 
	  height: h, 
	  dX: 0, 
	  dY: 0 
	}; 
	if (exp!=null){
		exp.resize(args); 
		exp.iframe.style.height = h+"px";
		exp.iframe.style.width = w+"px";
	}
}
function writeBannersDiv(id){
	if(id==null){return;}
	document.write("<div id=wmlBannersZone_"+id+"></div>");
}
function showBannersNew(){
	cBannerZone = "**";
	var thisDiv = null;
	for(var i=0;i<banners.length;i++){
		if(cBannerZone!=banners[i][0]){
			cBannerZone=banners[i][0];
			var sBanners = 0; 
			var totalBanners = bannersCountByZone(cBannerZone,banners);
			for(var x=i;x<banners.length;x++){
				if(banners[x][0]==cBannerZone){
					if (document.getElementById("wmlBannersZone_"+cBannerZone)){
						if((banners[x][11]=="-1")&&(totalBanners>parseInt(banners[x][9]))){
							var index2Show = Math.floor(Math.random()*totalBanners);
							showBannerRandom(x,index2Show,totalBanners);
							break;
						}else if (sBanners<=parseInt(banners[x][9])){
							thisDiv = document.getElementById("wmlBannersZone_"+cBannerZone);
							var html= showBanner(x);
							thisDiv.innerHTML+=html;html=null;
						}
						sBanners++;
					}
				}else{
					break;
				}
			}
		}
	}
}
function showBannerRandom(index,startIndex,totalB){
	if (startIndex==null){startIndex=0;}
	var banners2Show = banners[index][9];
	var beginBanner = startIndex;var cBanner = 0;var bannersShow = 0;var time2Show= parseInt(banners[index][12])*1000
	var thisDiv = document.getElementById("wmlBannersZone_"+banners[index][0]);thisDiv.innerHTML="";
	for(var i=index;i<banners.length;i++){
		if(banners[i][0]==banners[index][0]){
			if((cBanner>=startIndex)&&(bannersShow<banners2Show)){
				bannersShow++;var html= showBanner(i);thisDiv.innerHTML+=html;html=null;
				startIndex++;if(startIndex>=totalB){startIndex=0;}
			}
			cBanner++;
		}
	}
	setTimeout("showBannerRandom("+index+","+startIndex+","+totalB+")",time2Show);
}
function bannersCountByZone(zone,arr){
	var countBanners=0;for(var i=0;i<arr.length;i++){if(arr[i][0]==zone){countBanners++;}}return countBanners;
}
function showBanner(index){
	var html="";
	if (banners[index][4]!=""){html+="<div id=\"wmlbanner_"+banners[index][1]+"\" style=\""+banners[index][4]+"\">";}else{html+="<div id=\"wmlbanner_"+banners[index][1]+"\" style=\"margin-bottom:"+banners[index][5]+"px;\">";}
	banData = banners[index][8].toLowerCase().trim();
	var ext = banData.substr(banData.lastIndexOf(".")+1,3);
	if ((ext=="gif")||(ext=="jpg")){
		if(banners[index][10]!=""){html+="<a href=\""+banners[index][10]+"\">";}else{html+="<a target=\"_new\" href=\"/banners.asp?idbanner="+banners[index][1]+"\">";}
		html+="<img src=\"/store/banners/"+banners[index][1]+"/"+banners[index][8]+"\" border=0 ";
		if(banners[index][3]!=""){html+="style=\""+banners[index][3]+";\" ";}
		if(banners[index][6]!="0"){html+="width=\""+banners[index][6]+"\" ";}
		if(banners[index][7]!="0"){html+="height=\""+banners[index][7]+"\" ";}
		html+="></a>";
	}else{
		html+="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"  codebase=\"/\" width=\""+banners[index][6]+"\" height=\""+banners[index][7]+"\" id=\"wmlFlas_"+banners[index][1]+"\">";
		html+="<param name=\"movie\" value=\"/store/banners/"+banners[index][1]+"/"+banners[index][8]+"\">";
		html+="<param name=\"quality\" value=\"high\">";
		html+="<param name=\"wmode\" value=\"opaque\">";
		html+="<param name=\"menu\" value=\"false\">";
		html+="<embed src=\"/store/banners/"+banners[index][1]+"/"+banners[index][8]+"\" ";
		html+="width=\""+banners[index][6]+"\" height=\""+banners[index][7]+"\" quality=\"high\" ";
		html+="pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" ";
		html+="wmode=\"opaque\" menu=\"false\">";
		html+="</embed>";
		html+="</object>";
	}
	html+="</div>";	
	return html;
}

function showFaqs(obj){
	if(wmlFaqs.length==0){return;}
	if(obj!=null){
		var idFaq = parseInt(obj.id.toString().toLowerCase().replace("prefaq_",""));
		if(isNaN(idFaq)){return;}if(!document.getElementById("resFaq_"+idFaq)){return;}
		var res = document.getElementById("resFaq_"+idFaq);
		if (res.style.display=="block"){res.style.display="none";obj.style.fontWeight='normal';}else{res.style.display="block";obj.style.fontWeight='bold';}
		return;
	}
	var html = "<div id=\"wmlFaqsContainer\">";
	var cTitle="";openDiv=false;
	for (var i=0;i<wmlFaqs.length;i++){
		if(cTitle!=wmlFaqs[i][2]){
			html+="<div class=\"zonaTituloF\">"+wmlFaqs[i][2]+"</div>";cTitle=wmlFaqs[i][2];
		}
		html+="<div class=\"Lista\">";
		html+="<div title=\"pulsa aquí para mostrar u ocultar la respuesta.\" onmouseover=\"togleButtons(this);\" onmouseout=\"togleButtons(this);\" onclick=\"showFaqs(this);\" class=\"Pregunta\" id=\"preFaq_"+wmlFaqs[i][0]+"\">"+wmlFaqs[i][3].toUpperCase()+"</div>"
		html+="</div>";
		html+="<div class=\"Respuesta\" id=\"resFaq_"+wmlFaqs[i][0]+"\">"+wmlFaqs[i][4]+"</div>"
	}
	html+="</div>";
	document.write(html);html=null;
}
function getSWF(id,f,w,h){
	var html="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"/\" width=\""+w+"\" height=\""+h+"\" id=\""+id+"\">";
	html+="<param name=\"movie\" value=\""+f+".swf\">";
	html+="<param name=\"quality\" value=\"high\">";
	html+="<param name=\"wmode\" value=\"transparent\">";
	html+="<param name=\"menu\" value=\"false\">";
	html+="<embed src=\""+f+".swf\" width=\""+w+"\" height=\""+h+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" menu=\"false\">";
	html+="</embed>";
	html+="</object>";
	return html;html=null;
}
function showContenidosHome(){
	//var html="<a style=\"cursor:pointer;\" title=\"pulse aquí para ingresar al tour virtual\" href=\"/tours/tours.asp\" id=\"iframeTours\" onclick=\"return hs.htmlExpand(this, { contentId: 'popup-Tourvirtual', objectType: 'iframe',objectWidth:'700',objectHeight:'150',objectLoadTime:'after',allowWidthReduction:1,preserveContent: false} )\" class=\"highslide\">";
	var html="<a title=\"pulse aquí para ingresar al tour virtual\" href=\"/tours/tours.asp\"  onclick=\"return hs.htmlExpand(this, {objectType: 'iframe',width:'230',height:'230',preserveContent:false})\">";
	html+="<img src=\"/images/layout/titulo_tourvirtual.gif\" border=0>";
	html+="</a><br/>";
	html+="<img src=\"/images/banners/tours.gif\" border=0 width=160 height=80><br/>";
	//html+=getSWF("hometours","/images/banners/tours",160,70);
	if (contenidos.length!=0){
		html+="<img src=\"/images/layout/titulo_noticias.gif\" border=0>";
		for(var i=0;i<contenidos.length;i++){
			html+="<div class=contenidosHome onclick=\"gotoContenido('"+contenidos[i][0]+"','"+contenidos[i][1]+"');\">"+contenidos[i][2]+"</div>";
		}
	}
	document.write(html);html=null;
}	
function gotoContenido(id,idc){
	var destpage = "";
	switch (idc) {
		case "1":
			destpage = "/novedades.asp";break;
		case "2":
			destpage = "/nov_convenios.asp";break;		
		case "3":
			destpage = "/promociones.asp";break;
		case "4":
			destpage = "/nov_boletines.aspp";break;
		case "5":
			destpage = "/novedades.asp";break;	
		default:
			return;break;							
	}
	document.location.href=destpage+"?id="+id;
}

function getPageSize1()
{
var xScroll, yScroll;

if (window.innerHeight && window.scrollMaxY)
{
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
}
else if (document.body.scrollHeight > document.body.offsetHeight)
// all but Explorer Mac
{
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
}
else
// Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
{
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}

var windowWidth, windowHeight;

if (self.innerHeight)
// all except Explorer
{
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
// Explorer 6 Strict Mode
{
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
}
else if (document.body)
// other Explorers
{
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}

// for small pages with total height less then height of the viewport
if (yScroll < windowHeight)
pageHeight = windowHeight;
else
pageHeight = yScroll;

// for small pages with total width less then width of the viewport
if (xScroll < windowWidth)
pageWidth = windowWidth;
else
pageWidth = xScroll;

arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}


function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = window.innerWidth + window.scrollMaxX;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	if(xScroll < windowWidth){	
		pageWidth = xScroll;		
	} else {
		pageWidth = windowWidth;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}	
function getPageScroll(){
	var xScroll, yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
		xScroll = self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
		xScroll = document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
		xScroll = document.body.scrollLeft;	
	}
	arrayPageScroll = new Array(xScroll,yScroll) 
	return arrayPageScroll;
}	
function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
function nolink(){return;}
function logOut(){
	var acepta=window.confirm("¿Estás seguro que deseas terminar tu sesión?");
	if(acepta){document.location.href="/salir.asp";}else{return;}
}
var xmlLogin;
var loginData;
function showLoginPopupBox(mensaje){
	var posX = "20px"; var posY="20px";
	getPageSize();getPageScroll();
	if(document.getElementById("lbnormal")){document.getElementById("lbnormal").style.display="block";}
	if(document.getElementById("lbnoactivo")){document.getElementById("lbnoactivo").style.display="none";}	
	if(document.getElementById("loginMensaje")){document.getElementById("loginMensaje").innerHTML=mensaje;}
	if(arrayPageSize[0]>450){posX=parseInt(((arrayPageSize[0]-450)/2)+arrayPageScroll[0])+"px";}else{posX=(parseInt(posX)+arrayPageScroll[0])+"px";}
	if(arrayPageSize[3]>200){posY=parseInt(((arrayPageSize[3]-200)/2)+arrayPageScroll[1])+"px";}else{posY=(parseInt(posY)+arrayPageScroll[1])+"px";}	
	if(document.getElementById("coverDiv")){
		document.getElementById("coverDiv").style.width=(arrayPageSize[0]-5)+"px";
		document.getElementById("coverDiv").style.height=arrayPageSize[1]+"px";
		document.getElementById("coverDiv").style.display="block";
	}
	document.getElementById("loginPop").style.marginTop=posY;
	document.getElementById("loginPop").style.marginLeft=posX;	
	if(document.getElementById("musicTV")){document.getElementById("musicTV").style.display="none";}
	document.getElementById("loginPop").style.display = "block";
}
function doInpageLogin(objForm){
	var user_email = document.getElementById("user_email").value;
	var user_password = document.getElementById("user_password").value;
	var enviar = document.getElementById("loginDo");
	var enviarTitle = enviar.title; enviar.title = "por favor espere un momento\mientras el sistema procesa su solicitud...";
	var enviarValue = enviar.value; enviar.value = "procesando...";
	enviar.disabled=true;
	var stageEr = false;
	document.getElementById("user_email_error").innerHTML = ""; document.getElementById("user_email_error").style.height="1px";
	document.getElementById("user_password_error").innerHTML = ""; document.getElementById("user_password_error").style.height="1px";
	if(user_email==""){
		document.getElementById("user_email_error").innerHTML="Por favor ingresa tu dirección de email.";
		document.getElementById("user_email_error").style.height="auto";
		stageEr = true;
	}
	if(user_password==""){
		document.getElementById("user_password_error").innerHTML="Por favor ingresa tu clave de acceso.";
		document.getElementById("user_password_error").style.height="auto";
		stageEr = true;
	}		
	if (!stageEr) {
		xmlLogin=GetXmlHttpObject();
		if(xmlLogin==null){
			enviar.title=enviarTitle;
			enviar.value=enviarValue;
			enviar.disabled=false;
			return;
		}
		xmlLogin.onreadystatechange=function(){
			if(xmlLogin.readyState==4){
				var responseTxt = unescape(xmlLogin.responseText);
				responseTxt = responseTxt.replace(/\+/gi," ");
				//alert(responseTxt);
				if (responseTxt==""){
					document.getElementById("user_password_error").innerHTML ="Los datos ingresados no son correctos.";
					document.getElementById("user_password_error").style.height="auto";
					enviar.title=enviarTitle;
					enviar.value=enviarValue;
					enviar.disabled=false;					
				}else{
					eval("loginData = new Array("+responseTxt+");");
					if(document.getElementById("user_email")){document.getElementById("user_email").value="";}
					if(document.getElementById("user_password")){document.getElementById("user_password").value="";}
					if(loginData[0][0]=="0"){
						if(document.getElementById("lbnormal")){document.getElementById("lbnormal").style.display="none";}
						if(document.getElementById("lbnoactivo")){document.getElementById("lbnoactivo").style.display="block";}
						setTimeout("closeLoginPop()",15000);
					}else{
						idUsuario = loginData[0][3];
						//alert(idUsuario);
						document.getElementById("logonName").innerHTML = loginData[0][1];
						document.getElementById("nologueado").style.display="none";
						document.getElementById("logueado").style.display="block";
						/*
						if(document.getElementById("logonName")){document.getElementById("logonName").innerHTML = loginData[0][1];
						if(document.getElementById("nologueado")){document.getElementById("nologueado").style.display="none";}
						if(document.getElementById("logueado")){document.getElementById("logueado").style.display="block";}
						*/
						closeLoginPop();
					}	
				}
			}
		}	
		var url = "/control/control_login.asp?from=chat.asp&ue="+escape(user_email)+"&up="+escape(user_password);
		xmlLogin.open("GET",url,true);
		xmlLogin.send(null); 
	}else{
		enviar.title=enviarTitle;
		enviar.value=enviarValue;
		enviar.disabled=false;				
	}
}
function hideCover(){
	if(!document.getElementById("coverDiv")){return;}
	document.getElementById("coverDiv").style.width="0px";
	document.getElementById("coverDiv").style.height="0px";
	document.getElementById("coverDiv").style.display="none";
}
function closeLoginPop(){
	if(document.getElementById("user_email")){document.getElementById("user_email").value="";}
	if(document.getElementById("user_password")){document.getElementById("user_password").value="";}
	document.getElementById("loginDo").value="INICIAR SESIÓN";
	document.getElementById("loginDo").title="";
	document.getElementById("loginDo").disabled=false;
	document.getElementById("loginPop").style.display="none";
	if(document.getElementById("fotoGallery")){
		if (document.getElementById("fotoGallery").style.display=="none"){
			document.getElementById("coverDiv").style.width="0px";
			document.getElementById("coverDiv").style.height="0px";
			document.getElementById("coverDiv").innerHTML = ""
			document.getElementById("coverDiv").style.display="none";		
		}
		//hideCover();
		return;
	}
}
window.onerror = ocultaError;
function ocultaError(){return true;}
