function setupopac(opx) {
		
		document.getElementById("scrollme").style.opacity=opx/100
		document.getElementById("scrollme").style.MozOpacity=opx/100
		document.getElementById("scrollme").style.KhtmlOpacity=opx/100
		document.getElementById("scrollme").style.filter="alpha(opacity=" + opx + ")"
}
 
function fadeout(){ 
	//if(opac>0) { //If color is not black yet
	//	opac-=2; // increase color darkness
  if (step<0) {
	if (opc>0) {
		opc+=step;
		setupopac(opc)
		setTimeout("fadeout()",10); 
	}
	else {
		step = 1
		if(document.getElementById != null) {
  				var heading = document.getElementById("scrollme")
   				heading.firstChild.nodeValue = msgs[msgIX]
 			}else{
  				if(navigator.appName == "Microsoft Internet Explorer") {
   				var heading = document.all.item("scrollme")
   				heading.innerText = msgs[msgIX]
  				}
  
 			}
		setTimeout("fadeout()",10);
	}
	
   } else    {
       if (opc<100) {
		opc+=step;
		setupopac(opc)
		setTimeout("fadeout()",10); 
	   }
	  else {
	   step = -1
	   }
   
   }	
	
}

   
function scrollMessages(milliseconds) {
 if (msgs.length>0)
   {
     window.setInterval("displayMessage()", milliseconds);
   }
}
function displayMessage() {
 fadeout()
 
 
 //fadein()
 ++msgIX
 msgIX %= msgs.length
}
