// JavaScript Document
	var ns4 = (document.layers) ? true : false;
	var ie4 = (document.all) ? true : false;
	var ns6 = (document.getElementById&&!document.all) ? true:false;


	function getElementStyle(whichLayer) {		
		if (document.getElementById) {
			// this is the way the standards work
			var style2 = document.getElementById(whichLayer).style;
		} else if (document.all) {
			// this is the way old msie versions work
			var style2 = document.all[whichLayer].style;
		} else if (document.layers) {
			// this is the way nn4 works
			var style2 = document.layers[whichLayer].style;
		}
		
		return style2;
	}

	function getElement(whichLayer) {
		if (document.getElementById) {
			// this is the way the standards work
			var objElement = document.getElementById(whichLayer);
		} else if (document.all) {
			// this is the way old msie versions work
			var objElement = document.all[whichLayer];
		} else if (document.layers) {
			// this is the way nn4 works
			var objElement = document.layers[whichLayer];
		}
		
		return objElement;
	}

	function getElements() {
		if (document.all) {
			var objElements = document.all;
		} else {
			var objElements = document.layers;
		}
		
		return objElements;
	}

	function goToWebSite(obj) {
			if (obj.options[obj.selectedIndex].value!="") {
					obj.form.action = obj.options[obj.selectedIndex].value;
					obj.form.submit();
			}
	}

	function goToURL(strLink, strTarget) {
		eval(strTarget + ".document.location.href = '" + strLink + "'");
	}


	function onDelete(formulario, msg) {
		resp = confirm(msg);
		return resp;
	}

	function onDeleteLink(wlink, msg) {
		resp = confirm(msg);
		if (resp == true) {
			window.location.href = wlink;
		}
	}

	function Tecla(e)
	{
		if (document.all) // Internet Explorer
			var tecla = event.keyCode;
		else if(document.layers) // Nestcape
			var tecla = e.which;
	
		if (tecla > 47 && tecla < 58) // numeros de 0 a 9
			return true;
		else{
			if (tecla != 8) // backspace
				event.keyCode = 0;
				//return false;
			else
				return true;
		}
	}	
	
	function WindowPopup(page, tg, width, height){
		var left = (screen.width - width) / 2;
		var top = (screen.height - height) / 2;
		newwindow = window.open(page, tg,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,WIDTH=' + width + ',HEIGHT=' + height + ',top=' + top + ',left=' + left);
		newwindow.focus();
	}	
	
	function ChangeRowStyle(objElementRow, strClass) {
		objElementRow.className = strClass;
		for (intCount=0;intCount<objElementRow.childNodes.length;intCount++) {		
			objElementRow.childNodes[intCount].className = strClass;
		}			
	}	