var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xNN4,xUA=navigator.userAgent.toLowerCase();if(window.opera){var i=xUA.indexOf("opera");if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7;}}else if(navigator.vendor!="KDE" && document.all && xUA.indexOf("msie")!=-1){xIE4Up=parseFloat(navigator.appVersion)>=4;xIE4=xUA.indexOf("msie 4")!=-1;xIE5=xUA.indexOf("msie 5")!=-1;}else if(document.layers){xNN4=true;}xMac=xUA.indexOf("mac")!=-1;function xDef(){for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=="undefined") return false;}return true;}function xDisplay(e,s){if(!(e=xGetElementById(e))) return null;if(e.style && xDef(e.style.display)) {if (xStr(s)) e.style.display = s;return e.style.display;}return null;}function xGetElementById(e){if(typeof(e)!="string") return e;if(document.getElementById) e=document.getElementById(e);else if(document.all) e=document.all[e];else e=null;return e;}function xStr(s){for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])!="string") return false;}return true;}
function CargaCompletada(){
        xDisplay("waitDiv", "none")
}
function expandir_formulario(Campo){
	xDisplay("div"+Campo, "block")
}
function contraer_formulario(Campo){
	xDisplay("div"+Campo, "none")
}
function abrir_configuracion(){
	xDisplay("divServidores", "block");
	xDisplay("divExtensiones", "none");
	xDisplay("divCantidad", "none");
	xDisplay("divConfig", "none");
	xDisplay("divNoConfig", "block");
}
function cerrar_configuracion(){
	xDisplay("divServidores", "none");
	xDisplay("divExtensiones", "none");
	xDisplay("divCantidad", "none");
	xDisplay("divConfig", "block");
	xDisplay("divNoConfig", "none");
}
function muestra_UltBusq(){
	xDisplay("divUltBusq", "block");
	xDisplay("divLoMasBusq", "none");
	xDisplay("divLoMasVot", "none");
}
function muestra_LoMasBusq(){
	xDisplay("divUltBusq", "none");
	xDisplay("divLoMasBusq", "block");
	xDisplay("divLoMasVot", "none");
}
function muestra_LoMasVot(){
	xDisplay("divUltBusq", "none");
	xDisplay("divLoMasBusq", "none");
	xDisplay("divLoMasVot", "block");
}   
function muestra_servidores(){
	xDisplay("divServidores", "block");
	xDisplay("divExtensiones", "none");
	xDisplay("divCantidad", "none");
}
function muestra_extensiones(){
	xDisplay("divServidores", "none");
	xDisplay("divExtensiones", "block");
	xDisplay("divCantidad", "none");
}
function muestra_cantidad(){
	xDisplay("divServidores", "none");
	xDisplay("divExtensiones", "none");
	xDisplay("divCantidad", "block");
}
 
bNS = navigator.appName=="Netscape" 
bIE = navigator.appName=="Microsoft Internet Explorer" 
function mOvr2(src) {
   if (bIE) { 
      elobjeto = event.fromElement 
      if (!src.contains(elobjeto)) {
	     src.style.cursor = 'hand';
	  }
   }else{
      src.style.cursor = 'pointer';
   }
}
function mOvrST(src,clrOver) {
   if (bIE) { 
      elobjeto = event.fromElement 
      if (!src.contains(elobjeto)) {
             src.style.cursor = 'default';
	     //if(clrOver.substring(0, 1)=='#' || clrOver.length==0) {
	        src.style.borderTop = '1px solid ' + clrOver;
		src.style.borderLeft = '1px solid ' + clrOver;
		src.style.borderRight = '1px solid ' + clrOver;
		src.style.borderBottom = '1px solid ' + clrOver;
	     //}else{
  	        //src.background = '#FFFFFF';
	     //} 
	  }
   }else{
      src.style.cursor = 'default';
      src.style.borderTop = '1px solid ' + clrOver;
      src.style.borderLeft = '1px solid ' + clrOver;
      src.style.borderRight = '1px solid ' + clrOver;
      src.style.borderBottom = '1px solid ' + clrOver;
      //src.style.background  = '#FFFFFF';
   }
}
function mOutST(src,clrIn) {
   if (bIE) { 
      elobjeto = event.toElement
      if (!src.contains(elobjeto)) {
             src.style.cursor = 'default';
	     //if(clrIn.substring(0, 1)=='#' || clrIn.length==0) {
	        //src.style = 'border-top: 1px solid ' + clrIn + '; border-left: 1px solid ' + clrIn + '; border-right: 1px solid ' + clrIn + '; border-bottom: 1px solid ' + clrIn + ';';
	        src.style.borderTop = '1px solid ' + clrIn;
		src.style.borderLeft = '1px solid ' + clrIn;
		src.style.borderRight = '1px solid ' + clrIn;
		src.style.borderBottom = '1px solid ' + clrIn;
	     //}else{
  	     //   src.background = clrIn;
	     //}	 
	  }
   }else{
      src.style.cursor = 'default';
      src.style.borderTop = '1px solid ' + clrIn;
      src.style.borderLeft = '1px solid ' + clrIn;
      src.style.borderRight = '1px solid ' + clrIn;
      src.style.borderBottom = '1px solid ' + clrIn;
      //src.style.background  = clrIn;
   }
}
function mOvrSR(src,clrOver) {
   if (bIE) { 
      elobjeto = event.fromElement 
      if (!src.contains(elobjeto)) {
             src.style.cursor = 'default';
	     if(clrOver.substring(0, 1)=='#' || clrOver.length==0) {
	        src.bgColor = clrOver;
	     }else{
  	        src.background = clrOver;
	     } 
	  }
   }else{
      src.style.cursor = 'default';
      src.style.background  = clrOver;
   }
}
function mOutSR(src,clrIn) {
   if (bIE) { 
      elobjeto = event.toElement
      if (!src.contains(elobjeto)) {
             src.style.cursor = 'default';
	     if(clrIn.substring(0, 1)=='#' || clrIn.length==0) {
	        src.bgColor = clrIn;
	     }else{
  	        src.background = clrIn;
	     }	 
	  }
   }else{
      src.style.cursor = 'default';
      src.style.background  = clrIn;
   }
}
function mOvr(src,clrOver) {
   if (bIE) { 
      elobjeto = event.fromElement 
      if (!src.contains(elobjeto)) {
	     src.style.cursor = 'hand';
	     if(clrOver.substring(0, 1)=='#' || clrOver.length==0) {
	        src.bgColor = clrOver;
	     }else{
  	        src.background = clrOver;
	     }	 
	  }
   }else{
      src.style.cursor = 'pointer';
      src.style.background  = clrOver;
   }
}
function mOut(src,clrIn) {
   if (bIE) { 
      elobjeto = event.toElement
      if (!src.contains(elobjeto)) {
	     src.style.cursor = 'default';
	     if(clrIn.substring(0, 1)=='#' || clrIn.length==0) {
	        src.bgColor = clrIn;
	     }else{
  	        src.background = clrIn;
	     }	 
	  }
   }else{
      src.style.cursor = 'default';
      src.style.background  = clrIn;
   }
}
function mClk(src) {
   if (bIE) { 
      elobjeto = event.srcElement
      if(elobjeto.tagName=='TD'){
	     //var elem = src.children.tags('A')[0].click();
		 var elem = src.getElementsByTagName("A")[0];
		 elem.click();
      }
   }else{
      //elobjeto = src.children;
      //if(elobjeto.nodeName=='TD'){   
         var elem = src.getElementsByTagName("A")[0];
	     document.location.href=elem.href;	
      //}
   }	  
}
function sf(){
   document.f.q.focus();
   CargaCompletada();
}
function Favorites(){
    var title="Sharech.com - Search for files";
    var url="http://www.sharech.com/";

    if (window.sidebar) window.sidebar.addPanel(title, url,"");

    else if( window.opera && window.print )
    {
    var mbm = document.createElement('a');
    mbm.setAttribute('rel','sidebar');
    mbm.setAttribute('href',url);
    mbm.setAttribute('title',title);
    mbm.click();
    }

    else if( document.all ) window.external.AddFavorite( url, title);

}
function DefaultHomePage(strDHPText,strDHPURL){
	//for IE
	if (navigator.userAgent.indexOf("MSIE") != -1)	{
		if(!dhp.isHomePage(strDHPURL)) 		{
			document.write("<a class=\"AdditionalEnginesSearch\" href=\"#DefaultHomepage\" onclick=\"style.behavior='url(#default#homepage)';setHomePage('" +strDHPURL +"');\"><img src=\"imagenes/HomePage.gif\" border=0 alt=\""+strDHPText+"\"></a>");
		}
	}
}
function OpenSearch(){
 if (window.external && ("AddSearchProvider" in window.external)) {
   // Firefox 2 and IE 7, OpenSearch
   window.external.AddSearchProvider("http://www.sharech.com/OpenSearch.xml");
 } else if (window.sidebar && ("addSearchEngine" in window.sidebar)) {
   // Firefox <= 1.5, Sherlock
   window.sidebar.addSearchEngine(
    "http://www.sharech.com/OpenSearch.src",
    "http://www.sharech.com/favicon.ico",
    "Search for files on the best servers downloads",
    "" );
	}  else {
   // No search engine support (IE 6, Opera, etc).
   alert("Sorry, could not be installed OpenSearch in your browser. Your browser does not support this plugin.");
   }
 }