<!--

// Validation Starts Here!
function Validate()
{
	var sTextValue;
	var sErrorMessage = '';
	var i, j;
	var bFailed = false;

		//MICROSOFT VALIDATION!
		if (navigator.appName != 'Netscape')
		{
			//Make all Cells in Contact_Info table gray
			for (i=1; i<3; i++)
			{
				for (j=0; j<document.all.tabCustData.rows(i).cells.length; j++)		
				{
					document.all.tabCustData.rows(i).cells(j).bgColor = '#FFFFFF';
				}
			}
				
			//Checking the first block of required textboxes
			for (i=0; i<2; i++)
			{
				sTextValue = document.forms[0].elements[i].value;
				
				if (sTextValue.length < 1)
				{
					for (j=0; j<document.all.tabCustData.rows(i + 1).cells.length; j++)		
					{
						document.all.tabCustData.rows(i + 1).cells(j).bgColor = '#FFFF99';
					}
					bFailed = true;
				}
			}
			
			//Checking the e-mail address for validity..
			sEmailValue = document.forms[0].EmailAddress.value;
			if (sEmailValue.search("@") < 0 || sEmailValue.search(".") < 0)
			{
				if (sErrorMessage.length < 1)
				{
					sErrorMessage = 'The form could not be submitted due to the following: ';
					sErrorMessage = sErrorMessage + '\nThe E-Mail Address entered is invalid.  Please re-enter'
				}
				else
				{
					sErrorMessage = sErrorMessage + '\nThe E-Mail Address entered is invalid.  Please re-enter'
				}
				
				for (j=0; j<document.all.tabCustData.rows(2).cells.length; j++)		
				{
					document.all.tabCustData.rows(2).cells(j).bgColor = '#FFFF99';
				}
			}
			
			if (bFailed == true)
			{
				sErrorMessage = 'The form could not be submitted due to the following: ';
				sErrorMessage = sErrorMessage + '\nA required field or fields on the form have not been filled in.';
				sErrorMessage = sErrorMessage + '\nThe field or fields not filled in are highlighted.'; 
			}
		}
		else   //NETSCAPE VALIDATION!!!
		{
			//Checking the first block of required textboxes prior to the E-Mail Address textbox
			sTextValue = document.forms[0].Name.value;
			if (sTextValue.length < 1)
			{
				sErrorMessage = 'The form could not be submitted due to the following: ';
				sErrorMessage = sErrorMessage + '\nThe Name field has no value entered.  Please re-enter';
			}
				
			sTextValue = document.forms[0].EmailAddress.value;
			if (sTextValue.length < 1)
			{
				if (sErrorMessage.length < 1)
				{
					sErrorMessage = 'The form could not be submitted due to the following: ';
					sErrorMessage = sErrorMessage + '\nThe E-Mail Address field has no value entered.  Please re-enter';
				}
				else
				{
					sErrorMessage = sErrorMessage + '\nThe E-Mail Address field has no value entered.  Please re-enter';
				}
			}
			
			//Checking the e-mail address for validity..
			sEmailValue = document.forms[0].EmailAddress.value;
			if (sEmailValue.search("@") < 0 || sEmailValue.search(".") < 0)
			{
				if (sErrorMessage.length < 1)
				{
					sErrorMessage = 'The form could not be submitted due to the following: ';
					sErrorMessage = sErrorMessage + '\nThe E-Mail Address entered is invalid.  Please re-enter'
				}
				else
				{
					sErrorMessage = sErrorMessage + '\nThe E-Mail Address entered is invalid.  Please re-enter'
				}
			}
		}
	

	//Submit Form or Not?
	if (sErrorMessage.length > 1)
	{
		//Sorry, redo!
		alert(sErrorMessage); 
		return false;
	}
	else
	{
		//Success!
		return true;
	}	
	
}

function OpenWindow()
{
	if (navigator.appName != 'Netscape')
	{
		window.open('forgot.asp','PopUp','toolbars=0,scrollbars=0,location=0,statusbars=0,menubars=0,resizable=1,width=450,height=265,left=190,top=42');
	}
	else
	{
		window.open('forgot.asp','PopUp', 'resizable=1,outerWidth=450,outerHeight=300,screenX=190,screenY=42');
	}
}
//-->

