function fade (element, from, to, current) {
		
	if (typeof current == 'undefined') {
	
		current = from;
	}
	
	if (typeof element.style.opacity != 'undefined') {
	
		element.style.opacity = current;
	}
	
	else if (typeof element.style.filter != 'undefined') {
		
		element.style.filter ='progid:DXImageTransform.Microsoft.Alpha(opacity=' + (current * 100) + ')';
	}
	
	if (from > to) {
	
		current -= 0.1;
		current = Math.round(current * 100) / 100;
		
		if (current >= to) {
	
			setTimeout(function () { 
	
				fade(element, from, to, current); 
			},	25);
		}
	}
	
	else {
	
		current += 0.1;
		current = Math.round(current * 100) / 100;
		
		if (current <= to) {
	
			setTimeout(function () { 
			
				fade(element, from, to, current); 
			}, 25);
		}
	}
}