	// this function needs mlAllRequiredFields to be set
	
	
	function checkrequired( which ) {
		
		var pass = true;
		
		if ( document.images ) {
			for ( i = 0 ; i < document.forms[ which ].length ; i++ ) {
			
				var tempobj=document.forms[ which ].elements[i];
				
				if ( tempobj.name.substring(0,4) == 'req_' ) {
					if ( ( tempobj.type=="text" || tempobj.type=="textarea" || tempobj.type.toString().charAt(0) == "s" ) && tempobj.value == '' ) {
						pass=false;
						break;
					}
					if ( tempobj.type=="radio" ) {
					
						var tempradio = document.forms[ which ].elements[ tempobj.name ];
						var radio_button_check = false;
						
						for ( counter = 0 ; counter < tempradio.length ; counter++ ) {
							// If a radio button has been selected it will return true
							// (If not it will return false)
							if ( tempradio[counter].checked )
							radio_button_check = true;
						}

						if ( radio_button_check == false ) {
							pass=false;
							break;
						}
					}
				}
				if ( tempobj.name.substring(0,9) == 'reqemail_' ) {
					split_at = tempobj.value.split('@');
					if ( !split_at[1] ) {
						pass=false;
						break;
					} else {
						split_dot = split_at[1].split('.');
						if ( split_at[0] == '' || !split_dot[0] || !split_dot[1] ) {
							pass=false;
							break;
						}
					}
				}
			}
		}
		if (!pass) {
			alert( mlAllRequiredFields );
			tempobj.focus();
			return false;
		} else 
		return true;
	}
