function verhome(){
		var fondo = document.getElementById('fondo').style.display="block";
		var fondoinicio = document.getElementById('fondoinicio');
		fondoinicio.style.display="block";
		fondoinicio.style.left = (((screen.width)/2)-300)+"px";
}
function showThing(){
	window.usrAgent = navigator.userAgent;
	if ((usrAgent.indexOf("MSIE 7") >= 0) || (usrAgent.indexOf("MSIE 8") >= 0)) {
		document.getElementById('fondo').style.display="block";
		var inicioexplorera = document.getElementById('inicioexplorer7a');
		var inicioexplorerb = document.getElementById('inicioexplorer7b');
		inicioexplorera.style.left = (((screen.width)/2)-370)+"px";
		inicioexplorera.style.top = (((screen.height)/2)-150)+"px";
		inicioexplorerb.style.left = (((screen.width)/2)+25)+"px";
		inicioexplorerb.style.top = ((screen.height)/2)+"px";
		inicioexplorera.style.display = "block";
		inicioexplorerb.style.display = "block";
	} else if (usrAgent.indexOf("MSIE 6") >= 0) {
		var inicioexplorer6 = document.getElementById('inicioexplorer6');
		document.getElementById('fondo').style.display="block";
		inicioexplorer6.style.left = (((screen.width)/2)-70)+"px";
		inicioexplorer6.style.top = (((screen.height)/2)-20)+"px";
		inicioexplorer6.style.display = 'block';
	}
}
function ocultarhome(){
	document.getElementById('fondo').style.display="none";
	document.getElementById('fondoinicio').style.display="none";
	document.getElementById('inicioexplorer7a').style.display = "none";
	document.getElementById('inicioexplorer7b').style.display = "none";
	document.getElementById('inicioexplorer6').style.display = "none";
}
function ocultarupload(){
	document.getElementById('fondo').style.display="none";
	document.getElementById('fondoupload').style.display = "none";
}
function upload(){
	document.getElementById('fondo').style.display="block";
	var fondoupload = document.getElementById('fondoupload');
	fondoupload.style.left=(((screen.width)/2)-200)+"px";
	fondoupload.style.display="block";
}
function registro(archivo){
   extensiones_permitidas = new Array(".gif", ".jpg", ".png");
   mierror = "";
   if (!archivo) {
       alert("No has seleccionado ningún archivo");
       return false;
   }else{
      extension = (archivo.substring(archivo.lastIndexOf("."))).toLowerCase();
      permitida = false;
      for (var i = 0; i < extensiones_permitidas.length; i++) {
         if (extensiones_permitidas[i] == extension) {
         permitida = true;
         break;
         }
      }
      if (!permitida) {
         alert("Comprueba la extensión de los archivos a subir. \nSólo se pueden subir archivos con extensiones: " + extensiones_permitidas.join());
         return false;
       }else{
         	var categoria = document.getElementById('categoria');
					var correo = document.getElementById('correo');
					var enviar = document.getElementById('enviar');
					var login = document.getElementById('load');
					if (categoria.value==""){
						alert('Seleccione una categoria');
						categoria.focus();
						return false;
					}
					if (correo.value==""){
						alert('Ingrese el Correo');
						correo.focus();
						return false;
					}else{
						var aux =0;
						var aux2 =0;
						var longitud = correo.value.length;
						var i;
						for (i=0;i<longitud;i++)
						{
							var caracter = correo.value.substring(i, i+1);
							if (caracter == '@' && i > 0)
							{
								aux += 1;
							}
							if (caracter == '.' && i > 2)
							{
								if (aux == 1)
								{
									aux2 += 1;
								}	
							}
						}
						if (aux != 1 && aux2 != 1)
						{
							alert('Correo no Valido');
							correo.focus();
							return false;
						}
					}
					enviar.style.display="none";
					login.style.display="block";
					document.frmsubir.submit();
				 	}
       }
}
function nuevoAjax(){
	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 acumularnofuciona(id){
	var funciona;
	funciona = document.getElementById('funciona');
	ajax=nuevoAjax();
	ajax.open("GET", "votos.php?i=1&id="+id,true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			funciona.innerHTML = ajax.responseText;
		}
	}
	 ajax.send(null)
}
function acumularvotos(id){
	var votos;
	votos = document.getElementById('botar');
	ajax=nuevoAjax();
	ajax.open("GET", "votos.php?i=2&id="+id,true);
	ajax.onreadystatechange=function() {
		if (ajax.readyState==4) {
			votos.innerHTML = ajax.responseText;
		}
	}
	 ajax.send(null)
}
function buscarweb(buscar){
	window.location.href='http://www.google.es/search?hl=es&q='+document.getElementById('texbuscarw').value;
}
function buscarvideo(buscar){
	window.location.href='http://www.youtube.com/results?search_type=&search_query='+document.getElementById('texbuscarv').value;
}

function cambiar(t){
		if (t=='you'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:80px;height:32px;background:url(imagenes/logoyoutube.gif) no-repeat;"></div><form action="javascript:buscarvideo();"><input id="texbuscarv" type="text" ></form><div class="botonbuscar" onclick="buscarvideo();">Buscar</div>';
			document.getElementById("webg").className="desacti";
			document.getElementById("viy").className="acti";
			document.getElementById('texbuscarv').focus();
			document.getElementById("rad").className="desacti";
		}
		if (t=='web'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:80px;height:32px;background:url(imagenes/Logo_25wht.gif) no-repeat;"></div><style type="text/css">@import url(http://www.google.com/cse/api/branding.css);</style><div class="cse-branding-right" style="background-color:#FFFFFF;color:#000000"><div class="cse-branding-form"><form action="http://www.google.es/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="partner-pub-8579478003332159:wd7iwn-81ni" /><input type="hidden" name="ie" value="ISO-8859-1" /><input type="text" name="q" id="q" size="31" /><input type="submit" name="sa" value="Buscar" /></div></form></div></div>';
			document.getElementById("webg").className="acti";
			document.getElementById("viy").className="desacti";
			document.getElementById("rad").className="desacti";
			document.getElementById('q').focus();
		}
		if (t=='rad'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:340px;">'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/reggaeton/"><b>Reggaeton</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/romantica/"><b>Romantica</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/pop/"><b>Pop</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/salsa/"><b>Salsa</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/rock/"><b>Rock</b></a><br />'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/hip-hop/"><b>Hip-Hop</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/punk/"><b>Punk</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/metal/"><b>Metal</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/trance/"><b>Electronico</b></a>'+
			'<a style="color:#a82a6a;padding:7px 7px;font-size:15px;text-decoration:underline;" target="_blank" href="http://www.sonicomusica.com/"><b>Mas..</b></a>'+
			'</div>';
			document.getElementById("rad").className="acti";
			document.getElementById("webg").className="desacti";
			document.getElementById("viy").className="desacti";
		}
	}
	function playRadio(gen){
		if (gen=='rock'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:136px;">'+
				'<a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("alternative")\' href="#">Alternativo</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("electronic")\' href="#">Electronico</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("hip-hop")\' href="#">Hip-Hop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("jazz")\' href="#">Jazz</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("pop")\' href="#">Pop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("rock")\' href="#">Rock</a>'+
				'<br></div>'+
				'<div style="float:left;">'+
				'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/26.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="140" width="184"> '+
				'<param name="movie" value="http://cdn.last.fm/widgets/radio/26.swf">'+
				'<param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fpop&amp;title=Music+tagged+pop+&amp;theme=black&amp;lang=en&amp;widget_id=radio_f75ad8afcf5a4ca1eec02a44e20b3fa6">'+
				'<param name="bgcolor" value="999999">'+
				'<param name="quality" value="high">'+
				'<param name="allowScriptAccess" value="always"> '+
				'<param name="allowNetworking" value="all"> '+
				'</object>'+
				'</div>';
		}
		if (gen=='alternative'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:136px;">'+
				'<a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("alternative")\' href="#">Alternativo</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("electronic")\' href="#">Electronico</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("hip-hop")\' href="#">Hip-Hop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("jazz")\' href="#">Jazz</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("pop")\' href="#">Pop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("rock")\' href="#">Rock</a>'+
				'<br></div>'+
				'<div style="float:left;">'+
				'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/26.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="140" width="184"> '+
				'<param name="movie" value="http://cdn.last.fm/widgets/radio/26.swf">'+
				'<param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fpop&amp;title=Music+tagged+alternative+&amp;theme=black&amp;lang=en&amp;widget_id=radio_f75ad8afcf5a4ca1eec02a44e20b3fa6">'+
				'<param name="bgcolor" value="999999">'+
				'<param name="quality" value="high">'+
				'<param name="allowScriptAccess" value="always"> '+
				'<param name="allowNetworking" value="all"> '+
				'</object>'+
				'</div>';
		}
		if (gen=='electronic'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:136px;">'+
				'<a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("alternative")\' href="#">Alternativo</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("electronic")\' href="#">Electronico</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("hip-hop")\' href="#">Hip-Hop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("jazz")\' href="#">Jazz</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("pop")\' href="#">Pop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("rock")\' href="#">Rock</a>'+
				'<br></div>'+
				'<div style="float:left;">'+
				'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/26.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="140" width="184"> '+
				'<param name="movie" value="http://cdn.last.fm/widgets/radio/26.swf">'+
				'<param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fpop&amp;title=Music+tagged+electronic+&amp;theme=black&amp;lang=en&amp;widget_id=radio_f75ad8afcf5a4ca1eec02a44e20b3fa6">'+
				'<param name="bgcolor" value="999999">'+
				'<param name="quality" value="high">'+
				'<param name="allowScriptAccess" value="always"> '+
				'<param name="allowNetworking" value="all"> '+
				'</object>'+
				'</div>';
		}
		if (gen=='hip-hop'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:136px;">'+
				'<a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("alternative")\' href="#">Alternativo</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("electronic")\' href="#">Electronico</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("hip-hop")\' href="#">Hip-Hop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("jazz")\' href="#">Jazz</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("pop")\' href="#">Pop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("rock")\' href="#">Rock</a>'+
				'<br></div>'+
				'<div style="float:left;">'+
				'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/26.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="140" width="184"> '+
				'<param name="movie" value="http://cdn.last.fm/widgets/radio/26.swf">'+
				'<param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fpop&amp;title=Music+tagged+hip-hop+&amp;theme=black&amp;lang=en&amp;widget_id=radio_f75ad8afcf5a4ca1eec02a44e20b3fa6">'+
				'<param name="bgcolor" value="999999">'+
				'<param name="quality" value="high">'+
				'<param name="allowScriptAccess" value="always"> '+
				'<param name="allowNetworking" value="all"> '+
				'</object>'+
				'</div>';
		}
		if (gen=='pop'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:136px;">'+
				'<a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("alternative")\' href="#">Alternativo</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("electronic")\' href="#">Electronico</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("hip-hop")\' href="#">Hip-Hop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("jazz")\' href="#">Jazz</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("pop")\' href="#">Pop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("rock")\' href="#">Rock</a>'+
				'<br></div>'+
				'<div style="float:left;">'+
				'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/26.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="140" width="184"> '+
				'<param name="movie" value="http://cdn.last.fm/widgets/radio/26.swf">'+
				'<param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fpop&amp;title=Music+tagged+pop+&amp;theme=black&amp;lang=en&amp;widget_id=radio_f75ad8afcf5a4ca1eec02a44e20b3fa6">'+
				'<param name="bgcolor" value="999999">'+
				'<param name="quality" value="high">'+
				'<param name="allowScriptAccess" value="always"> '+
				'<param name="allowNetworking" value="all"> '+
				'</object>'+
				'</div>';
		}
		if (gen=='jazz'){
			document.getElementById("contetex").innerHTML='<div style="float:left;width:136px;">'+
				'<a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("alternative")\' href="#">Alternativo</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("electronic")\' href="#">Electronico</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("hip-hop")\' href="#">Hip-Hop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("jazz")\' href="#">Jazz</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("pop")\' href="#">Pop</a>'+
				'<br><a style="font-size: 12px; color: rgb(178, 5, 111); text-decoration: none;" onclick=\'playRadio("rock")\' href="#">Rock</a>'+
				'<br></div>'+
				'<div style="float:left;">'+
				'<object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/26.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="140" width="184"> '+
				'<param name="movie" value="http://cdn.last.fm/widgets/radio/26.swf">'+
				'<param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fpop&amp;title=Music+tagged+jazz+&amp;theme=black&amp;lang=en&amp;widget_id=radio_f75ad8afcf5a4ca1eec02a44e20b3fa6">'+
				'<param name="bgcolor" value="999999">'+
				'<param name="quality" value="high">'+
				'<param name="allowScriptAccess" value="always"> '+
				'<param name="allowNetworking" value="all"> '+
				'</object>'+
				'</div>';
		}
	}
//--------------
function setCookie(name, value, expires, path, domain, secure){
try{document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : "; expires=" + expires.toGMTString()) + ((path == null) ? "" : "; path=" + path) + ((domain == null) ? "" : "; domain=" + domain) + ((secure == null) ? "" : "; secure");}
catch(z){}		
}
function _go(nombre, valor){
	var caduca = new Date();caduca.setTime(caduca.getTime() + (365*24*60*60*1000));setCookie (nombre, valor, caduca);
}	
