function installHelp()
{
   installhelp = open('/installhelp.asp', 'installhelp', 'width=575,height=435,scrollbars=no,resizable=no');
   installhelp.focus();
}

function ValidateProductUpdates()
{
	if(!isEmail(document.ProductUpdates.Email.value))
	{
		alert("Please enter a valid e-mail address.")
		document.ProductUpdates.Email.focus();
		return(false);
	}

	return(true);
}

function isEmail(s)
{
	var newString = s.trim();

	if(newString.indexOf(" ") != -1)
		return(false);

	var i = 1;
	var sLength = newString.length;

	while((i < sLength) && (newString.charAt(i) != "@"))
		i++;

	if((i >= sLength) || (newString.charAt(i) != "@"))
		return(false);
	else
		i += 2;

	while((i < sLength) && (newString.charAt(i) != "."))
		i++;

	if((i >= sLength - 1) || (newString.charAt(i) != "."))
		return(false);
	else
		return(true);
}

String.prototype.trim  = function() {return this.ltrim().rtrim()}
String.prototype.ltrim = function() {return this.replace(/^\s+/g, "")}
String.prototype.rtrim = function() {return this.replace(/\s+$/g, "")}
