function oscurece(id, color, opacity) {
	
	var navegador=1;
	var layer=document.createElement('div');
	
	if(navigator.userAgent.indexOf("MSIE")>=0)
		navegador=0;
		
	layer.id=id;
	layer.style.width=document.body.offsetWidth+'px';
	layer.style.height=document.body.offsetHeight+500+'px';
	layer.style.backgroundColor=color;
	layer.style.position='absolute';
	layer.style.top=0;
	layer.style.left=0;
	layer.style.zIndex=4;
	layer.style.display='none';
	
	if(navegador==0)
		layer.style.filter='alpha(opacity='+opacity+')';
	else
		layer.style.opacity=opacity/100;
	
	document.body.appendChild(layer);
	
}
