
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//this holds the innerhtmls of id's that have been removed
var innerHtmls = new Array();


//removes everything inside the given id and store the contents to later replace it
function removeLocalID(id)
{
	//store the html
	innerHtmls[id] = document.getElementById(id).innerHTML;
	//remove the object
	document.getElementById(id).innerHTML = '';
}

function replaceLocalID(id)
{
	if(innerHtmls[id])
		document.getElementById(id).innerHTML = innerHtmls[id];

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var timerIds = new Object;
  var opacity = new Object;
  var pause = new Object;

  function fadeTimer(id)
  {
  	 if(timerIds[id])
  	 {
  	 	clearTimeout(timerIds[id]);
  	 	delete timerIds[id];
  	 }

  	 pause[id] = pause[id] - 1;

  	 if(pause[id] <= 0)
  	 {
	  	 var e = document.getElementById(id);
	  	 opacity[id] = opacity[id] - 1;
	  	 e.style.opacity = opacity[id]/10;
		 e.style.filter = 'alpha(opacity=' + opacity[id]*10 + ')';
  	 }

  	 if(opacity[id] > 0)
  	 {
  	 	timerIds[id] = setTimeout("fadeTimer('"+id+"')",100);
  	 }
  }