
var flashPos = 0;
var timeOutId;
var currentId;
function flash(id) {
	flashPos += 0.3;
	changeOpac((Math.sin(flashPos)+1)*15, id)
	if(timeOutId) clearTimeout(timeOutId);
	if(currentId != id) {
		if(currentId) changeOpac(0, currentId);
	}
	currentId = id;
	timeOutId = setTimeout('flash("'+id+'")', 50);
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var el = document.getElementById(id).style;
	el.opacity = (opacity / 100);
	el.MozOpacity = (opacity / 100);
	el.KhtmlOpacity = (opacity / 100);
	el.filter = "alpha(opacity=" + opacity + ")";
}