function randy(seed)	{	return Math.floor(Math.random() * seed)							}

function dw(text)		{	document.write(text)											}

function titleCase(t)	{	return t.charAt(0).toUpperCase() + t.substring(1).toLowerCase()	}

function getBrowser()
	{
	searchy = ["Firefox","Safari","Netscape","Opera","MSIE","Lynx","Mozilla"];
	for (var i in searchy)
		{
		if (window.navigator.userAgent.indexOf(searchy[i]) >= 0)	return searchy[i];
		}
	return 'unknown';
	}

function getVersion()
	{
	var locs = new Array();
	locs['Firefox']  = 'Firefox/';
	locs['Safari']   = 'Safari/';
	locs['Netscape'] = 'Netscape/';
	locs['Opera']    = 'Opera ';
	locs['MSIE']     = 'MSIE ';
	locs['Lynx']     = 'Lynx/';
	locs['Mozilla']  = 'rv:';
	
	var charAtPos = window.navigator.userAgent.indexOf( locs[ getBrowser() ] ) + locs[ getBrowser() ].length;
	
	return window.navigator.userAgent.charAt(charAtPos);
	}

function getPlatform()
	{
	if (window.navigator.userAgent.indexOf('Win') >= 0)			return 'Windows';
	else if (window.navigator.userAgent.indexOf('Mac') >= 0)	return 'Mac';
	else														return 'other';
	}

function getDOM()
	{
	/*	MSIE 5.0 has both all and getElementById, but doesn't support getElementById correctly */

	if (document.getElementById)
		{
		if (getBrowser() == 'MSIE' && getVersion() < 6)	return 'all';
		else											return 'modern';
		}
	else if (document.all)							return'all';
	else if (document.layers)						return'layers';
	else											return false;
	}

