//flashmessage fadeout
(function(){
	if (!document.getElementById || !document.getElementById("flashmessage")) return;
	var f = document.getElementById("flashmessage");
	var opacity = f.style.opacity;
	fadeOut("flashmessage",opacity);
})();

function fadeOut(el, opacity) {
	var optionsObj = {
		step: .02,
		speed: 88,
		delay: 5000
	};
	setTimeout("fadeOut.fading('"+ el +"', "+ parseFloat(opacity, 10) +", "+ parseFloat(optionsObj.step, 10) +", "+ parseInt(optionsObj.speed, 10) +")", parseInt(optionsObj.delay, 10));
};
fadeOut.fading = function(el, opacity, step, speed) {
	opacity -= step;
	
	var f = document.getElementById(el);
	if (opacity < 0) {
		f.style.opacity = 0;
	} else {
		if(IE) f.style.cssText= "filter:alpha(opacity="+opacity+");";
		else f.style.opacity = opacity;
		setTimeout("fadeOut.fading('"+ el +"', '"+ opacity +"', "+ step +", "+ speed +")", speed);
	};
};
