	function LMAC_val(fO, dC, flds){ // v.1.2
		var eM = "";
		for(var i=0; i<fO.length; i++){
			if(fO[i].id != ""){
				var obj = fO[i];
				var cV = "";
				var s = false;
				
				
				switch(obj.tagName.toUpperCase()){
					case "INPUT": cV = obj.value.replace(/^\s+|\s+$/g, ''); s = true; break;
					case "SELECT": cV = obj.options[obj.selectedIndex].value.replace(/^\s+|\s+$/g, ''); s = true; break;
					case "TEXTAREA": cV = obj.value.replace(/^\s+|\s+$/g, ''); s = true; break;
				}
				if(flds) if(flds.indexOf(obj.name) == -1) continue;
				
				if(s && obj.id.indexOf("::") != -1){
					obj.style.backgroundColor = dC;
					switch(obj.id.split("::")[0].toUpperCase()){
						case "EMAIL": if(!/^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/.test(cV)){ eM += " - [ " + obj.id.split("::")[1] + " ] :: Requires a Valid Email ::\n"; obj.style.backgroundColor = "#FFAAAA"; } break;
						case "NUMBER": if(isNaN(cV) || cV == ""){ eM += " - [ " + obj.id.split("::")[1] + " ] :: Requires a Valid Number ::\n"; obj.style.backgroundColor = "#FFAAAA"; } break;
						case "TIME": if(!/^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$/.test(cV)){ eM += " - [ " + obj.id.split("::")[1] + " ] :: Requires a Valid Time ::\n"; obj.style.backgroundColor = "#FFAAAA"; } break;
						case "USPHONE": if(!/^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/.test(cV)){ eM += " - [ " + obj.id.split("::")[1] + " ] :: Requires a Valid Phone Number ::\n"; obj.style.backgroundColor = "#FFAAAA"; } break;
						case "CURRENCY": if(!/^\$?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(cV) || cV == ""){ eM += " - [ " + obj.id.split("::")[1] + " ] :: Requires a Valid Currency ::\n"; obj.style.backgroundColor = "#FFAAAA"; } break;
						//case "CASENAME": if(!REGEX.test(cV)){ eM += " - [ " + obj.id.split("::")[1] + " ] :: Requires a Valid Email ::\n"; obj.style.backgroundColor = "#FFAAAA"; } break;
					}
				}else if(s && cV == ""){
					obj.style.backgroundColor = "#FFAAAA";
					eM += " - [ " + obj.id + " ]\n";
				}else if(s){
					obj.style.backgroundColor = dC;
		}	}	}
		if(eM != ""){
			alert("The form you are attempting to submit is incomplete.\n\nPlease complete the following fields before proceeding:\n" + eM);
			return false;
		}else return true;
	}
