function fade(elemId, final_opacity, interval) {
	// get the element
	var elem = document.getElementById(elemId);
	// find the current opacity: default to 100, ie. opaque
	if(elem.style.opacity) {
    current_opacity = elem.style.opacity*100;
	} else {
		current_opacity = 100;
		setOpacity(elem, current_opacity);
	}
	// are we there yet?
	if(current_opacity == final_opacity) return true;
	// make the change
	var next_opacity = current_opacity;
	next_opacity += current_opacity < final_opacity ? 1 : -1;
	setOpacity(elem, next_opacity);
	// continue the process
	var functioncall = "fade('"+elemId+"', "+final_opacity+", "+interval+");";
	elem.fadetimeout = setTimeout(functioncall, interval);
}

function setOpacity(elem, level) {
	var object = elem.style;
	object.opacity = object.mozOpacity = object.khtmlOpacity = level/100;
	object.filter = 'alpha(opacity='+level+')';
}

window.onload = function() {
	var functioncall = "fade('index-fade-start', 0, 10);";
	setTimeout(functioncall, 3000);
}
