// setup vars
mq_chartime = 50;
mq_disptime = 2000;
mq_descs = new Array();
mq_links = new Array();
mq_charpos = 0;
mq_itempos = 0;

// little function to add a new marquee item
function mq_add(desc, link) {
	mq_descs[mq_descs.length] = desc;
	mq_links[mq_links.length] = link;
}

// runs the marquee thing (runs FOREVER AND EVER AND EVER!)
function marquee() {
	if(document.getElementById) {
		desc = mq_descs[mq_itempos];
		link = mq_links[mq_itempos];
		schar = Math.max(0, (mq_charpos - 90));
		html = "<A HREF='" + link + "'>" + desc.substring(schar, mq_charpos) + "</A>"
		
		mq = document.getElementById("marquee_content");
		mq.innerHTML = html;
		
		if(mq_charpos == desc.length) {
			mq_charpos = 0;
			mq_itempos = (mq_itempos + 1) % mq_descs.length;
			timeout = mq_disptime;
		}
		else {
			mq_charpos++;
			timeout = mq_chartime;
		}
		
		setTimeout("marquee()", timeout);
	}
}

//mq_add("10 Manchester Street - Double Rooms!", "blah.html");
//mq_add("The Royal Duck Hotel - Ducks for cheap", "test.html");
//marquee();