Better way to validate this form?

Hi again,

Ive made a form in flash. Simple enough, collects data in a LoadVars obj and this is sent to a PHP script. Im trying to do all the validation within flash, my conditional statement(s) below works, however its pretty long. Does anyone have any suggestions to compact it? Ie make it more effcient?

Just to explain the script:
Firstly, as you can see im using a boolean var (submit) which keeps repeatedly being set depending whether the particular condition is true or not. Finally the last statment checks the value of the submit boolean var to see whether all fields have been correctly

Secondly I have movieclips called attention(n)_mc, which simply appear beside fields which have been entered incorrectly


function processApp(component){
	if (name == undefined){
		submit=false;
		attention1_mc._visible=true;
	}else{
		submit=true;
		attention1_mc._visible=false;
	}
	if (surname== undefined){
		submit=false;
		attention2_mc._visible=true;
	}else{
		submit=true;
		attention2_mc._visible=false;
	}
	if (occupation == undefined){
		submit=false;
		attention3_mc._visible=true;
	}else{
		submit=true;
		attention3_mc._visible=false;
	}
	if (company == undefined){
		submit=false;
		attention4_mc._visible=true;
	}else{
		submit=true;
		attention4_mc._visible=false;
	}
	if(email1==undefined || email2==undefined || email1 != email2 || email1.indexOf("@") != -1){
		submit=false;
		attention5_mc._visible = attention6_mc._visible = true;
	}else{
		submit=true;
		attention5_mc._visible = attention6_mc._visible = false;
	}
	if(submit==true){
		component.setEnabled=false;
		status_txt.htmlText = "Verfying all details entered correctly, please wait...";
		trace("details entered");
		$senddata.name=name;
		$senddata.surname=surname;
		$senddata.street=street;
		$senddata.suburb=suburb;
		$senddata.postcode=postcode;
		$senddata.state=state;
		$senddata.occupation=occupation;
		$senddata.company=company;
		$senddata.email1=email1;
		status_txt.htmlText = "Registering you now, please wait...";
		$senddata.sendAndLoad("newRegister.php",$recievedata,"POST");
		//loadVariablesNum("newlogin.php", 0, "POST");
	}else{
		this._parent.attachMovie("attentionNoticeClip", "attentionNotice_mc", 100, {_x:Stage.width/2,_y:Stage.height/2});
		attentionNotice_mc._visible=true;
	}
};