/* Admin functions */

//Preload any images we are going to use in the interface


/* Common Functions */

function ajaxCall(processMessage, path, loadString, funcName, args){
	process(processMessage);
	ajaxConnect(path, loadString, funcName, args);
}

function ajaxSave(required, formID, processMessage, path, loadString, funcName, args){
	//required should be an array of required fields eg:
	//required = new Array('title', 'content'); 
	myString = parse_form(formID, '', required, '');
	if (myString != 'ERROR'){
		process(processMessage);
		ajaxConnect(path, myString, funcName, args);
	}
}

function ajaxExec(){
	if (x.status == 200) {
		var loadResponse = x.responseText;
		document.getElementById("contentArea").innerHTML = loadResponse;
	} else {
		alert('There was a flippin error');
		//showMessage('There was an error loading the client');
	}
}

function firm_members(){
	var list = '';
}

/* Menu hide/show functions */
var elementList = new Array();

function openSub(element){
	if (elementList[element]){
		document.getElementById(element).style.display = 'none';
		elementList[element] = 0;
	} else {
		document.getElementById(element).style.display = 'block';
		elementList[element] = 1;
	}
}
