function fPos(obj) {
	var cL=0;var cT=0;
	if(typeof obj.offsetParent != 'undefined'){
		do{
		cL+=obj.offsetLeft;
		cT+=obj.offsetTop;
		}while(obj=obj.offsetParent);
	}else if(obj.x){cL+=obj.x;cT+=obj.y;};return {x:cL,y:cT};
}
addDOMLoadEvent=(function(){var e=[],t,s,n,i,o,d=document,w=window,r='readyState',c='onreadystatechange',x=function(){n=1;clearInterval(t);while(i=e.shift())i();if(s)s[c]=''};return function(f){if(n)return f();if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false);/*@cc_on@*//*@if(@_win32)d.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};@*//*@end@*/if(/WebKit/i.test(navigator.userAgent))t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10);o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();

function showHideKey(){
	document.getElementById("protec").style.display=(this.checked)?"block":"none";
}

function init(){
	var a;
	var as=document.body.getElementsByTagName("a");
	for(var i=0;i<as.length;i++){
		if(as[i].className=="masinfo"){
			a=as[i];
			a.onmouseover=showInfo;
			a.onmouseout=hideInfo;
			a.onclick=function(){return false;}
		}
	}
	document.getElementById("chec").onclick=showHideKey;
	
	document.getElementById("makelink").onsubmit=function(){
		/*
		var btncrear=document.getElementById("btncrear");
		
		var url=document.getElementById("btncrear").value;
		if(document.getElementById("chec").checked){
			var clave=document.getElementById("Clave").value;
		}
		//make link
		
		
		return false;
		*/
	}
}
function showInfo(){
	var pos=fPos(this);
	var glob=document.getElementById("glob");
	var num=this.href.split("#")[1];
	
	var gs=glob.style;
	gs.top=(pos.y-13)+"px";
	gs.left=(pos.x+this.offsetWidth)+"px";
	
	document.getElementById("contglob").innerHTML = "<p>"+valors[num]+"</p>";
	gs.display="block";
	return false;
}
function hideInfo(){
	document.getElementById("glob").style.display="none";
}