var nav = new navegadorUtils();
function navegadorUtils (){ 
	var ua = navigator.userAgent;
	this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
	this.isMSIE5 = this.isMSIE && (ua.indexOf('MSIE 5') != -1);
	this.isMSIE5_0 = this.isMSIE && (ua.indexOf('MSIE 5.0') != -1);
	this.isGecko = ua.indexOf('Gecko') != -1;
	this.isSafari = ua.indexOf('Safari') != -1;
	this.isOpera = ua.indexOf('Opera') != -1;
	this.isMac = ua.indexOf('Mac') != -1;
	this.isNS7 = ua.indexOf('Netscape/7') != -1;
	this.isNS71 = ua.indexOf('Netscape/7.1') != -1;
}

//**********************************//
// Funcion : openWindow
//***********************************//
function openWindow(url, args) {
	height = args['height'];
	width =  args['width'];
	if (args['scrollbars']==undefined)
		scrollbars="no";
	else
		scrollbars=args['scrollbars'];
	//"top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable
	
	win = window.open(url, "popup" + new Date().getTime(), "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars);
}

//**********************************//
// Funcion : Valnum solo permite valores n?mericos
//***********************************//
function valnum(evt) {
	if (//evt.keyCode != 190 && // .
	    evt.keyCode != 9 && // tab
	    evt.keyCode != 8 && // borrar <-
		!((evt.keyCode >= 96 && evt.keyCode <=105) //|| evt.keyCode == 110 //110 el . tn
		) && // teclado numerico
		!(evt.keyCode >= 48 && evt.keyCode <=57) && //numeros de teclado.
		!(evt.keyCode >= 37 && evt.keyCode <=40) && //flechas
		evt.keyCode != 46 && //sup
		evt.keyCode != 116 && //F5
		!evt.ctrlKey && !evt.altKey && !evt.shiftKey && // CTRL, ALT, SHIFT
		!String.fromCharCode(evt.keyCode).match(/\d/)) { // num
		evt.returnValue = false;
		return false;
	}
}