function classValidForm(source,language) { //ver 1.0
/*
Author: Vincent Germain
Usage : ['regexShort','regexLong','warning',optionnal]
-regexShort: Detect if the form object name contain a specific word
-regexLong: Filther the main regular expression
-warning: Call the error message in case user input fail verification (set in warningList)
-optionnal: Set to false if the input is optionnal

Specific:
-objList[0][1]: Exclude any other objList[i++][0]
*/
	
	var warningList = new Array();
	warningList['fr'] = ['Ce champs est obligatoire','Le numéro de téléphone n\'est pas valide','Le numéro de fax n\'est pas valide','L\'adresse courriel n\'est pas valide','Le code postal n\'est pas valide','La quantitée n\'est pas valide']
	warningList['en'] = ['This field is required','The phone number is not valid','The fax number is not valid','This email is not valid','The postal code is not valid','The quantity is not valid']
	var increment = 0;
	var objList = [['generic','[a-z0-9]{2,}',warningList[language][increment++]],['phone','(?:\\([2-9]\\d{2}\\)\\ ?|[2-9]\\d{2}(?:\\-?|\\ ?))[2-9]\\d{2}[- ]?\\d{4}',warningList[language][increment++]],['fax','(?:\\([2-9]\\d{2}\\)\\ ?|[2-9]\\d{2}(?:\\-?|\\ ?))[2-9]\\d{2}[- ]?\\d{4}',warningList[language][increment++]],['mail','[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]',warningList[language][increment++]],['postal','[A-Z]\\d[A-Z] \\d[A-Z]\\d',warningList[language][increment++]],['quant','[0-9]{1,}',warningList[language][increment++]]]
	
	var greenColorBox = '#FFF';
	var redColorBox = '#efefef';
	
//Don't edit beyond this point
	var warningDiv = document.getElementsByTagName('span');
	var sendFlag = true;
	
	function validForm() {
		for (var i=0;i<source.length;i++) {
			if (source[i].type != 'button' && source[i].type != 'submit' && source[i].type != 'hidden' && source[i].type != 'radio' && source[i].type != 'checkbox') {
				for (var j=0;j<objList.length;j++) {
					var shortRegex = new RegExp(objList[j][0],'i');

					if (source[i].name != null && source[i].name.search(shortRegex) != -1) {
						if (source[i].name.search(/true/i) != -1 || source[i].value != '') {
							var longRegex = new RegExp(objList[j][1],'i');
							if (source[i].value.search(longRegex) != -1) {
								queryResult(i,greenColorBox,'');
							} else {
								queryResult(i,redColorBox,objList[j][2]);
								sendFlag = false;
							}
						} else {
							queryResult(i,greenColorBox,'');
						}
					}
				}
			}
		}
		if (sendFlag == true) {
			return true;
		} else {
			return false;
		}
	}
	
	function queryResult(x,color,warning) {
		source[x].style.background = color;
		document.getElementById('war_'+source[x].name).innerHTML = warning;
	}
	
	return validForm();
} // END classValidForm()
