function do_png_check() {
	var b =navigator.userAgent.toLowerCase();
	if (b.indexOf('msie')>0
		&& parseFloat(b.substring(b.indexOf('msie')+5)) < 7)
		{ // detect for IE (could be more specific to PC and version, but this works for the test)
		is = document.getElementsByTagName('IMG'); // get all images
		for(x=0; x<is.length; x++){ // cycle through those images
			if(is[x].src.indexOf('.png')){ // only do this to png files
				is[x].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+is[x].src+"', sizingMethod='scale')"; // apply the filter stuff that makes IE do it's magic
				is[x].src = "/images/null.gif"; // replace the image with a clear gif so that the filter can show through
			}
		}
	}
}

function set_email_links(cl) {
	$$("span."+cl).each( function(em) {
		var addr = em.get("text");
		addr = addr.replace(" _AT_ ","@");
		var el = new Element("a", {
			'href' : 'mailto:' + addr,
			'text' : addr
		});
		el.replaces(em);
	});
}

/************************************
general init
************************************/

window.addEvent('domready', function() {
	do_png_check();
	set_email_links("email");
});
