function click(e) {
// Explorer
if (IE)
if (event.button == 2){
accion() ;
return false ;
}
// Netscape
if (NS)
if (e.which == 3) {
accion() ;
return false ;
}
}

function accion() {
window.status = '© Copyright Jerónimo Armario (2003-2010)' ;
if (IE) alert('© Copyright Jerónimo Armario (2003-2010)');
return ;
}
var NS = (document.layers) ;
var IE = (document.all) ;
if (NS) document.captureEvents(Event.MOUSEDOWN) ;
document.onmousedown = click ; 

function hidestatus(){
window.status='Gescolar - La gestión escolar inteligente.'
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus

function openWindow(URL,Name,Features) {
  var newWindow = window.open(URL,Name,Features);
  newWindow.focus();
}

//Last Updated on May 21, 2008
//documentation for this script at
//http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
//
//	Uso: changecss('.tonica','color','#CC3333');
//
function changecss(theClass,element,value) {
	var cssRules;
	if (document.all) {
		cssRules = 'rules';
	} else if (document.getElementById) {
		cssRules = 'cssRules';
	}
	var added = false;
	for (var S = 0; S < document.styleSheets.length; S++){
		for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
			if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
				if(document.styleSheets[S][cssRules][R].style[element]){
					document.styleSheets[S][cssRules][R].style[element] = value;
					added=true;
					break;
				}
			}
		}
		if(!added){
			if(document.styleSheets[S].insertRule){
				document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
			} else if (document.styleSheets[S].addRule) {
				document.styleSheets[S].addRule(theClass,element+': '+value+';');
			}
		}
	}
}

// Hace un trim.
function trim(str)
{
	return str.replace(/^\s*|\s*$/g,"");
}

// Reemplaza los dobles (o más) caracteres en blanco (de cualquier tipo) por un espacio.
function remove_double_spaces(str)
{
	return str.replace(/\s{2,}/g," ");
}

// Even (inpar):
function even(value)
{
	return (value%2 == 0) ? true : false;
}
