function setOpacity(obj,value)
{
if(typeof(obj)=='string') obj=document.getElementById(obj);
obj.style.opacity = (value / 100);
obj.style.MozOpacity = (value / 100);
obj.style.KhtmlOpacity = (value / 100);
obj.style.filter = "alpha(opacity=" + value + ")";
}
var Alpha = 50;
obj = document.getElementById("레이어이름");
obj.style.filter = "alpha(opacity=" + Alpha + ")"; // IE/Win
obj.style.KhtmlOpacity = (Alpha / 100); // Safari 1.1 or lower, Konqueror
obj.style.MozOpacity = (Alpha / 100); // Older Mozilla+Firefox

