// JavaScript Document

function activerDesactiver_champs()
{
	var type_checked = '';
	for(var i in document.frm_estimation.type)
	{
    	if(document.frm_estimation.type[i].checked=="1")
		{
			type_checked = document.frm_estimation.type[i].value;
			break;
		}
	}
	
	switch(type_checked)
	{
		case 'appartement' : 
			document.frm_estimation.appart_nbPieces.disabled = false;
			document.frm_estimation.appart_entrepo.disabled = false;
			document.frm_estimation.appart_autres.disabled = false;
			document.frm_estimation.maison_nbChambres.disabled = true;
			document.frm_estimation.maison_entrepo.disabled = true;
			document.frm_estimation.maison_autres.disabled = true;
			document.frm_estimation.commercial_surface.disabled = true;
			document.frm_estimation.industriel_surface.disabled = true;
			document.frm_estimation.overseas_volume.disabled = true;
			break;
		case 'maison' :
			document.frm_estimation.appart_nbPieces.disabled = true;
			document.frm_estimation.appart_entrepo.disabled = true;
			document.frm_estimation.appart_autres.disabled = true;
			document.frm_estimation.maison_nbChambres.disabled = false;
			document.frm_estimation.maison_entrepo.disabled = false;
			document.frm_estimation.maison_autres.disabled = false;
			document.frm_estimation.commercial_surface.disabled = true;
			document.frm_estimation.industriel_surface.disabled = true;
			document.frm_estimation.overseas_volume.disabled = true;
			break;
		case 'commercial' :
			document.frm_estimation.appart_nbPieces.disabled = true;
			document.frm_estimation.appart_entrepo.disabled = true;
			document.frm_estimation.appart_autres.disabled = true;
			document.frm_estimation.maison_nbChambres.disabled = true;
			document.frm_estimation.maison_entrepo.disabled = true;
			document.frm_estimation.maison_autres.disabled = true;
			document.frm_estimation.commercial_surface.disabled = false;
			document.frm_estimation.industriel_surface.disabled = true;
			document.frm_estimation.overseas_volume.disabled = true;
			break;
		case 'industriel' :
			document.frm_estimation.appart_nbPieces.disabled = true;
			document.frm_estimation.appart_entrepo.disabled = true;
			document.frm_estimation.appart_autres.disabled = true;
			document.frm_estimation.maison_nbChambres.disabled = true;
			document.frm_estimation.maison_entrepo.disabled = true;
			document.frm_estimation.maison_autres.disabled = true;
			document.frm_estimation.commercial_surface.disabled = true;
			document.frm_estimation.industriel_surface.disabled = false;
			document.frm_estimation.overseas_volume.disabled = true;
			break;
		case 'outre-mer' :
			document.frm_estimation.appart_nbPieces.disabled = true;
			document.frm_estimation.appart_entrepo.disabled = true;
			document.frm_estimation.appart_autres.disabled = true;
			document.frm_estimation.maison_nbChambres.disabled = true;
			document.frm_estimation.maison_entrepo.disabled = true;
			document.frm_estimation.maison_autres.disabled = true;
			document.frm_estimation.commercial_surface.disabled = true;
			document.frm_estimation.industriel_surface.disabled = true;
			document.frm_estimation.overseas_volume.disabled = false;
			break;
		case 'livraison' :
			document.frm_estimation.appart_nbPieces.disabled = true;
			document.frm_estimation.appart_entrepo.disabled = true;
			document.frm_estimation.appart_autres.disabled = true;
			document.frm_estimation.maison_nbChambres.disabled = true;
			document.frm_estimation.maison_entrepo.disabled = true;
			document.frm_estimation.maison_autres.disabled = true;
			document.frm_estimation.commercial_surface.disabled = true;
			document.frm_estimation.industriel_surface.disabled = true;
			document.frm_estimation.overseas_volume.disabled = true;
			break;
		case 'entreposage' :
			document.frm_estimation.appart_nbPieces.disabled = true;
			document.frm_estimation.appart_entrepo.disabled = true;
			document.frm_estimation.appart_autres.disabled = true;
			document.frm_estimation.maison_nbChambres.disabled = true;
			document.frm_estimation.maison_entrepo.disabled = true;
			document.frm_estimation.maison_autres.disabled = true;
			document.frm_estimation.commercial_surface.disabled = true;
			document.frm_estimation.industriel_surface.disabled = true;
			document.frm_estimation.overseas_volume.disabled = true;
			break;
	}
}