 var Mensajes = new Array();
 Mensajes[1]="Opción ejecutandose en otro proceso. Consulte al administrador del sistema.";


// Inhabilitar tecla de funciones desde F2 a F12
document.onkeydown = function(e) 
					{ 
						if(e) 
							document.onkeypress = function(){return true;} 

						var evt = e?e:event; 
						if (evt.keyCode >= 113 && evt.keyCode <= 123)
						{ 
							if(e) 
								document.onkeypress = function(){return false;} 
							else 
							{ 
								evt.keyCode = 0; 
								evt.returnValue = false; 
							} 
						} 
					} 
function ObtenerFechaActual()
{
	var FechaActual=new Date();	
	var Dia=FechaActual.getDate()		
	var Mes=FechaActual.getMonth()+1
	var Anio=FechaActual.getFullYear()   
	if (Dia<10)			
	{
		Dia='0'+Dia;	
	}
	var FechaActual=Dia+'/'+Mes+'/'+Anio;	
	return FechaActual;
}					
<!-- EFECTO DE NAVEGACIÓN EN LAS TABLAS -->
function tables (str_tableid, // table id (req.)
		 num_header_offset, // how many rows to skip before applying effects at the begining (opt.)
		 num_footer_offset, // how many rows to skip at the bottom of the table (opt.)
		 str_odd_color, // background color for odd rows (opt.)
		 str_even_color, // background color for even rows (opt.)
		 str_mover_color, // background color for rows with mouse over (opt.)
		 str_onclick_color // background color for marked rows (opt.)
	        )
{
 // skip non DOM browsers
 if (typeof(document.all) != 'object') return;

 // validate required parameters
 if (!str_tableid) return alert ("No table(s) ID specified in parameters");
 var obj_tables = (document.all ? document.all[str_tableid] : document.getElementById(str_tableid));
 if (!obj_tables) return alert ("Can't find table(s) with specified ID (" + str_tableid + ")");

 // set defaults for optional parameters
 var col_config = [];
 col_config.header_offset = (num_header_offset ? num_header_offset : 0);
 col_config.footer_offset = (num_footer_offset ? num_footer_offset : 0);
 col_config.odd_color = (str_odd_color ? str_odd_color : '#ffffff');
 col_config.even_color = (str_even_color ? str_even_color : '#dbeaf5');
 col_config.mover_color = (str_mover_color ? str_mover_color : '#6699cc');
 col_config.onclick_color = (str_onclick_color ? str_onclick_color : '#4C7DAB');

 // init multiple tables with same ID
 if (obj_tables.length)
    for (var i = 0; i < obj_tables.length; i++)
        tt_init_table(obj_tables[i], col_config);
 // init single table
 else
    tt_init_table(obj_tables, col_config);
}

<!-- INICIALIZA EL EFECTO DE NAVEGACIÓN EN LAS TABLAS -->
function tt_init_table (obj_table, col_config) {
	var col_lconfig = [],
		col_trs = obj_table.rows;
	for (var i = col_config.header_offset; i < col_trs.length - col_config.footer_offset; i++) {
		col_trs[i].config = col_config;
		col_trs[i].lconfig = col_lconfig;
		col_trs[i].set_color = tt_set_color;
		col_trs[i].onmouseover = tt_mover; 
		col_trs[i].onmouseout = tt_mout;
		col_trs[i].onmousedown = tt_onclick;
		col_trs[i].order = (i - col_config.header_offset) % 2;
		col_trs[i].onmouseout();
	}
}

function tt_set_color(str_color) {
	this.style.backgroundColor = str_color;
}

<!-- FUNCIONES MANEJADORAS DE EVENTOS -->
function tt_mover () {
	if (this.lconfig.clicked != this)
		this.set_color(this.config.mover_color);
}
function tt_mout () {
	if (this.lconfig.clicked != this)
		this.set_color(this.order ? this.config.odd_color : this.config.even_color);
}
function tt_onclick () {
	if (this.lconfig.clicked == this) {
		this.lconfig.clicked = null;
		this.onmouseover();
	}
	else {
		var last_clicked = this.lconfig.clicked;
		this.lconfig.clicked = this;
		if (last_clicked) last_clicked.onmouseout();
		this.set_color(this.config.onclick_color);
	}
}
function RecargarIndexPresupuesto(Sesion,DescripcionOpcion,Municipio,NumeroOpcionMenu)
{
	// Se recarga Index_Presupuesto.cgi, para que anule los registros de Monitoreo.
	var EstadoOpciones=window.opener.document.EstOpc.EstadoOpciones.value;       
	window.opener.location='index_presupuesto.cgi?Vsesion='+Sesion+'&DescripcionCGI='+DescripcionOpcion+'&Municipio='+Municipio+'&EstadoOpciones='+EstadoOpciones+'&NumeroOpcionMenu='+NumeroOpcionMenu;	
		
}
function FormatoNumerico(fld,e,longtotal) 
	{ // Para el formato de números libres sin máscara de entrada, recibe el evento y tambien recibe 
		// la longitud a permitir, si es blanco se deja libre la longitud 		
		// Hecho por: Johanna Ortiz
		
		var sep = 0;
		var key = '';
		var i = j = 0;
		var len = len2 = 0;
		var strCheck = '0123456789';
		var aux = aux2 = '';						
		var whichCode = (window.Event) ? e.which : e.keyCode;				
		
		if ( Ini1 != Ini2 ){ 
			Ini1=0;
			Ini2=0;
			fld.value = '';
			fld.focus();
			}		
		;		
		if (whichCode == 13) return true;  // Enter		
		key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado		
		if (strCheck.indexOf(key) == -1 ) return false;  // Las teclas no validas
		len = fld.value.length;
		if (longtotal!="" && len>(longtotal-1)) return true;
		for(i = 0; i < len; i++) if ((fld.value.charAt(i) != '0') ) break;
		aux = '';
		punto='.';
		haypunto='';
		// Se verifica si ya se captó un decimnal
		for(; i < len; i++) if (fld.value.charAt(i)=='.') haypunto=1;		
		// se agregan más dígitos a la cadena del valor captado desde el teclado
		i=0;
		if (haypunto!=1 || key!='.'){
		 	for(; i < len; i++)	if (strCheck.indexOf(fld.value.charAt(i))!=-1 || key!='.') aux += fld.value.charAt(i);		
			aux += key;
			len = aux.length;
			fld.value=aux;

		}	
		return false;
	}

/*******************************************************************************************************/
/******************** FUNCION DE FORMATO MONEDA***********************/
function FormatoMoneda(fld, milSep, decSep, e) 
	{ // Para el formato de moneda con números de decimales libres sin máscara de entrada		
		
		var sep = 0;
		var key = '';
		var i = j = 0;
		var len = len2 = 0;
		var strCheck = '0123456789';
		var aux = aux2 = '';						
		var whichCode = (window.Event) ? e.which : e.keyCode;				
		if ( Ini1 != Ini2 ){ 
			Ini1=0;
			Ini2=0;
			fld.value = '';
			fld.focus();
			}		
		;		
		if (whichCode == 13) return true;  // Enter		
		key = String.fromCharCode(whichCode);  // Capta el valor desde código el teclado		
		if (strCheck.indexOf(key) == -1 && key!='.') return false;  // Las teclas no validas
		len = fld.value.length;
		for(i = 0; i < len; i++) if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
		aux = '';
		punto='.';
		haypunto='';
		// Se verifica si ya se captó un decimnal
		for(; i < len; i++) if (fld.value.charAt(i)=='.') haypunto=1;		
		// se agregan más dígitos a la cadena del valor captado desde el teclado
		i=0;
		if (haypunto!=1 || key!='.'){
		 	for(; i < len; i++)	if (strCheck.indexOf(fld.value.charAt(i))!=-1 || key!='.') aux += fld.value.charAt(i);		
			aux += key;
			len = aux.length;
			fld.value=aux;
		}	
		return false;
	}
//  End -->
/*****************************************************************************************/   