// JavaScript Document
/*-----------------------------------------------------------------------------------
	Make Opaque
	Author: Joel Watson, August 27, 2008
	
	I hate that the opacity rule is not supported in CSS 2.  I also hate
	having non-validating CSS.  So other than using a ton of transparent
	images to get a simple opacity effect, the only option is to use 
	JavaScript.  This works because JS applies the style to elements AFTER
	they've been rendered, keeping the non-validating rule out of the CSS.
	
	So when the CSS validator rolls over the document, it's none the wiser :)
	
	This script is terribly simple.  It just quickly roams the HTML elements,
	looking for elements that have a class of "opaque" (pretty original, huh?).
	
	It then applies the opacity inline to the element, thus bypassing the
	validation problem.
	
	Currently, this script has a hard-coded value for the level of transparency.
	It could easily be extended, however, by using a naming convention in the
	classes (like "opaque-85"), and then using a split function to grab the value
	of the opacity.  Sounds good, but I'm too lazy to do that :).
-----------------------------------------------------------------------------------*/


function makeOpaque() {
	var allElems = document.all ? document.all : document.getElementsByTagName('*');
	for(i=0;i<allElems.length;i++) {
		if(allElems[i].className.match("opaque")) {
			allElems[i].style.opacity = .85;
			allElems[i].style.filter = 'alpha(opacity=85)';
		}
	}
}