var m_lmCurPage = 1;
function fnLmGoPriorPg(){fnLmGoPg(m_lmCurPage-1);}
function fnLmGoNextPg(){fnLmGoPg(m_lmCurPage+1);}
function fnLmGoPg(pag){
  if(!m_lmCurPage) m_lmCurPage = 1;
  if(document.getElementById('dListA' + pag)){
	$('#dListA' + m_lmCurPage).removeClass('visible');
	$('#dListA' + m_lmCurPage).addClass('novisible');
    m_lmCurPage = pag;
	$('#dListA' + m_lmCurPage).addClass('visible');
	$('#dListA' + m_lmCurPage).removeClass('novisible');
  }
}

function mostrar() {
  obj = document.getElementById('cathor');
  obj.style.display = (obj.style.display=='none') ? 'block' : 'none';
  document.getElementById('oculymos').innerHTML = (obj.style.display=='none') ? 'Mostrar Generos' : 'Ocultar Generos';
}
function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function get_ajax(url,capa,metodo){ 
	  var ajax=creaAjax();
	  var capaContenedora = document.getElementById(capa);
	if (metodo.toUpperCase()=='GET'){
	ajax.open ('GET', url, true);
	ajax.onreadystatechange = function() {
	 if (ajax.readyState==1)
 	{
var load_='<img src="/img/Loadhig.gif" />';
capaContenedora.innerHTML=load_;
	}
   else if (ajax.readyState==4){ // ****
       if(ajax.status==200){ 
		document.getElementById(capa).innerHTML=ajax.responseText; 
            }
          else if(ajax.status==404)
     {
     capaContenedora.innerHTML = '<div id="ajaxestile"><CENTER><H2><B>ERROR 404</B></H2>LA PAGINA NO EXISTE</CENTER></div>';
         }
         else
           {
            capaContenedora.innerHTML = "Error: ".ajax.status;
         }
	     } // ****
				}
		ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		ajax.send(null);
		return
	}
}
function creaAjax(){
  var objetoAjax=false;
	  try{objetoAjax = new ActiveXObject("Msxml2.XMLHTTP");}
	      catch(e){try {objetoAjax = new ActiveXObject("Microsoft.XMLHTTP");} 
	    catch (E){objetoAjax = false;}}
     if(!objetoAjax && typeof XMLHttpRequest!='undefined') {
 objetoAjax = new XMLHttpRequest();}  return objetoAjax;
}
function iletras(cancion,artista){
				var url='/aplicacion.php?c='+ cancion +'/'+ artista +'';
				var capa='COpciones';
				var metodo='get';						
				get_ajax(url,capa,metodo);
}
function ivideos(cancion,artista){
				var url='/videos.php?c='+ cancion +'/'+ artista +'';
				var capa='COpciones';
				var metodo='get';						
				get_ajax(url,capa,metodo);
}