var scroll_width = 728;
var scrollOffset = 1;

var obj = false;

function initPage() {

	changeFont();
}

function changeFont()
{

	var f = document.getElementById("font-size");
	if (f)
	{

		var links = f.getElementsByTagName("a");

		for (var i = 0; i < links.length; i++)
		{
			links[i].onclick = function ()
			{
				document.getElementById("rendez-vous").style.fontSize = this.className;
                getSize();
				return false;
			}
		}
	}
}

function scroll() {

	obj = document.getElementById("scroll");

	if (obj)
	{
		obj.rotate = rotate;
		obj.scrolling = true;

		obj.onmouseover = mouseover;
		obj.onmouseout = mouseout;

		if (!obj.style.width) {
			obj.style.width = scroll_width + "px";
		}
		obj.style.overflow = "hidden";
		obj.style.position = "relative";
		obj.scrollContent = document.createElement("div");
		obj.scrollContent.style.position = "absolute";

		obj.scrollContent.innerHTML = obj.innerHTML;
		obj.innerHTML = "";
		obj.appendChild(obj.scrollContent);

		obj.rotate();
	}
}

function mouseover() {
		this.scrolling = false;
}

function mouseout() {
		this.scrolling = true;
}

function rotate() {

	if (this.scrolling) {
		this.scrollContent.style.left = this.scrollContent.offsetLeft - scrollOffset + "px";

		if (this.scrollContent.offsetLeft < -(this.scrollContent.offsetWidth)) {
			this.scrollContent.style.left = scroll_width+"px";
		}
	}

	setTimeout("obj.rotate()", 20);
	return;
}


if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);


