function SelectBoxActionSet(objForm, objSelect)
  {
	objForm.action = eval('objForm.' + objSelect + '.value')
  }
  
/************************************************************
*************************************************************

Function: CheckMandatoryFieldsFilled(form) 
========

Description: This function alerts if mandatory fields are not filled in.
===========

Example of use:
==============
<script language="JavaScript1.2" type="text/javascript" src="/js/form_validate.js"></script> 

<form name="frmUser" .... 
onsubmit="return CheckMandatoryFieldsFilled( this, 0, 'user\'s first name', 2, 'user\'s salary');">
	<input type="text" name="user-fname" value="" />
	<input type="text" name="user-sname" value="" />
	<input type="text" name="user-salary" value="" />
	<input type="submit" name="submit" value="submit" />
</form>

Parameters:
==========

this - always call CheckMandatoryFieldsFilled with the first parameter = this

The rest of the parameters are in pairs.
In the first pair, 
	0 stands for the index of the form element that is mandatory ( user-fname )
	'user\'s first name' is the field name that is shown to the user, ie the alert
	will say "Please enter the user's first name"
	
So the above will only submit the form if user-fname and user-salary are filled in.
*************************************************************
*************************************************************/

<!--
function CheckMandatoryFieldsFilled(form) {
	var okSoFar=true;
		
	for (var i=1; i<CheckMandatoryFieldsFilled.arguments.length; i=i+2) {
		var form_element_index = CheckMandatoryFieldsFilled.arguments[i];
		var form_element = form.elements[form_element_index];
		var alert_field_name = CheckMandatoryFieldsFilled.arguments[i+1];

// alert(i + " " + alert_field_name + " - " + form_element.value);
		if (form_element.value=='') {
		   okSoFar=false;
		   alert('Please enter ' + alert_field_name );
		   form_element.focus();
		   return okSoFar;
		} else if ( form_element.checked!=true && form_element.name=='mod_reg_t_and_c') {
		   okSoFar=false;
		   alert('Please enter the ' + alert_field_name );
		   form_element.focus();
		   return okSoFar;
		}
	}
	
	return okSoFar;
}
//-->


