// launch the given URL in a new window of given width and height
function NewWindow(url, w, h)
{
	parm = "width=" + w + ",height=" + h + ",toolbar=no,directories=no,status=no,scrollbars=yes,resizable=no,menubar=no" ;
	newframe=window.open(url,"showtip", parm );
	return newframe;
}

// Check for email address: look for [@] and [.] 
function isEmail(s) 
{
	if (typeof(s) != "string")
	{
		alert("Invalid argument to IsEmail()");
		return false;
	}
    var re = /\w+@\w+((\.\w+)+)/i ;
    if (s.match(re))
		return true;
    return false;    
}

//returns 3 char string identifying the browser type
// "old" for non-CSS compliant browsers
// "ns?" for netscape browsers '?' is the major version number
// "ie?" for internet explorer
function getBrowserType()
{
	var browser = "old";
	var bName = navigator.appName;
	var bVersion = parseInt(navigator.appVersion);
	if (bName == "Netscape") 
	{
	  if (bVersion >= 4)
		browser = "ns" + bVersion;
	}
	else 
	{
	  if (bName == "Microsoft Internet Explorer") 
	  {
	    if (bVersion >= 4)
	      browser = "ie" + bVersion;
	  }
	}
	return browser;
}