<!--

/*
 * Attorneys-Home, LLC
 * 
 * Created: April 28, 2007
 * Author: Anthony Sprague
 *
 * Maintenance Log:
 * When          | Who            | Description
 * --------------|----------------|-------------------------------------------------------
 *               |                |
 *
 */
 
/**
 * JavaScript class that provides scripts to be used by the bankruptcy lawyers home web pages.
 */

// Constants
var NAVBAR = "navbar";
var PAGE_CONTENT = "content";
var contentHeightIncreased = "";

// function to initialize the page.  this is caled on the onload event of the page body
function fnInitialize() {
	fnTrace("start", "fnInitialize");
	utilityScript.matchSize(NAVBAR, PAGE_CONTENT);	
}

// function to check for required fields in the form.
function fnValidateForm() {
	fnTrace("start", "fnValidateForm");
	var result = utilityScript.validateFormRequired();
	if (result) {
		var numericElems = new Array("areaCodeCellPhone", "npaCellPhone", "nxxCellPhone");
		result = utilityScript.validateElementsNumeric(numericElems);
	}
	return result;
}

// function to expand or collapse the navbar items
function fnOnClickAdditional(section, image) {
	if (!image) {
		image = "img" + section;
	}
	if (utilityScript.toggleShowHideElement(section, image)) {
		contentHeightIncreased = utilityScript.matchSize(NAVBAR, PAGE_CONTENT, 0);
	} else {
	 	if (contentHeightIncreased > 0) {
	 		var content = utilityScript.getElement(PAGE_CONTENT);
			content.style.height = content.clientHeight - contentHeightIncreased;
	 	}		
	}
}

// This function formats a trace message specifically for the family law script.
function fnTrace(msg, funct) {	
	utilityScript.trace(msg, "scripts.js", funct);
}

// This function formats a trace message specifically for the family law script.
function fnInfo(msg, funct) {	
	utilityScript.info(msg, "scripts.js", funct);
}

//-->