<!--
var list; 
var tickerObj; 
var hex = 600;

function pause(numberMillis) {
}
     
     
function fadeText(divId) {
  if(tickerObj)
  {
    if(hex>51) {
      hex-=5; // increase color darkness
      tickerObj.style.color="rgb("+hex+","+hex+","+hex+")";
      setTimeout("fadeText('" + divId + "')", fadeSpeed); 
    } else {
      hex=600; //reset hex value
     }
  }
}

function initialiseList(divId) {
  tickerObj = document.getElementById(divId);
  if(!tickerObj)
    reportError("Could not find a div element with id \"" + divId + "\"");
  list = tickerObj.childNodes;
  if(list.length <= 0)
    reportError("The div element \"" + divId + "\" does not have any children");
  for (var i=0; i<list.length; i++) {
    var node = list[i];
    if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) 
//    	alert(node);
    	tickerObj.removeChild(node);
//    alert (list.length);
  }
//window.setTimeout("run('" + divId + "', 0)", 2000);
  run(divId, 0);
}

function run(divId, count) {
//  fadeText(divId);
  list[count].style.display = "block";
  if(count > 0)
    list[count-1].style.display = "none";
  else
    list[list.length-1].style.display = "none";
  count++;
  if(count == list.length)
    count = 0;
  if (list[count].innerHTML != '')
	  window.setTimeout("run('" + divId + "', " + count+ ")", 100);
  else 
	  window.setTimeout("run('" + divId + "', " + count+ ")", interval * 1000);
}
function reportError(error) {
  alert("The script could not run because you have errors:\n\n" + error);
  return false;
}

var interval = 3; // interval in seconds
var fadeSpeed = 40;

// Pop-up window function
function popWin(url,width,height) {
	var x;
	if (width==x) {
		width=475;
	}
	if (height==x) {
		height=220;
	}
	eval ("popupWin = window.open('', 'mainwindow', 'scrollbars=yes,resizable=yes,toolbar=no,width=" + width + ",height=" + height + ",left=10,top=10,screenX=10,screenY=10')");
	popupWin.location=url ;                
}

//-->
