function init_form () {
	if ( document.getElementById("main_form") ) {
		var oInput = document.getElementById("main_form").getElementsByTagName("INPUT");

		
		for(var i=0;i<oInput.length;i++){
			if(oInput[i].className != ''){
				nom = oInput[i].name;
				var oLabel = document.getElementById('main_form').getElementsByTagName("LABEL");
				for(var indice=0;indice<oLabel.length;indice++){
					if(oLabel[indice].htmlFor == nom){
						oLabel[indice].innerHTML = "<span style=\"color:#FF6600\">*</span>&nbsp;"+oLabel[indice].innerHTML;
					}
				}
			}
			if(oInput[i].type!='radio'){
				oInput[i].onblur = function(){
					this.style.background = '#CCCCCC';
				};
				oInput[i].onfocus = function(){
					this.style.background = '#B5CA2D';
				};
			}
		}
		var oTextarea = document.body.getElementsByTagName("TEXTAREA");
		for(var i=0;i<oTextarea.length;i++){
			if(oTextarea[i].className != ''){
				nom = oTextarea[i].name;
				var oLabel = document.getElementById('main_form').getElementsByTagName("LABEL");
				for(var indice=0;indice<oLabel.length;indice++){
					if(oLabel[indice].htmlFor == nom){
						oLabel[indice].innerHTML = "<span style=\"color:#FF6600\">*</span>&nbsp;"+oLabel[indice].innerHTML;
					}
				}
			}
			oTextarea[i].onblur = function(){
				this.style.background = '#CCCCCC';
			};
			oTextarea[i].onfocus = function(){
				this.style.background = '#B5CA2D';
			};
		}
	}
}

function init_form_front () {
	if ( document.getElementById("main_form") ) {
		var oInput = document.getElementById("main_form").getElementsByTagName("INPUT");
		
		for(var i=0;i<oInput.length;i++){
			if(oInput[i].className != '' && oInput[i].className != 'not_required'){
				nom = oInput[i].name;
				var oLabel = document.getElementById('main_form').getElementsByTagName("LABEL");
				for(var indice=0;indice<oLabel.length;indice++){
					if(oLabel[indice].htmlFor!='' && oLabel[indice].htmlFor  == nom){
						oLabel[indice].innerHTML = "<span style=\"color:#FF6600\">*</span>&nbsp;"+oLabel[indice].innerHTML;
					}
				}
			}
		}
		
		var oTextarea = document.body.getElementsByTagName("TEXTAREA");
		for(var i=0;i<oTextarea.length;i++){
			if(oTextarea[i].className != '' && oInput[i].className != 'not_required'){
				nom = oTextarea[i].name;
				var oLabel = document.getElementById('main_form').getElementsByTagName("LABEL");
				for(var indice=0;indice<oLabel.length;indice++){
					if(oLabel[indice].htmlFor!='' && oLabel[indice].htmlFor == nom){
						oLabel[indice].innerHTML = "<span style=\"color:#FF6600\">*</span>&nbsp;"+oLabel[indice].innerHTML;
					}
				}
			}
		}
		
		var oSelect = document.body.getElementsByTagName("SELECT");
		for(var i=0;i<oSelect.length;i++){
			if(oSelect[i].className != '' && oInput[i].className != 'not_required'){
				nom = oSelect[i].name;
				var oLabel = document.getElementById('main_form').getElementsByTagName("LABEL");
				for(var indice=0;indice<oLabel.length;indice++){
					if(oLabel[indice].htmlFor!='' && oLabel[indice].htmlFor == nom){
						oLabel[indice].innerHTML = "<span style=\"color:#FF6600\">*</span>&nbsp;"+oLabel[indice].innerHTML;
					}
				}
			}
		}
	}
}