/////////////
<!--
var message="";
////////// DESHABILITA EL CLIC DERECHO DEL MOUSE
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// --> 
///////////// DESHABILITA LA OPCION DE SELECCIONAR TEXTOS E IMAGENES
function disableselect(e){ 
return false 
} 
function reEnable(){ 
return true 
} 
document.onselectstart=new Function ("return false") 
if (window.sidebar){ 
document.onmousedown=disableselect 
document.onclick=reEnable 
} 


//////////////////////////////////////
// funcion solo numeros en campo de formulario
function solonumeros(objeto) 
{ 
var valorCampo; 
var evento_key = window.event.keyCode; 
var numPosPunto = 0; 
var strParteEntera = ""; 
var strParteDecimal = ""; 
var NUM_DECIMALES = 2; 

switch (evento_key) 
{ 
case 48: 
case 49: 
case 50: 
case 51: 
case 52: 
case 53: 
case 54: 
case 55: 
case 56: 
case 57: 
case 46: 
break; 
default: 
window.event.keyCode = 0; 
return false; 
} 

valorCampo = objeto.value; 
if (evento_key == 46) 
if (valorCampo.indexOf(".") != -1) 
{ 
window.event.keyCode = 0; 
return false; 
} 
/* Sólo puede teclear el número de decimales indicado en NUM_DECIMALES */ 
if ((numPosPunto = valorCampo.indexOf(".")) != -1) 
{ 
strParteEntera = valorCampo.substr(0,(numPosPunto - 1)); 
strParteDecimal = valorCampo.substr((numPosPunto + 1), valorCampo.length) 
if (strParteDecimal.length > (NUM_DECIMALES - 1)) 
{ 
window.event.keyCode = 0; 
return false; 
} 
} 
return true; 
} 
//////////////////////////////////////



/////////////
// combo box para saltar de una pagina a otra.
function irapagina(targ,selObj,restore){ 
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}




//Posiciona la ventana flotante en el centro de la pantalla
function posicionar()
{
iz=(screen.width-document.body.clientWidth) / 2; 
de=(screen.height-document.body.clientHeight) / 2; 
moveTo(iz,de); 
window.focus();
}

/// deshabilita los botones para que 
/// no sean oprimido varias veces.
function deshabilita(esto){ 
esto.enviar.disabled = true; 
} 
//////////////////////////////////////
// funcion solo numeros en campo de formulario
function noletras(){
var key=window.event.keyCode;//codigo de tecla.
if (key < 48 || key > 57){//si no es numero 
window.event.keyCode=0;//anula la entrada de texto.
}}
//////////////////////////////////////
// funcion solo numeros decimales campo de formulario
var coma;
coma=false;



//////////////////////////////////////
// funcion solo letras en campo de formulario
var contenido=""
    var Letra;
    var letra;
    var LETRA;
function comprobar(esto){
                    palabra=esto.value;
                    contenido="";
 for (numeroDeLetra=0;numeroDeLetra<palabra.length;numeroDeLetra++){
Letra=palabra.charAt(numeroDeLetra);
 LETRA=Letra.toUpperCase();
letra=Letra.toLowerCase();
 if (LETRA!=letra || Letra==" "){
contenido=contenido+Letra;
  }
 }
 return contenido;
 }
//////////////////////////////////////
// funcion para limitar las palabras en 
// text areas
function maximaLongitud(texto,maxlong) { 
  var tecla, in_value, out_value; 

  if (texto.value.length > maxlong) { 
    in_value = texto.value; 
    out_value = in_value.substring(0,maxlong); 
    texto.value = out_value; 
    return false; 
  } 
  return true; 
} 
// funcion para ocultar/mostrar tablas
function alternando(elemento) {
var meVeo = document.getElementById(elemento).style.display == "block";
document.getElementById(elemento).style.display = (meVeo) ? "none" : "block";
}

function ocultar(id) {
	var d = document.getElementById(id);
	d.style.display = "none";
	d.style.visibility = "hidden";
}


// funcion para abrir ventanas flotantes
function flotante(foto,ancho,alto, nombre){
nuevaVentana = window.open(foto,nombre,"height="+alto+",width="+ancho+",resizable=0,noresize=yes,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no, left=0, top=0")
}

//esta funcion nos sirve para redimencionar una
// ventana
function redimencionar(ancho,alto){
window.resizeTo(ancho,alto);
}


var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ 
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}


function displaylimit(theform,thelimit){
var limit_text='<span id="'+theform.toString()+'">'+thelimit+'</span>'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}

function ietruebody(){ //Dynamicdrive added function
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

if (!document.layers&&!document.all)
event="test"
function showtip2(current,e,text){

if (document.all&&document.readyState=="complete"){
document.all.tooltip2.innerHTML='<marquee style="border:1px solid black">'+text+'</marquee>'
document.all.tooltip2.style.pixelLeft=event.clientX+ietruebody().scrollLeft+10
document.all.tooltip2.style.pixelTop=event.clientY+ietruebody().scrollTop+10
document.all.tooltip2.style.visibility="visible"
}

else if (document.layers){
document.tooltip2.document.nstip.document.write('<b>'+text+'</b>')
document.tooltip2.document.nstip.document.close()
document.tooltip2.document.nstip.left=0
currentscroll=setInterval("scrolltip()",100)
document.tooltip2.left=e.pageX+10
document.tooltip2.top=e.pageY+10
document.tooltip2.visibility="show"
}
}
function hidetip2(){
if (document.all)
document.all.tooltip2.style.visibility="hidden"
else if (document.layers){
clearInterval(currentscroll)
document.tooltip2.visibility="hidden"
}
}

function scrolltip(){
if (document.tooltip2.document.nstip.left>=-document.tooltip2.document.nstip.document.width)
document.tooltip2.document.nstip.left-=5
else
document.tooltip2.document.nstip.left=150
}

