function IncludeJavaScript(jsFile)
{
  document.write('<script type="text/javascript" src="'
    + jsFile + '"></scr' + 'ipt>'); 
}
IncludeJavaScript('/js/jquery.js');


<!-- Adaptado por Tk: Compatible con IE y NS -->
<!-- Script original enviado por Graciela -->
function derecha(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert('Botón derecho inhabilitado')
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)){
alert('Botón derecho inhabilitado')
}
}
document.onmousedown=derecha


function nuevoAjax()
{ 
    /* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
    lo que se puede copiar tal como esta aqui */
    var xmlhttp=false; 
    try 
    { 
        // Creacion del objeto AJAX para navegadores no IE
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
    }
    catch(e)
    { 
        try
        { 
            // Creacion del objet AJAX para IE 
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
        } 
        catch(E) { xmlhttp=false; }
    }
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } 

    return xmlhttp; 
}




function descargar(){
	$("#p_descargar").slideToggle("fast");
	$("#descarga").slideToggle("fast");
 }
 
function descarga_anterior(id){
    document.getElementById("descarga").style.display="block";
    document.getElementById("p_descargar").style.display="none";
	ajax=nuevoAjax();
    ajax.open("GET", "/ajaxs_descargar.php?id="+id+"&num_ale="+Math.random(), true);
    ajax.onreadystatechange=function() 
     {  
	if (ajax.readyState==1) { document.getElementById("descarga").innerHTML="<div align='center'>Cargando...</div>";  }  
	if (ajax.readyState==4) { document.getElementById("descarga").innerHTML=ajax.responseText;  }  
	}
    ajax.send(null);       
	
  }
  
function votar(id)
{
    ajax=nuevoAjax();
    ajax.open("GET", "/ajaxs_votar.php?id="+id+"&num_ale="+Math.random(), true);
    ajax.onreadystatechange=function() 
    { 
        if (ajax.readyState==4)
        { 
            document.getElementById("divvotar").innerHTML=ajax.responseText;
        } 
    }
    ajax.send(null);        
}

function comentario(id,pagina)
{
    ajax=nuevoAjax();
    ajax.open("GET", "/ajaxs_comentario.php?id="+id+"&pagina="+pagina+"&num_ale="+Math.random(), true);
    ajax.onreadystatechange=function() 
    { 
        if (ajax.readyState==4)
        { 
            document.getElementById("divcomentario"+id+"").innerHTML=ajax.responseText;
        } 
    }
	$("#divcomentario"+id+"").show("slow");
    ajax.send(null);  
	
}

function ocultarcomentario(id){ $("#divcomentario"+id+"").hide("slow"); }
function ocultaralerta(divalerta){ $("#"+divalerta+"").hide("slow"); }

function descargar_programa(id) {
  new_window = window.open('http://www.programasxd.com/descargar/'+id+'/', 'popupw','toolbar=0,menubar=0,resizable=0,dependent=0,status=0,width=40,height=40,left=5,top=5,scrollbars=no');
  new_window.focus();
  }
  
function buscador(tipo)  	{
	if (tipo==1) 
		{
		document.getElementById("buscadorgoogle").style.display="block";
    	document.getElementById("buscadorprogramas").style.display="none";
		}
	if (tipo==2) 
		{
		document.getElementById("buscadorgoogle").style.display="none";
    	document.getElementById("buscadorprogramas").style.display="block";
		}
	}



function validateEmailv2(email)
{
// a very simple email validation checking. 
// you can add more complex email checking if it helps 
if(email.length <= 0)
{
return true;
}
var splitted = email.match("^(.+)@(.+)$");
if(splitted == null) return false;
if(splitted[1] != null )
{
var regexp_user=/^\"?[\w-_\.]*\"?$/;
if(splitted[1].match(regexp_user) == null) return false;
}
if(splitted[2] != null)
{
var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
if(splitted[2].match(regexp_domain) == null) 
{
var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
if(splitted[2].match(regexp_ip) == null) return false;
}// if
return true;
}
return false;
}

function validacionacceso(){    
var accs=1;
  	if (document.formacceso.email.value=="" & accs!=0){
		alert("Debes ingresar Email.");
		document.formacceso.email.focus();  
		accs=0;
		}
	if(!validateEmailv2(document.formacceso.email.value) & accs!=0){
		alert("Debes ingresar Email correcto.");
		document.formacceso.email.focus();  
		accs=0;
		}  
 	if (document.formacceso.password.value=="" & accs!=0){
		alert("Debes ingresar Password.");
		document.formacceso.password.focus();  
		accs=0;
		}
 	if (accs==1) { document.formacceso.submit();}
	}




function validacionregistro(){    
var accs=1;
 	if (document.formregistro.email.value=="" & accs!=0){
		alert("Debes ingresar Email.");
		document.formregistro.email.focus();  
		accs=0;
		}
	if(!validateEmailv2(document.formregistro.email.value) & accs!=0){
		alert("Debes ingresar Email correcto.");
		document.formregistro.email.focus();  
		accs=0;
		}  
 	if (document.formregistro.password.value=="" & accs!=0){
		alert("Debes ingresar Password.");
		document.formregistro.password.focus();  
		accs=0;
		}
	if (document.formregistro.password2.value=="" & accs!=0){
		alert("Debes repetir el Passowrd.");
		document.formregistro.password2.focus();  
		accs=0;
		}	
	if (document.formregistro.password.value != document.formregistro.password2.value){
		alert("El password debe de coinicidir.");
		document.formregistro.password2.focus();  
		accs=0;
		}
	if (document.formregistro.nombre.value=="" & accs!=0){
		alert("Debes ingresar Nombre / Empresa.");
		document.formregistro.nombre.focus();  
		accs=0;
		}		

	if (accs==1) { document.formregistro.submit();}
	}
	
function validacionrecordar(){    
var accs=1;
  	if (document.formrecordar.email.value=="" & accs!=0){
		alert("Debes ingresar Email.");
		document.formrecordar.email.focus();  
		accs=0;
		}
	if(!validateEmailv2(document.formrecordar.email.value) & accs!=0){
		alert("Debes ingresar Email correcto.");
		document.formrecordar.email.focus();  
		accs=0;
		}  
	if (document.formrecordar.validacion.value=="" & accs!=0){
		alert("Debes ingresar codigo de Validación.");
		document.formrecordar.validacion.focus();  
		accs=0;
		}
 	if (document.formrecordar.validacion.value!=document.formrecordar.rand_original.value &  accs!=0 ){
		alert("El codigo ingresado no es correcto.");
		document.formrecordar.validacion.focus();  
		accs=0;
		}
 	if (accs==1) { document.formrecordar.submit();}
	}
	
function cerrardiv(id){
   //  document.getElementById(id).style.display="none";
	  $("#"+id+"").slideToggle("fast");
}

function cerrardiv2(id){
     document.getElementById(id).style.display="none";
	 
}
function cambiartipo(idtipo){
    ajax=nuevoAjax();
    ajax.open("GET", "/ajax_categoria.php?idtipo="+idtipo+"&num_ale="+Math.random(), true);
    ajax.onreadystatechange=function() 
    {  
	if (ajax.readyState==1) { document.getElementById("divcategoria").innerHTML='Cargando...';  }  
	if (ajax.readyState==4) { document.getElementById("divcategoria").innerHTML=ajax.responseText;  }  
	}
    ajax.send(null);       
  }
 function cargaversion(idtipo,version,programa,valor){
    ajax=nuevoAjax();
	document.getElementById("divversion").style.display="block";
    ajax.open("GET", "/ajax_version.php?programa="+programa+"&version="+version+"&idtipo="+idtipo+"&valor="+valor+"&num_ale="+Math.random(), true);
    ajax.onreadystatechange=function() 
    { 
        if (ajax.readyState==4)
        { 
            document.getElementById("divversion").innerHTML=ajax.responseText;
        } 
    }
    ajax.send(null);       
}

function cargarequisito(i){
    ajax=nuevoAjax();
 
    ajax.open("GET", "/ajax_requisito.php?i="+i+"&num_ale="+Math.random(), true);
    ajax.onreadystatechange=function() 
    { 
        if (ajax.readyState==4)
        { 
            document.getElementById("divrequisito"+i+"").innerHTML=ajax.responseText;
        } 
    }
    ajax.send(null);       
}