
function stopError()
{
  return true;
}

//window.onerror = stopError;


// TELE-TYPE START
// ---------------
// Teletypes a message.  To use,
// 1. Change 'message' (below) to whatever you want.
// 2. In your HTML document, create an element called 'msg' e.g. <p id="msg"></p>
// 3. Then call teletype in the body tag. e.g. <body onload="teletype()" onunload="stoptimer()">
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
// Modified by Nduka Okoh
message="Latest News:";
pos=0;
maxlength=message.length+1;

function teletype()
{
	if (pos<maxlength)
	{
		txt=message.substring(pos,0);
		if (document.getElementById)
		{
			x = document.getElementById('heading4');
			x.innerHTML = '';
			x.innerHTML = txt;
		}
		else if (document.all)
		{
			x = document.all['heading4'];
			x.innerHTML = txt;
		}
		pos++;
		timer=setTimeout("teletype()", 50);
	}
}

function stoptimer()
{
	clearTimeout(timer);
}
// TELE-TYPE END

// QUERY PARAMETER START
// ---------------------
// Obtains the parameter passed into an HTML Page
//
var qsParm = new Array();
function qs()
{
	var query = window.location.search.substring(1);
	var parms = query.split('&');
	for (var i=0; i<parms.length; i++)
	{
   	var pos = parms[i].indexOf('=');
   	if (pos > 0)
   	{
      	var key = parms[i].substring(0,pos);
      	var val = parms[i].substring(pos+1);
      	qsParm[key] = val;
      }
   }
}
// QUERY PARAMETER END

// GET DATE START
// --------------
// Returns the current date.
// Called as follows:
// <SCRIPT language=JavaScript>document.write(dateString(new Date()))</SCRIPT>
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
function makeArray(n)
{
	this.length = n
	return this
}

monthNames = new makeArray(12);
monthNames[1] = "January";
monthNames[2] = "February";
monthNames[3] = "March";
monthNames[4] = "April";
monthNames[5] = "May";
monthNames[6] = "June";
monthNames[7] = "July";
monthNames[8] = "August";
monthNames[9] = "September";
monthNames[10] = "October";
monthNames[11] = "November";
monthNames[12] = "December";

function dateString(oneDate)
{
	var theMonth = monthNames[oneDate.getMonth() + 1];
	var theYear = oneDate.getFullYear();
	return theMonth + " " + oneDate.getDate() + ", " + theYear;
}
// GET DATE END

// NEW CENTRED WINDOW START
// ------------------------
// Opens a new centred window.
// open window centered
// Author: Eric King Url: http://redrival.com/eak/index.shtml
// modified by Nduka Okoh
// This script is free to use as long as this info is left in
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
var win = null;
function newWindow(mypage,myname,w,h,scroll)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no'
	win = window.open(mypage,myname,settings)
}
// NEW WINDOW END

// CLOSE WINDOW
// ------------
// Closes the current browser window
function closeWindow()
{
	window.opener=self;
	window.close();
}

// ENABLE OR DISABLE STYLESHEET
// -----------------------------
// Enables or disables a stylesheet specified by it's index
// Useful for alternate printing!
// To initially disable the stylesheet, in your html document, set it up like this:
// <link rel="stylesheet" href="oldstyles.css" disabled id>
// Note the "disabled" and "id" attributes.  Both are needed.
// The following is also needed in your html file to disable it Mozilla browsers
//<script script="JavaScript" TYPE="text/javascript">
//<!--
// if (document.getElementsByTagName) document.getElementsByTagName('link')[<index no of link>].disabled = true;
//-->
//</script>
// Original function courtesy of QuirksMode http://www.quirksmode.org/js/cssdisable.html
// Modified by Nduka Okoh
function setCSSEnabled(linkNo, value)
{
	// Example of calling this function:
	// setCSSEnabled(0, false);
	// This will disable the first link element.

	if (document.getElementsByTagName)
	{
		x = document.getElementsByTagName('link');
	}
	else if (document.all)
	{
		x = document.all.tags('link');
	}
	else
	{
		alert('This script does not work in your browser');
		return;
	}
	for (var i=0;i<x.length;i++)
	{
		if(i == linkNo) x[i].disabled = value;
	}
}

function setStylesheetHREF(id, url)
{
		txt=message.substring(pos,0);
		if (document.getElementById)
		{
			x = document.getElementById(id);
		}
		else if (document.all)
		{
			x = document.all[id];
		}
		x.href = url;
}