function dummy() {} // used for callback and errorhandler

function clearDefault(el)
	{
	if (el.defaultValue==el.value) el.value = ""
	}

function toggleLicenses()
	{
	ColdFusion.navigate('check_secLicense.cfm','toggleLicSpan',dummy,dummy,'POST','FAP');
	}
	
var errors = 0;
var errorMsg = "";
function formCheck()
{
	if (document.FAP.firstName.value == "")  // SECTION ONE
	{
	errorMsg = errorMsg + "Section One: First name\n";
	errors = errors + 1;
	}
	if (document.FAP.lastName.value == "")
	{
	errorMsg = errorMsg + "Section One: Last name\n";
	errors = errors + 1;
	}
	if (document.FAP.CRD.value == "")
	{
	errorMsg = errorMsg + "Section One: CRD #\n";
	errors = errors + 1;
	}
	if (document.FAP.BusAddress.value == "")
	{
	errorMsg = errorMsg + "Section One: Physical Business Address\n";
	errors = errors + 1;
	}
	if (document.FAP.BusCity.value == "")
	{
	errorMsg = errorMsg + "Section One: City\n";
	errors = errors + 1;
	}
	if (document.FAP.busState.value == "")
	{
	errorMsg = errorMsg + "Section One: State\n";
	errors = errors + 1;
	}
	if (document.FAP.busZip.value == "")
	{
	errorMsg = errorMsg + "Section One: Zip Code\n";
	errors = errors + 1;
	}
	
	if (document.FAP.licCheck.value == 0) // SECTION TWO
	{
	errorMsg = errorMsg + "Section Two: Current Securities Licenses Held\n";
	errors = errors + 1;
	}

// Show Errors
 if (errors > 0)
 	{
	alert("The following form field(s) were deficient and/or cannot be left blank\nwhen submitting this form. Please correct the following errors and click submit again:\n\n" + errorMsg);
	errors = 0;
	errorMsg = "";
	return false;
	}
}

