/*
Set the opacity of an object on a page.
Example: setOpacity("MyDiv", 50); // 50% opacity
Warning: DIVs must have a CCS width set for this to work in IE. Use tables instead where possible.

Dependencies: basicfunctions.js
Author: Andre Mekkawi
*/
function setOpacity(id, value) {
	if (document.getElementById) {
		var obj = document.getElementById(id);
		if (obj && obj.style) {
			if (!isUndefined(obj.style.opacity)) {
				obj.style.opacity = (value / 100);
				return true;
			}
			else if (!isUndefined(obj.style.MozOpacity)) {
				obj.style.MozOpacity = (value / 100);
				return true;
			}
			else if (!isUndefined(obj.style.KhtmlOpacity)) {
				obj.style.KhtmlOpacity = (value / 100);
				return true;
			}
			else if (!isUndefined(obj.style.filter)) {
				obj.style.filter = "alpha(opacity=" + value + ")";
				return true;
			}
		}
	}
	return false;
}