LastModDate = new Date(document.lastModified);
LastModString = LastModDate.toGMTString().substring(0,16);
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
bVer = navigator.appVersion.substring(0,4);
type = navigator.userAgent.substring(25,34);

if ((browserName == "Netscape" && browserVer >= "3")||(browserName == "Microsoft Internet Explorer" && browserVer >= "4"))
{
	version = "OK";
}
else
{
	version = "OLD";
}



if (version == "OK")
{
	button1on = new Image(158,18);
	button1on.src = "./images/homeon.gif";
	button7on = new Image(158,18);
	button7on.src = "./images/abouton.gif";
	button2on = new Image(158,18);
	button2on.src = "./images/howon.gif";
	button3on = new Image(158,18);
	button3on.src = "./images/joinon.gif";
	button4on = new Image(158,18);
	button4on.src = "./images/freeon.gif";
	button5on = new Image(158,18);
	button5on.src = "./images/successon.gif";
	button6on = new Image(158,18);
	button6on.src = "./images/contacton.gif";

	button1off = new Image(158,18);
	button1off.src = "./images/home.gif";
	button7off = new Image(158,18);
	button7off.src = "./images/about.gif";
	button2off = new Image(158,18);
	button2off.src = "./images/how.gif";
	button3off = new Image(158,18);
	button3off.src = "./images/join.gif";
	button4off = new Image(158,18);
	button4off.src = "./images/free.gif";
	button5off = new Image(158,18);
	button5off.src = "./images/success.gif";
	button6off = new Image(158,18);
	button6off.src = "./images/contact.gif";

}

var rate = 50;
var delay = 4000;
var timerID = null;
var messagerRunning = false;
var currentMessage = 0;
var offset = 0;

var ar = new Array();

	ar[0] = "Welcome to DataMateUk.com"
	ar[1] = "We enrol people of all ages from 30 years upwards..."

if (version == "OLD")
{
	ar[2] = "You should update..."
	ar[3] = "...to a newer browser you know!!"
}
else
{
	ar[2] = "Our Membership currently consists of..."
	ar[3] = "Doctors - Lecturers - Engineers - Computer Operators - Software Authors - Nurses - Security Officers - Police Officers"
	ar[4] = "Secretaries - Builders - Plumbers - Electricians - Nannies - Driving Instructors - Librarians - Farmers - Managers"
	ar[5] = "Marketing Directors - M.D's - Social Workers- Teachers - Designers - Drivers - Postal Persons - Financial Consultants"
	ar[6] ="Buyers - Carers - Decorators - Students - Administrators - Receptionists - Draughtpersons - Town Folk and Country Folk"

}

function haltMessager()
{
	if (messagerRunning)
		clearTimeout(timerID)

	messagerRunning = false;
}

function runMessager()
{
	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("runMessager()", rate);
		messagerRunning = true;
	}
	else
	{
		offset = 0;
		currentMessage++;
		if (currentMessage == ar.length) currentMessage = 0;
		timerID = setTimeout("runMessager()", delay);
		messagerRunning = true;
	}
}

function startBanner()
{
	haltMessager();
	runMessager();
}

function img_act(imgName)
{
	if (version == "OK")
	{
		imgOn = eval(imgName + "on.src");
		document [imgName].src = imgOn;
	}
}

function img_inact(imgName)
{
	if (version == "OK")
	{
		imgOff = eval(imgName + "off.src");
		document [imgName].src = imgOff;
	}
}
