/* Scroll Content */
var tickerEl = new Array();

function initTicker(tickerContainer, tickerContent, delay) {
	tickerEl[tickerEl.length] = tickerContainer;
	tickerContainer.moveOffset = tickerContainer.offsetHeight;
	tickerContainer.count = 0;
	tickerContainer.delay = delay / 10;

	tickerContainer.cont = tickerContent;
	tickerContainer.cont.currentHeight = 0;
	tickerContainer.cont.innerHTML += tickerContainer.cont.innerHTML;

	tickerContainer.move = setInterval("tickerRoll()", 20);
}

function tickerRoll() {
	for (i=0; i<tickerEl.length; i++) {
		if (tickerEl[i].cont.currentHeight < tickerEl[i].cont.offsetHeight * -1) {
			tickerEl[i].cont.currentHeight = 0;
		}

		if (tickerEl[i].cont.currentHeight % tickerEl[i].moveOffset == 0 && tickerEl[i].count < tickerEl[i].delay) {
			tickerEl[i].count++;
		} else {
			tickerEl[i].count = 0;
			tickerEl[i].cont.currentHeight--;
			tickerEl[i].cont.style.top = tickerEl[i].cont.currentHeight/2 + "px";
			if (tickerEl[i].cont.currentHeight % (tickerEl[i].cont.offsetHeight / 1) == 0) {
				tickerEl[i].cont.currentHeight = 0;
			}
		}
	}
}
function initAdjustnewRow() {
	bannerLi = document.getElementById("news-content").getElementsByTagName("li");
	if (bannerLi.length > 2 && bannerLi.length % 2 != 0) {
		temp = document.getElementById("news-content").innerHTML;
		document.getElementById("news-content").innerHTML = temp + temp;
	}
	//alert(document.getElementById("banner-content").getElementsByTagName("li").length);
}
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

