function BrowserCaps()
{
	this.ie = (navigator.appName.indexOf('Microsoft') >= 0);
	this.ns = (navigator.appName.indexOf('Netscape') >= 0);
	this.v4 = (parseInt(navigator.appVersion) >= 4);
	this.v5 = (parseInt(navigator.appVersion) >= 5 || navigator.appVersion.indexOf("MSIE 5") != -1);
	this.mac = (navigator.userAgent.indexOf('Mac') != -1);
	this.n4 = this.ns && this.v4 && !this.v5;
}
var bc = new BrowserCaps();

if (bc.n4)
{
	eval("document.tags.BODY.marginLeft='0px';");
	eval("document.tags.BODY.marginTop='-8px';");
}

function resize()
{
	if (bc.n4)
	{
		window.location.href = window.location.href;
	}
}

function trim(s)
{
	while (s.charAt(0) == ' ' || s.charAt(0) == '\t' || s.charAt(0) == '\r' || s.charAt(0) == '\n')
	{
		s = s.substr(1, s.length - 1);
	}
	while (s.length &&
		(s.charAt(s.length - 1) == ' ' || s.charAt(s.length - 1) == '\t' ||
		 s.charAt(s.length - 1) == '\r' || s.charAt(s.length - 1) == '\n'))
	{
		s = s.substr(0, s.length - 1);
	}
	return s;
}

function validateEmail(s)
{
	return (s.indexOf('@') > 0 && s.indexOf('.') > 0 && s.indexOf('<') == -1 && s.indexOf('>') == -1 ? true : false);
}