
var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEOVER) 
function mostrarConsejo(e,id){
	document.getElementById(id).style.display="";
		
	var posicX = 0
	var posicY = 0
	
	if (IE) { posicX = event.clientX + document.body.scrollLeft;
	posicY = event.clientY + document.body.scrollTop}
	else { 
		posicX = e.pageX; 
		posicY = e.pageY;
	};
	if (posicX < 0) {posicX = 0};
	if (posicY < 0) {posicY = 0};

	document.getElementById(id).style.left = posicX+"px";
	document.getElementById(id).style.top = (10+posicY)+"px";
	
}

function mostrarConsejoCreacion(e,id){
	document.getElementById(id).style.display="";
		
	var posicX = 0
	var posicY = 0
	
	if (IE) { posicX = event.clientX + document.body.scrollLeft;
	posicY = event.clientY + document.body.scrollTop}
	else { 
		posicX = e.pageX; 
		posicY = e.pageY;
	};
	if (posicX < 0) {posicX = 0};
	if (posicY < 0) {posicY = 0};

	document.getElementById(id).style.left = (posicX-175)+"px";
	document.getElementById(id).style.top = (posicY)+"px";
	
}


function ocultarConsejo(id){
	document.getElementById(id).style.display="none";
}
function activaPagina(divGlobal){
 muestraSelect(divGlobal);
 new Element.remove("anulaEnlaces"); 
}
function bloqueaPagina(divGlobal){
	ocultaSelect(divGlobal);
	new Insertion.After(divGlobal,"<div id=\"anulaEnlaces\" style=\"background-color: Gray; position: absolute; top: 0;	left: 0; display:none; z-index:90; \"></div>");
	$("anulaEnlaces").style.width= new Element.getDimensions(divGlobal).width+"px";
	$("anulaEnlaces").style.height= new Element.getDimensions(divGlobal).height+"px";
 	new Effect.Parallel(
 		 [
		 new Effect.Opacity("anulaEnlaces", {duration:0.1, from:1.0, to:0.01,sync:true}) 
		 ], 
		 {duration: 0.1,  beforeFinish: function(effect){
		 				  if ($('anulaEnlaces')!=undefined)
		 		 		  Try.these(document.getElementById('anulaEnlaces').style.display="");

								 } 
		 }
		 ); 
}

	function ocultaSelect(paragraph){
		paragraph = $(paragraph);
		var selects = $A(paragraph.getElementsByTagName('select'));
		selects.each( function(formul){
  				formul.style.visibility="hidden";
			});
	}
	function muestraSelect(paragraph){
		try{
			paragraph = $(paragraph);
			var selects = $A(paragraph.getElementsByTagName('select'));
			selects.each( function(formul){
	  				formul.style.visibility="visible";
				});
		}catch(e){}
	}
