/**
 * --------------------------------------------------------------------
 * Scripts Javascritp básicos
 * Version: 1, 28.07.2008
 * Por Jorge Vergara, jvergara@trabajando.com
 *
 * [FOR] Respositorio de todos los script de trabajando pre 2008 que antes estaban en cualquier parte del documento.
 * La idea es que estén 1) todos juntos, 2) documentados, así podremos saber si son o no necesarios.
 * --------------------------------------------------------------------
 */
function ventana(archivo,nombre,ancho,alto){
	LeftPosition=(screen.width)?(screen.width-ancho)/90:100;
	TopPosition=(screen.height)?(screen.height-alto)/90:100;
	trabaja = window.open(archivo,nombre,"left="+LeftPosition+",top="+TopPosition+",height="+alto+",width="+ancho+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,maximized");
}

function ventana2(archivo,nombre,ancho,alto) {
/**
 * Abre una ventana nueva, en el vínculo se sugiere usar:
 * href="javascript:ventana('verpostulanteb.cfm','verpostulante',600,500)
 **/
	LeftPosition=(screen.width)?(screen.width-ancho)/2:100;
	TopPosition=(screen.height)?(screen.height-alto)/2:100;
	anexosayuda = window.open(archivo,nombre,"left="+LeftPosition+",top="+TopPosition+",height="+alto+",width="+ancho+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,maximized");
}
function ventana3(archivo,nombre,ancho,alto){
	LeftPosition=(screen.width)?(screen.width-ancho)/2:100;
	TopPosition=(screen.height)?(screen.height-alto)/2:100;
	anexosayuda = window.open(archivo,nombre,"left="+LeftPosition+",top="+TopPosition+",height="+alto+",width="+ancho+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,maximized");
}

function mOvr(src,clrOver) {
	if (typeof event != "undefined" ) { // Se hace esta validación para evitar errores en FireFox
		if (!src.contains(event.fromElement)) {
			src.style.cursor = 'hand';
			src.bgColor = clrOver;
		}
	}
}
					  
function mOut(src,clrIn) {
	if (typeof event != "undefined") { // Se hace esta validación para evitar errores en FireFox
		if (!src.contains(event.toElement)) {
			src.style.cursor = 'default';
			src.bgColor = clrIn;
		}
	}
}
