function mostrar20100() {
	document.getElementById('lista20100').style.display = 'block';
	document.getElementById('compartirtop').innerHTML = '<a id="mostrar20100" href="javascript:ocultar20100();"></a>';
	document.getElementById('mostrar20100').style.backgroundImage = 'url(images/top20.png)';
	window.location.href=('#lista20100');
}

function ocultar20100() {
	document.getElementById('lista20100').style.display = 'none';
	document.getElementById('compartirtop').innerHTML = '<a id="mostrar20100" href="javascript:mostrar20100();"></a>';
	document.getElementById('mostrar20100').style.backgroundImage = 'url(images/top100.png)';
	window.location.href=('#');
}

function iradj(valor) {
	window.location.href=(valor);
}

function iradj2(valor) {
	window.location.href=('http://topspain.es/' + valor);
}

function mostrar() {
	var allElems = document.getElementsByTagName('tr');
	for (var i = 0; i < allElems.length; i++) {
		var thisElem = allElems[i];
		if (thisElem.className && thisElem.className == 'filatopimparextend') {
			thisElem.style.display = 'table-row';
		}
		
		if (thisElem.className && thisElem.className == 'filatopparextend') {
			thisElem.style.display = 'table-row';
		}
	}
	
	document.getElementById('celdapie').innerHTML = '<a style="margin-left: 4px;" id="mostrar20100" href="#" onclick="javascript:ocultar();"></a>';
	document.getElementById('mostrar20100').style.backgroundImage = 'url(images/top20.png)';

}
		
function ocultar() {
	
	var allElems = document.getElementsByTagName('tr');
	for (var i = 0; i < allElems.length; i++) {
		var thisElem = allElems[i];
		if (thisElem.className && thisElem.className == 'filatopimparextend') {
			thisElem.style.display = 'none';
		}
		
		if (thisElem.className && thisElem.className == 'filatopparextend') {
			thisElem.style.display = 'none';
		}
	}
	
	document.getElementById('celdapie').innerHTML = '<a style="margin-left: 4px;" id="mostrar20100" href="#lista20100" onclick="javascript:mostrar();"></a>';
	document.getElementById('mostrar20100').style.backgroundImage = 'url(images/top100.png)';
	window.location.href=('#');
}


function icono(numId) {
	if(document.getElementById('audio'+numId).className == "song") {
		$("#audio"+numId).attr("src","images/play.png");
	} else {
		$("#audio"+numId).attr("src","images/pause.png");
	}
	return false;
}

function openAudio(numId, file) {
	if (document.getElementById('audio'+numId).className == "song sonando") {
    
		//document.getElementById('audio'+numId).className = "song";
		$("#audio"+numId).removeClass('song sonando').addClass('song');
        //var audioFlash =  "<object style='width:0px;height:0px;' type='application/x-shockwave-flash' data='dewplayer.swf?mp3=mp3_files/0&autoplay=1' width='0' height='0'><param name='movie' value='dewplayer.swf?mp3=mp3_files/" + file + "&autoplay=0'></object>";
		audioFlash = "";
        document.getElementById('audioPlayerPrivado').innerHTML = audioFlash;
    
	} else {
		var cont = 1;
		for (cont=1; cont<=20; cont++) {
            //document.getElementById('audio'+cont).className = "song";
			$("#audio"+cont).removeClass('song sonando').addClass('song');
            $("#audio"+cont).attr("src","images/play.png");
        }
         	
        document.getElementById('audio'+numId).className = "song sonando";
		var audioFlash =  "<object style='width:0px;height:0px;' type='application/x-shockwave-flash' data='dewplayer.swf?mp3=mp3_files/"+file+"&autoplay=1' width='0' height='0'><param name='movie' value='dewplayer.swf?mp3=mp3_files/" + file + "&autoplay=1'></object>";
		document.getElementById('audioPlayerPrivado').innerHTML = audioFlash;
		
	}
	
	return false;
}
