
function submitbutton(el,action,formname,formsubmit)
{
	// Don't modify the button if it is already processing
	if (el.disabled) return;

	switch(action)
	{
		// User has hovered over the button
		case("over"):
			el.setAttribute('initstyle', el.style.cssText);
			el.style.cssText = el.getAttribute('fprolloverstyle');
			el.style.cursor = 'pointer';
			
			break;
		
		// User has moused off the button
		case("out"):
			el.style.cssText = el.getAttribute('initstyle');

			break;
		
		// User has clicked the button
		case("click"):
			el.style.cssText = el.getAttribute('fpclickstyle');
			
			//if no validation on form, submit it!
			if (formsubmit == '1')
			{
				el.value = " Processing";
				el.disabled = true;
				
				//if Resume_BOP or Resume_Coverletter is submitting, we need to submit AE.
				//in the future, so uncomment the next line when we implement 060106GB
				//if (document.forms[formname].name == 'CoverLetter' || document.forms[formname].name == 'Resume') {javascript:ae_onSubmit();}
				document.forms[formname].submit();
			}
			break;
	}
}

