// JavaScript Document

function abrir(web, nombre) {
	width = 770; height = 560;
	xposition=0; yposition=0;
	if (parseInt(navigator.appVersion) >= 4 ) {
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	args = "width=" + width + "," 
	+ "height=" + height + "," 
	+ "location=0, menubar=0, resizable=0, scrollbars=yes,status=1, titlebar=1, toolbar=0, hotkeys=0,"
	+ "screenx=" + xposition + "," //NN Only
	+ "screeny=" + yposition + "," //NN Only
	+ "left=" + xposition + "," //IE Only
	+ "top=" + yposition; //IE Only
	
	ventana = window.open(web,nombre,args);
	ventana.focus();
}

// JavaScript Document
var highlightcolor="#F6FF00"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
	eventobj=ns6? e.target : event.srcElement
	if (previous!=''){
		if (checkel(previous))
			previous.style.backgroundColor=''
		previous=eventobj;
		if (checkel(eventobj))
			eventobj.style.backgroundColor=highlightcolor
	}
	else {
		if (checkel(eventobj))
			eventobj.style.backgroundColor=highlightcolor
		previous=eventobj
	}
}
