<!--

document.forms[0].NirvanaID.focus();

// 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=2; i<5; 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+2).cells.length; j++)		
				{
					document.all.tabCustData.rows(i+2).cells(j).bgColor = '#FFFF99';
				}
				bFailed = true;
			}
		}
		
		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].NirvanaID.value;
		if (sTextValue.length < 1)
		{
			sErrorMessage = 'The form could not be submitted due to the following: ';
			sErrorMessage = sErrorMessage + '\nThe Nirvana ID field has no value entered.  Please re-enter';
		}
			
		sTextValue = document.forms[0].NirvanaPW.value;
		if (sTextValue.length < 1)
		{
			if (sErrorMessage.length < 1)
			{
				sErrorMessage = 'The form could not be submitted due to the following: ';
				sErrorMessage = sErrorMessage + '\nThe Nirvana Password field has no value entered.  Please re-enter';
			}
			else
			{
				sErrorMessage = sErrorMessage + '\nThe Nirvana Password One field has no value entered.  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');
	}
}
//-->


