function ValorRadio(Elemento)

{

    for(j=0;j<Elemento.length;j++)

    if(Elemento[j].checked) return Elemento[j].value;

}





function detectarExplorador() {

    var ie = document.all != undefined;

    var opera = window.opera != undefined;

    

    if (opera) return "opera";

    if (ie) return "ie";

    if ((window)&&(window.netscape)&&(window.netscape.security)) {

      if (window.XML) {

        return "firefox15";

      }

      else return "firefox10";

    }

    return "ie";      // Si no sabemos que navegador es, devolvemos ie.

  }

  



function Busqueda()

{

Palabra = document.EjecutarBusqueda.Buscar.value;

SubCateg = ValorRadio(document.EjecutarBusqueda.SubCategoria);

if(Palabra){



var linea = new String();

linea = Palabra ; 



linea = linea.replace(/ /g, "-"); 





if(detectarExplorador() == "firefox15"){

linea = linea.replace(/á/g, ":01:"); 

linea = linea.replace(/é/g, ":02:"); 

linea = linea.replace(/í/g, ":03:"); 

linea = linea.replace(/ó/g, ":04:"); 

linea = linea.replace(/ú/g, ":05:"); 

linea = linea.replace(/Á/g, ":06:"); 

linea = linea.replace(/É/g, ":07:"); 

linea = linea.replace(/Í/g, ":08:"); 

linea = linea.replace(/Ó/g, ":09:"); 

linea = linea.replace(/Ó/g, ":010:"); 

linea = linea.replace(/Ñ/g, ":011:"); 

linea = linea.replace(/ñ/g, ":012:"); 

}





location.href = 'http://www.comedian.com/'+SubCateg+'/q-'+linea+'/';



}

//else {

//alert('sin palbras '+Palabra+'');

//}





}



var CursorDIVX=12 

var CursorDIVY=10 



var PunteroDIVX=10

var PunteroDIVY=14 



document.write('<div id="AvisoDiv"></div>') 

document.write('<img id="PunteroDiv" src="img/Puntero.gif">') 

var ie=document.all

var ns6=document.getElementById && !document.all

var enabletip=false

if (ie||ns6)

var tipobj=document.all? document.all["AvisoDiv"] : document.getElementById? document.getElementById("AvisoDiv") : ""

var pointerobj=document.all? document.all["PunteroDiv"] : document.getElementById? document.getElementById("PunteroDiv") : ""



function ietruebody(){

return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

}



function AvisoDv(Valor){



if(Valor == 'a'){

var Texto = "Open in new window";

}else




if(Valor == 'd') 

{

var Texto = "Search music.";

}

else


if(Valor == 'f') 

{

var Texto = "Search Video";

}

tipobj.innerHTML=Texto

enabletip=true

return false



}



function positiontip(e){

if (enabletip){

var nondefaultpos=false

var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;

var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;

var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20

var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20



var rightedge=ie&&!window.opera? winwidth-event.clientX-CursorDIVX : winwidth-e.clientX-CursorDIVX

var bottomedge=ie&&!window.opera? winheight-event.clientY-CursorDIVY : winheight-e.clientY-CursorDIVY



var leftedge=(CursorDIVX<0)? CursorDIVX*(-1) : -1000

if (rightedge<tipobj.offsetWidth){

tipobj.style.left=curX-tipobj.offsetWidth+"px"

nondefaultpos=true

}

else if (curX<leftedge)

tipobj.style.left="5px"

else{



tipobj.style.left=curX+CursorDIVX-PunteroDIVX+"px"

pointerobj.style.left=curX+CursorDIVX+"px"

}



if (bottomedge<tipobj.offsetHeight){

tipobj.style.top=curY-tipobj.offsetHeight-CursorDIVY+"px"

nondefaultpos=true

}

else{

tipobj.style.top=curY+CursorDIVY+PunteroDIVY+"px"

pointerobj.style.top=curY+CursorDIVY+"px"

}

tipobj.style.visibility="visible"

if (!nondefaultpos)

pointerobj.style.visibility="visible"

else

pointerobj.style.visibility="hidden"

}

}



function hideAvisoDv(){

if (ns6||ie){

enabletip=false

tipobj.style.visibility="hidden"

pointerobj.style.visibility="hidden"

tipobj.style.left="-1000px"

tipobj.style.backgroundColor=''

tipobj.style.width=''

}

}



document.onmousemove=positiontip
