/*******************************************************************************

FILE: mud_Scripts.js
REQUIRES: mud_API.js
AUTHOR: Takashi Okamoto mud(tm) - http://www.mudcorp.com/
VERSION: 1.0 - initial public release
DATE: 07/22/2005

--------------------------------------------------------------------------------

This file is part of MudNewsScroller.

	MudNewsScroller is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
	
	MudNewsScroller is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License
	along with Foobar; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*******************************************************************************/

////////////////////////////////////////////////////////////////////////////////
// NEWS VARS
var newsScroller;
// holds all the text
var newsText = new Array(
	'design & stuff',
	'thing-maker',
	'yes or no? circle one',
	'design: graphic',
	'graphic design',
	'graphic designer',
	'click stuff, see stuff',
	'interweb-site',
	'concentrate and ask again',
	'reply hazy, try again',
	'all up in yo face and shit',
	'believes',
	'properly configured',
	'is an inside joke',
	'is the next top model',
	'graphic/design',
	'is doin hood thangs',
	'likes the sound of rain',
	'would impress your parents',
	'is just a wild guess',
	'we were just talking about you',
	'is coming over for dinner',
	'utilized a toilet today',
	'I went to school for this',
	'3 installments of $39.99',
	'the ideal candidate',
	'is all over it',
	'powered by the sun',
	'loves what you did with your hair',
	'thinks you are looking good today',
	'could be yours today!',
	'is here to help',
	'knows why you are here',
	'is that a mouse cursor?',
	'is all up in your browser',
	'washes his socks in InDesign',
	'is full of hope, and pizza',
	'exceptional at napping',
	'lol wut',
	'told you so',
	'specialist: spatial relations',
	'based on a true story',
	'gots your back',
	'wishes it was snowing',
	'would rather be on a snowboard',
	'now with more meat',
	'the OG OG',
	'has a snuggie',
	'supreme'	
);

// if text is a link, you specify it here
// each link in the array corresponds to the same element number in newsText array
// if there's no link, just put an empty string like ''
var newsLink = new Array(
	'email me: say hello!',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	'',
	''
);

var newsLeft = 0; // left location of where the news appears
var newsTop = 0; // top location of where the news appears
var strLimit = 40; // limit of number of characters to show. if longer, it will begin to chop off chars from the beginning.

////////////////////////////////////////////////////////////////////////////////
// INIT

function newsInit() {
	// checks to see if newsScroller <div> or <span> exists
	var obj = getObject('newsScroller');
	if (!obj) return;
	newsScroller = new MudNewsScroller('newsScroller', newsText, newsLeft, newsTop, strLimit, newsLink, 'scroller', 'random');
	newsScroller.update();
}

function mudInit() {
	initDHTMLAPI();
	newsInit();
}

////////////////////////////////////////////////////////////////////////////////
// EVENTS

if (typeof window.addEventListener != 'undefined') {
	window.addEventListener('load', mudInit, false);
}
// opera 7
else if (typeof document.addEventListener != 'undefined') {
	document.addEventListener('load', mudInit, false);
}
// win/ie
else if (typeof window.attachEvent != 'undefined') {
	window.attachEvent("onload", mudInit);
}
// rest
else {
	window.onload = mudInit;
}
