/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
* Modified by HolySmoke and Steffen Heinz
***********************************************/

var copyspeed = 1;

function scrollMarquee(scrollObjectOne, scrollObjectTwo, scrollObjectThree, containerWidth){
	$(scrollObjectOne).style.left = parseInt($(scrollObjectOne).style.left) - copyspeed + "px";
	$(scrollObjectTwo).style.left = parseInt($(scrollObjectOne).style.left) + parseInt($(scrollObjectOne).offsetWidth) + "px";
	$(scrollObjectThree).style.left = parseInt($(scrollObjectOne).style.left) - parseInt($(scrollObjectOne).offsetWidth) + "px";
	if (parseInt($(scrollObjectOne).style.left) < ($(scrollObjectOne).offsetWidth * (-1) + 8)) {
		$(scrollObjectOne).style.left = "7px";
	}
}

function initializeMarquee(scrollContainer, scrollObjectOne, scrollObjectTwo, scrollObjectThree, containerWidth, delayb4scroll, marqueespeed) {
	$(scrollObjectOne).style.left = $(scrollContainer).style.width;
	$(scrollObjectTwo).style.left = $(scrollContainer).style.width;
	$(scrollObjectThree).style.left = $(scrollContainer).style.width;
	$(scrollObjectOne).marqueewidth = $(scrollContainer).offsetWidth;
	if (window.opera || navigator.userAgent.indexOf("Netscape/7") != -1) { //if Opera or Netscape 7x, add scrollbars to scroll and exit
		$(scrollObjectOne).style.width = $(scrollContainer).offsetWidth + "px";
		$(scrollObjectOne).style.overflow = "scroll";
		$(scrollObjectTwo).style.display = "none";
		$(scrollObjectThree).style.display = "none";
		return true;
	}
	setTimeout('lefttime=setInterval("scrollMarquee(\'' + scrollObjectOne + '\', \'' + scrollObjectTwo + '\', \'' + scrollObjectThree + '\', ' + containerWidth + ')",60)', delayb4scroll)
}
