
/* used on contact us page. but if the IDs match, could be used elsewhere

	REQUIRES:
	
		- formUtils.js
		- fadingHilight.js
		- ajax.js
*/

	function quickContactCallback(responseText) {
		$('contactContents').innerHTML = responseText;
		fadingHilight('contactContents',12,80,"#C1DDF5","#FAFAFA");
	}

	function validateQuickContactForm(f) {
		var valid = true,
			fieldsRequired = Array('name','email');
	 	if (valid) valid = validateRequiredFields(f, fieldsRequired);
	 	if (valid) valid = validateEmails(f,'email',null);
		return valid;
	}

function quickContactSubmit(f) {
	var a;
	if ( validateQuickContactForm(f) ) {
		$('qContactSubmit').disabled = true;
		a = new SimpleAjax( '../contact/quickContact-server.asp', getFormVars(f), quickContactCallback);
	}
	return false;
}

// in case the user hits BACK, we need to re-enable the submit button
function docLoad() {
	$('qContactSubmit').disabled = false;
}
addLoadEvent( docLoad);
