	
	//Javascript
	
	function normal (){
		document.getElementById('nota_interna').className = 'nota_chica';
	}
	function media (){
		document.getElementById('nota_interna').className = 'nota_media';
	}
	function mayor (){
		document.getElementById('nota_interna').className = 'nota_grande';
	}

	//Inicio de Sesión

   function SiFocus(element) {
     if (element.value == element.defaultValue) {
       element.value = '';
     }
   }
   function SiBlur(element) {
     if (element.value == '') {
       element.value = element.defaultValue;
     }
   }
   
// Ligas externas
	function initLinks() {
		for (i in document.links) {
			link = document.links[i];
			if (link.rel && link.rel.indexOf('external')!=-1) {
				link.onclick = onExternalLinkActivate;
				link.onkeypress = onExternalLinkActivate;
			}
		}
	}

	function onExternalLinkActivate() {
		window.open(this.href);
		return false;
	}

	window.onload = initLinks;
	
// ZOOM	

cookie_name = "fontsize"; 

function setCookie() { 

    if(document.cookie != document.cookie) {  
    index = document.cookie.indexOf(cookie_name); 
    } 
    else {  
    index = -1; 
    } 

    if (index == -1) { 
    document.cookie=cookie_name+"="+newsfont+"; expires=Monday, 01-Apr-2008 05:00:00 GMT"; 
    } 

} 

function getCookie() { 
    if(document.cookie) { 
    index = document.cookie.indexOf(cookie_name); 
    if (index != -1) { 
        namestart = (document.cookie.indexOf("=", index) + 1); 
        nameend = document.cookie.indexOf(";", index); 
        if (nameend == -1) nameend = document.cookie.length; 
        val = document.cookie.substring(namestart, nameend); 
        return parseInt(val); 
    } 
    } 
} 




var newsfont = 14; 
function changeFont(id) { 

if (document.getElementById) { 
        document.getElementById(id).style.fontSize = newsfont+"px"; 
    } else { 
        if (document.layers) { 
            document.layers[id].fontSize = newsfont+"px"; 
        } else { 
            if (document.all) { 
                eval("document.all." + id + ".style.fontSize = \"" + newsfont + "px \""); 
            } 
        } 
    } 
     
    // esto arregla scroll al utilizar layers 
//    updateHeight();  
    setCookie(); 
} 
// aqui se produce el error 
function larger() { 
    if (newsfont < 25) { 
        newsfont= newsfont +2; 
        changeFont('content'); 
    } 
} 

function smaller() { 
    if (newsfont > 5) { 
    newsfont= newsfont -2; 
    changeFont('content'); 
    } 
} 

function normal() { 
    if (newsfont != 14) { 
    newsfont= newsfont = 14; 
    changeFont('content'); 
    } 
} 
