// Begin Favourites Script 
	function addIEFavorite() {
	   if (window.external) {
	      external.AddFavorite(location.href, 'FatFloats III - The Fat is Back!')
	      }
	   else {
	      alert("Oops, your browser doesn't support this feature.\n" +
	      "If you are using Netscape Navigator, click Bookmarks\n" +
	      "and then Add Bookmark to add this site to your favorites.");
	      }
	}
// End Favourites Script 

// Begin Status Script 
		
	// Status Scroller
	var speed = 40 		//decrease value to increase speed (must be positive) 
	var pause = 1100 	//increase value to increase pause
	var timerID = null 
	var bannerRunning = false
	var ar = new Array()
	ar[0] = "..::..::..::..::..::..::..::..::.."
	ar[1] = "Fat Floats,"
	ar[2] = "so do I,"
	ar[3] = "hence i am fat,"
	ar[4] = "but wood also floats,"
	ar[5] = "wood burns,"
	ar[6] = "as does fat,"
	ar[7] = "therefore,"
	ar[8] = "unless i am made of wood,"
	ar[9] = "i am not fat."
	ar[10] = "But ducks also float,"
	ar[11] = "therefore since i float,"
	ar[12] = "but am not fat,"
	ar[13] = "i must be a duck!"
	ar[14] = "Quack Quack!"
	var currentMessage = 0
	var offset = 0
	function stopBanner() {
		if (bannerRunning)
			clearTimeout(timerID)
			bannerRunning = false
			}
	function startBanner() {
			stopBanner()
			showBanner()
	}
	function showBanner() { 
			var text = ar[currentMessage]
			if (offset < text.length) {
				if (text.charAt(offset) == " ")
				offset++ 
				var partialMessage = text.substring(0, offset + 1)
				window.status = partialMessage
				offset++ 
				timerID = setTimeout("showBanner()", speed)
				bannerRunning = true
					} else {
				offset = 0
				currentMessage++
					if (currentMessage == ar.length)
						currentMessage = 0
						timerID = setTimeout("showBanner()", pause)
						bannerRunning = true
						}
			}
// End SCROLLING 

// Begin Random Image Selector Script

	var totIm=25;		// Total number of images to choose from
	var imNum=0;

	function selectImage()
	{
		// function randomly selects 1 of the home images
		imNum = Math.round(Math.random()*totIm);
		window.document.mainpic.src="login_im/log"+imNum+".gif";	
	}
	
	function nextImage()
	{
		if (imNum<totIm)
		{
			imNum++;
			window.document.mainpic.src="login_im/log"+imNum+".gif";
		}
		else if (imNum==totIm)
		{	
			imNum=0;
			window.document.mainpic.src="login_im/log"+imNum+".gif";
		}
	}
// End random script 

// Div Writer Script
function writeDiv(text,id,theclass)
{
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers['bulk'].layers[id];
		text2 = '<P CLASS="'+theclass+'">' + text + '</P>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}
// end DivWriter

// Clock script
var shortDays = new Array();
shortDays[0] = "Sun";
shortDays[1] = "Mon";
shortDays[2] = "Tues"; 
shortDays[3] = "Wed"; 
shortDays[4] = "Thur"; 
shortDays[5] = "Fri"; 
shortDays[6] = "Sat"; 


var shMonths = new Array();
shMonths[0] = "Jan";
shMonths[1] = "Feb";
shMonths[2] = "Mar";
shMonths[3] = "Apr";
shMonths[4] = "May";
shMonths[5] = "Jun";
shMonths[6] = "Jul";
shMonths[7] = "Aug";
shMonths[8] = "Sep";
shMonths[9] = "Oct";
shMonths[10] = "Nov";
shMonths[11] = "Dec";

var clockOutput;

function theClock()
{
	var hereNow = new Date();
	var nowHrs=hereNow.getHours();
	var nowMns=hereNow.getMinutes();
	if (nowMns<10) nowMns="0"+nowMns;
	var nowDate=hereNow.getDate();
	var	nowDay=hereNow.getDay();
	var ext;
	if ((nowDate==1) || (nowDate==21) || (nowDate==31)) ext="st";
	else if ((nowDate==2)||(nowDate==22)) ext="nd";
	else if ((nowDate==3)||(nowDate==23)) ext="rd";
	else ext="th";
	var nowYr = hereNow.getYear();
	if (nowYr<=99)  nowYr= "19"+nowYr;
	if ((nowYr>99) && (nowYr<2000)) nowYr+=1900;
	
	clockOutput = nowHrs+":"+nowMns+", "+shortDays[nowDay]+" "+nowDate+ext+" "+shMonths[hereNow.getMonth()]+" "+nowYr;
	clockOutput += "<br>Updated: 9th August 2006";
	writeDiv(clockOutput,'update','updatetxt');
	
	setTimeout("theClock()",30000);
}
// end Clock
