function newVisit(){
	alert(1);
   document.all.visitas.src = "http://www.yahoo.com";
}
function cerrarVentanaClip(){
      document.getElementById('divFoto').innerHTML = "v";
      document.all.divFoto.style.display = "none";
      var valor = document.all.frm1.vSong.value;
      window.open("http://yuhuu.top-play-ringtones.com/sections/popup/descarga-videoclip/"+valor+" ","w81","width=600,height=440,scrollbars=NO,resize=NO");
}
function cerrarVentanaClip2(){
      document.getElementById('divFoto').innerHTML = "v";
      document.all.divFoto.style.display = "none";
}
function abrirVentanaVideoClip(valor){
     window.open("http://yuhuu.top-play-ringtones.com/sections/popup/descarga-videoclip/"+valor+" ","w1","width=600,height=440,scrollbars=NO,resize=NO");
     document.all.visitas.src="http://www.yuhuu.com/admin/enlaceDesde2.asp?q="+valor+"&vLink=Link Videoclip";
}
function reproYouTube(cancion,foto,artista,NRS,posicion){
	document.all.frm1.vSong.value=NRS;	
	document.all.rep.style.display = "block";
        document.all.rep.style.top = posicion;
        document.all.rep.style.left = 195;
	document.getElementById('TitYouTube').innerHTML = artista;
	document.all.fotito.src="http://www.yuhuu.com/musica/"+foto;
	if(posicion=="700"){
	  document.all.fotito.src=foto;
          document.all.rep.style.left = 500;
          document.all.navidad.style.left = 120;
          abrirNavidad();
	}
	if(posicion=="1800"){
	  document.all.fotito.src="http://www.yuhuu.com/cine/"+foto;
	  document.all.fotito.src.width=60;
	}
	if(posicion=="190"){
	  document.all.fotito.src=foto;
	  document.all.fotito.src.width=60;
          document.all.rep.style.top = 360;
          document.all.rep.style.left = 220;
          abrirNavidad();
	}
	//document.all.repr.src="http://www.youtube.com/watch?v="+cancion;
	   var so = new SWFObject("playerSingle.swf", "mymovie", "190", "60", "7", "#000000");
	   //abrirEscuchando(titulo,posicion);
	   //setTimeout("cerrarEscuchando()",4000);
	   so.addVariable("autoPlay", "yes");
	   so.addVariable("overColor","#000000");
	   so.addVariable("playerSkin","0");
       so.addVariable("soundPath", cancion);
       //so.addVariable("soundPath", "http://dc107.4shared.com/download/125685200/1f01009/She_Wolf_-_Loba__Michel_Spanglish_Extended_Version_.mp3");
	   so.write("flashPlayer");
}
function escuchame(valor,titulo,posicion){
	   var so = new SWFObject("playerSingle.swf", "mymovie", "200", "60", "7", "#B22222");
  if(valor=="0"){
        so.addVariable("soundPath", "http://contents.mediafusion.es/mp3/nada.mp3");
   }
     else
   {	
	   abrirEscuchando(titulo,posicion);
	   //setTimeout("cerrarEscuchando()",4000);
	   so.addVariable("autoPlay", "yes");
	   so.addVariable("overColor","#000000");
	   so.addVariable("playerSkin","0");
       so.addVariable("soundPath", "http://contents.mediafusion.es/mp3/"+valor);
       //so.addVariable("soundPath", "http://dc107.4shared.com/download/125685200/1f01009/She_Wolf_-_Loba__Michel_Spanglish_Extended_Version_.mp3");
   }
	   so.write("flashPlayer");
 }
 function abrirNavidad(){
 	document.all.navidad.style.display = "block";
}
 function cerrarNavidad(){
 	document.all.navidad.style.display = "none";
 	//cerrarEscuchando();
}
 function abrirEscuchando(valor,posicion){
arranca();
      document.all.frm1.vSong.value = valor;
      document.all.divEscucha.style.display = "block";
      document.all.divEscucha.style.top = posicion;
      document.getElementById('TitCancion').innerHTML = valor;
}
function arranca(){
     document.getElementById('topcon-inner').style.background="url(http://www.lahiguera.net/musicalia/artistas/david_bisbal/fotos/4171/david_bisbal.jpg)";
}
function cerrarEscuchando(){
       escuchame("0","0","0");
       document.all.divEscucha.style.display = "none";
       document.all.rep.style.display = "none";
       abrirVentana(document.all.frm1.vSong.value,document.all.frm1.vSong.value,'reproductor')
       //document.all.navidad.style.display = "none";
       //document.all.repr.src = "";
}
function abrirVideoClip(valor,posicion,cantante,titulo,codigo){
      document.all.frm1.vSong.value = valor;
      document.all.divFoto.style.display = "block";
      document.all.divFoto.style.top = posicion;
      //document.getElementById('XXX').src = "http://www.youtube.com/v/"+codigo+"&rel=0&border=1&autoplay=1&rel=0&color1=0xB22222&color2=0xB22222&hl=es&fs=0&";
	  
        var vvv = '<table width="95%" border=0	 align="center">'+
		 '<tr>'+
	     '    <td align="center">'+
		 '	      <table width="95%">'+
		'			  <tr>'+
		'			  <td>'+
         '                  <h2>Video Clips para el móvil </h2>'+
			'			   <br>'+
			'		            <font size=4>'+
		'						   <b id="TitVideo">Título canción</b>&nbsp;<i id="Video">Título canción</i>'+
'							    </font>'+
'					  </td>'+
'					  </tr>'+
'				  </table>'+
'			      <table width="95%" border=0>'+
'					  <tr>'+
'					  <td align="center">'+
'				               <a href="javascript: cerrarVentanaClip();"><img src="images/descargar.gif"></a>'+
'					  </td>'+
'					  </tr>'+
'				  </table>'+
'				  </td>'+
'		  </tr>'+
'		  <tr>'+
'			  <td align="center">'+
				   '<object width="360" height="250" name="televisor" id="televisor">'+
				   '<param name="movie" value="http://www.youtube.com/v/'+codigo+'=es&fs=1&"></param>'+
				   '<param name="allowFullScreen" value="false"></param>'+
				   '<param name="allowscriptaccess" value="always"></param>'+
				   '<embed id="XXX" src="http://www.youtube.com/v/'+codigo+'&rel=0&border=1&autoplay=1&rel=0&color1=0x004080&color2=0x004080&hl=es&fs=0&" type="application/x-shockwave-flash" allowscriptaccess="always" '+
				   'allowfullscreen="true" width="400" height="290"></embed>'+
				   '</object>'+
'	          </td>'+
'		  </tr>'+
 '         </table>		  ';

	  
      document.getElementById('divFoto').innerHTML = vvv;
      document.getElementById('Video').innerHTML = titulo;
      document.getElementById('TitVideo').innerHTML = cantante;
     document.all.visitas.src="http://www.yuhuu.com/admin/enlaceDesde2.asp?q="+valor+"&vLink=Foto Videoclip";
      
}
function abrirVentana(valor,artista,enlace){
    // cerrarEscuchando();
     window.open("http://yuhuu.top-play-ringtones.com/sections/popup/descarga-melodia-original/"+valor+" ","w1","width=600,height=440,scrollbars=NO,resize=NO");
     document.all.visitas.src="http://www.yuhuu.com/admin/enlaceDesde2.asp?q="+artista+"&vLink="+enlace;

}

function abrirVentanaMax(valor){
     window.open(valor+" ","w1","width=800,height=800,scrollbars");
}
function abrirVentanaArtista(valor){

     var letra = valor.substring(0,1);
     var host = "http://yuhuu.top-play-ringtones.com/sections/musica/originales.htm?L="+letra+"&c="+valor;
	 var sList =window.open(host+" ","w1","width=630,height=700,scrollbars");
	 sList.focus();
}
function buscar(){
  var host = "http://yuhuu.top-play-ringtones.com/sections/musica/originales.htm?";
  var valor = document.all.artista.value;
  window.open("http://yuhuu.top-play-ringtones.com/sections/buscar/buscar.htm?texto="+valor+"&tipo=MO");
  document.all.visitas.src="http://www.yuhuu.com/admin/enlaceDesde2.asp?q="+valor+"&vLink=buscar";
}
function buscaLetra(valor){
   
   document.all.dva.style.display = "none";
   document.all.dvb.style.display = "none";
   document.all.dvc.style.display = "none";
   document.all.dvd.style.display = "none";
   document.all.dve.style.display = "none";
   document.all.dvf.style.display = "none";
   document.all.dvg.style.display = "none";
   document.all.dvh.style.display = "none";
   document.all.dvi.style.display = "none";
   document.all.dvj.style.display = "none";
   document.all.dvk.style.display = "none";
   document.all.dvl.style.display = "none";
   document.all.dvm.style.display = "none";
   document.all.dvn.style.display = "none";
   document.all.dvo.style.display = "none";
   document.all.dvp.style.display = "none";
   document.all.dvq.style.display = "none";
   document.all.dvr.style.display = "none";
   document.all.dvs.style.display = "none";
   document.all.dvt.style.display = "none";
   document.all.dvu.style.display = "none";
   document.all.dvv.style.display = "none";
   document.all.dvw.style.display = "none";
   document.all.dvx.style.display = "none";
   document.all.dvy.style.display = "none";
   document.all.dvz.style.display = "none";
   
   if(valor=="A"){
	       document.all.dva.style.display = "block";
   }
   if(valor=="B"){
	       document.all.dvb.style.display = "block";
   }
   if(valor=="C"){
		       document.all.dvc.style.display = "block";
   }
   if(valor=="D"){
		       document.all.dvd.style.display = "block";
   }
   if(valor=="E"){
		       document.all.dve.style.display = "block";
   }
   if(valor=="F"){
		       document.all.dvf.style.display = "block";
   }
   if(valor=="G"){
		       document.all.dvg.style.display = "block";
   }
   if(valor=="H"){
		       document.all.dvh.style.display = "block";
   }
   if(valor=="I"){
		       document.all.dvi.style.display = "block";
   }
   if(valor=="J"){
		       document.all.dvj.style.display = "block";
   }
   if(valor=="K"){
		       document.all.dvk.style.display = "block";
   }
   if(valor=="L"){
		       document.all.dvl.style.display = "block";
   }
    if(valor=="M"){
		       document.all.dvm.style.display = "block";
   }
    if(valor=="N"){
		       document.all.dvn.style.display = "block";
   }
    if(valor=="O"){
		       document.all.dvo.style.display = "block";
   }
    if(valor=="P"){
		       document.all.dvp.style.display = "block";
   }
    if(valor=="Q"){
		       document.all.dvq.style.display = "block";
   }
    if(valor=="R"){
		       document.all.dvr.style.display = "block";
   }
    if(valor=="S"){
		       document.all.dvs.style.display = "block";
   }
    if(valor=="T"){
		       document.all.dvt.style.display = "block";
   }
    if(valor=="U"){
		       document.all.dvu.style.display = "block";
   }
    if(valor=="V"){
		       document.all.dvv.style.display = "block";
   }
    if(valor=="W"){
		       document.all.dvw.style.display = "block";
   }
    if(valor=="X"){
		       document.all.dvx.style.display = "block";
   }
    if(valor=="Y"){
		       document.all.dvy.style.display = "block";
   } 
   if(valor=="Z"){
		       document.all.dvz.style.display = "block";
   }
   
}
function mostrarNoticia(valor){
    if(valor=="1"){
		       document.all.dvNoticias.style.display = "block";
    }
    if(valor=="2"){
		       document.all.dvNoticias2.style.display = "block";
    }
    if(valor=="3"){
		       document.all.dvNoticias3.style.display = "block";
    }
    if(valor=="4"){
		       document.all.divFoto.style.display = "block";
    }
}
function cerrarNoticia(valor){
    if(valor=="1"){
		       document.all.dvNoticias.style.display = "none";
    }
    if(valor=="2"){
		       document.all.dvNoticias2.style.display = "none";
    }
    if(valor=="3"){
		       document.all.dvNoticias3.style.display = "none";
    }
    if(valor=="4"){
		       document.all.divFoto.style.display = "none";
    }
}

			function show5(){

			if (!document.layers&&!document.all&&!document.getElementById)
			return

			 var Digital=new Date()
			 var hours=Digital.getHours()
			 var minutes=Digital.getMinutes()

			 var seconds=Digital.getSeconds()
				dows = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
				months = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
				now = new Date();
				dow = now.getDay();
				d = now.getDate();
				m = now.getMonth();
				h = now.getTime();
				y = now.getYear();
				var entera=dows[dow]+" "+d+" de "+months[m]+" de "+y;

			var dn="PM"
			if (hours<12)
			dn="AM"
			if (hours>12)
			hours=hours-12
			if (hours==0)
			hours=12

			 if (minutes<=9)
			 minutes="0"+minutes
			 if (seconds<=9)
			 seconds="0"+seconds
			//change font size here to your desire
			myclock=" "+entera+"  "+hours+":"+minutes+":"+seconds+" "+dn+" "
			if (document.layers){
			document.layers.liveclock.document.write(myclock)
			document.layers.liveclock.document.close()
			}
			else if (document.all)
			liveclock.innerHTML=myclock
			else if (document.getElementById)
			document.getElementById("liveclock").innerHTML=myclock
			setTimeout("show5()",1000)
			 }
			 

						function regenerate(){
						window.location.reload()
						}
						function regenerate2(){
						if (document.layers){
						setTimeout("window.onresize=regenerate",50)
						intializemarquee()
						}
						}

						function intializemarquee(){
						document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
						document.cmarquee01.document.cmarquee02.document.close()
						thelength=document.cmarquee01.document.cmarquee02.document.height
						scrollit()
						}

						function scrollit(){
						if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
						document.cmarquee01.document.cmarquee02.top-=speed
						setTimeout("scrollit()",100)
						}
						else{
						document.cmarquee01.document.cmarquee02.top=marqueeheight
						scrollit()
						}
						}

						
						
var slideCache = new Array();

function palabras(palabra){
	
	var OK = 0;
	var notValid = "tonos,TONOS," +
	               "politonos,POLITONOS," +
	               "moviles,MOVILES," +
	               "DE,de,para,PARA,POR,por,en,EN,GRATIS,gratis,originales,ORIGINALES," +
	               "EL,LA,LOS,LAS,el,la,los,las," +
	               "sonidos,SONIDOS,nuevo,NUEVO,Nuevo" +
	               "REALES,reales,últimos,ultimos,q=,mobil," +
 	               "melodias,MELODIAS," +
 	               "ESCUCHAR,escuchar," +
 	               "BAJAR,bajar," +
 	               "descarga,DESCARGA,Descargas,descargar" +
 	               "MAS,mas," +
 	               "canciones,CANCIONES,canción" +
 	               "MUSICA,musica,polifonicas,POLIFONICAS,Polifonicas," +
 	               "MP3,mp3,the,THE,y,Y,ultimo,ULTIMO, mi ," +
 	               "al,AL,del,DEL,bso,BSO,polifonicos,POLIFONICOS,Polifonicos," +
 	               "ringtone,RINGTONE,ringtones,NUEVA,nueva,celular,CELULAR," +
 	               "VIDEOCLIP,videoclip,Celular";

	               
	var findMe = notValid.indexOf(palabra);
	
	if (findMe==-1){
		OK = 1;
	}
	
	   return OK;
}
function letras(valor){
	
	valor = valor + " ";
	var i= 0;
	var letra="";
	var palabra = "";
	var completa = "";
	var contador = 0;
		letra = valor.substring(3,4);  

	for(i=0;i<=valor.length+1;i++){
	  letra = valor.substring(i,i+1);  
	  
	  if(letra==" "){
      var vOk = palabras(palabra);
    	if(vOk=="1"){
    	   //completa = completa + palabra + " ";
    	   completa = palabra;
    	   //contador++;
    	   //if(contador>1){
    	     break;
    	   //}
    	}
	    letra="";
    	palabra="";
	  } // end if letra*/
	  else{
	  	palabra = palabra + letra;
    }
	  	

	}// end for
	//alert(contador);
	/*if(contador==2){
      var vOk2 = palabras(palabra);
      if(vOk2=="1"){
      	completa = completa + palabra + " ";
    	}
   }*/
   
     alert(completa);
     if(vOk=="1"){
       //window.open("http://www.yuhuu.com/admin/palabras.asp?nombre="+completa+" ","w81","width=500,height=340,scrollbars=NO,resize=NO");
       location.href = "http://www.yuhuu.com/admin/palabras.asp?nombre="+completa;
     }
}

function RunSlideShow(pictureName,imageFiles,displaySecs){

var imageSeparator = imageFiles.indexOf(";");
var nextImage = imageFiles.substring(0,imageSeparator);
if(document.all){
document.getElementById(pictureName).style.filter="blendTrans(duration=4)";
document.getElementById(pictureName).filters.blendTrans.Apply();
}
document.getElementById(pictureName).src = nextImage;
if (document.all){
document.getElementById(pictureName).filters.blendTrans.Play();
}
var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)+ 
';'+nextImage;
setTimeout("RunSlideShow('"+pictureName+"','"+futureImages+"',"+displaySecs+")",displaySecs*1000);
imageSeparator = futureImages.indexOf(";");
nextImage = futureImages.substring(0,imageSeparator);
if (slideCache[nextImage] == null)
{
slideCache[nextImage] = new Image;
slideCache[nextImage].src = nextImage;
}
}
						
						
						

						