<!-- // Begin hiding

var plsStr = '\n\nPlease correct this problem and try again.';

// copyright 1999 Idocs, Inc. http://www.idocs.com
// Distribute this script freely but keep this notice in place
function letternumber(e)
{
	var key;
	var keychar;
	
	if (window.event)
	   key = window.event.keyCode;
	else if (e)
	   key = e.which;
	else
	   return true;
	keychar = String.fromCharCode(key);
	keychar = keychar.toLowerCase();
	
	// control keys
	if ((key==null) || (key==0) || (key==8) || 
	    (key==9) || (key==13) || (key==27) )
	   return true;
	
	// alphas and numbers
	else if ((("abcdefghijklmnopqrstuvwxyz0123456789-.").indexOf(keychar) > -1))
	   return true;
	else
	   return false;
}

function capitalizeMe(obj) 
{
	val = obj.value;
	val = val.toLowerCase();
	newVal = '';
	val = val.split(' ');
		for(var c=0; c < val.length; c++) 
		{
			newVal += val[c].substring(0,1).toUpperCase() +
			val[c].substring(1,val[c].length) + '';
		}
	obj.value = newVal;
}

function fnameChk()
{
	var fname = document.form1.fname.value;
	if((fname.length <= '1'))
	{
		alert('Your last name is missing or incorrect.\n\nPlease enter your entire last name.');
		document.form1.fname.focus();
		return false;
	}
	if((fname.indexOf("  ") != -1) || (fname.indexOf("   ") != -1))
	{
		alert('Please remove extra spaces from your last name.');
		document.form1.fname.focus();
		return false;
	}
	return true;
}

function lnameChk()
{
	var lname = document.form1.lname.value;
	if((lname.length <= '1'))
	{
		alert('Your last name is missing or incorrect.\n\nPlease enter your entire last name.');
		document.form1.lname.focus();
		return false;
	}
	if((lname.indexOf("  ") != -1) || (lname.indexOf("   ") != -1))
	{
		alert('Please remove extra spaces from your last name.');
		document.form1.lname.focus();
		return false;
	}
	return true;
}

function passChk()
{
	var passWord1 = document.form1.pass1.value;
	if(passWord1.length <= 5)
	{
		alert('Passwords must be at least 6 characters.' + plsStr);
		document.form1.pass1.focus();
		return false;
	}
	return true;
}

function passChk2()
{
	var passWord1 = document.form1.pass1.value;
	var passWord2 = document.form1.pass2.value;
	if(passWord1 != passWord2)
	{
		alert('Passwords do not Match.' + plsStr);
		document.form1.pass1.focus();
		return false;
	}
	return true;
}

function domainChk(domainVal)
{
	// var domainName = domainVal.value;
	// alert(domainName.substring(0,4));
	// alert(domainName.toLowerCase());
	domainName = domainVal.value;
	domainVal.value = domainName.toLowerCase();
	// domainName.value = domainName;

	if (domainName.indexOf(" ") != -1)
	{
		alert('Domain name cannot contain spaces.' + plsStr);
		domainVal.focus();
		return false;
	}
	if (domainName.indexOf("@") != -1)
	{
		alert('Domain name cannot contain an AT sign (@)' + plsStr);
		domainVal.focus();
		return false;
	}
	if ((domainName.indexOf("http://") != -1) || (domainName.indexOf("http:/") != -1) || (domainName.indexOf("http:") != -1))
	{
		alert('Do not include "http://" in your domain name.' + plsStr);
		domainVal.focus();
		return false;
	}
	if (domainName.substring(0,4) == 'www.')
	{
		alert('Do not include "www." in your domain name.' + plsStr);
		domainVal.focus();
		return false;
	}
	if (domainName.indexOf("..") != -1)
	{
		alert('Domain name contains too many dots (.)' + plsStr);
		domainVal.focus();
		return false;
	}
	if (domainName.indexOf(".") == -1)
	{
		alert('Domain name does not contain a dot (.)' + plsStr);
		domainVal.focus();
		return false;
	}
	if (domainName.length <= 3)
	{
		alert('Invalid Domain Name.' + plsStr);
		domainVal.focus();
		return false;
	}
	return true;
}
// end hiding -->

