function loadBrands() {
	var ind = document.configurator.CatName.selectedIndex;	
	if (ind > 0) {
		document.getElementById('div_brand_0').className = 'hideGrp';
		document.getElementById('div_brand').className = 'showGrp';
		document.getElementById('B').focus();
	}
	else {
		document.getElementById('div_brand_0').className = 'showGrp';
		document.getElementById('div_brand').className = 'hideGrp';
	}
	document.getElementById('div_model_0').className = 'showGrp';
	document.getElementById('div_model').className = 'hideGrp';
	document.configurator.M.length = 0;
	document.configurator.M.options[0] = new Option('Selecione o modelo ...');
	document.configurator.B.length = 0;
	document.configurator.B.options[0] = new Option('Selecione a marca ...');
	if (ind == 1) {
		for (var i = 0; i < camcorder_brands.length; i++) {
			document.configurator.B.options[i+1] = new Option(camcorder_brands[i]);
		}
	}
	else if (ind == 2) {
		for (var i = 0; i < digitalcamera_brands.length; i++) {
			document.configurator.B.options[i+1] = new Option(digitalcamera_brands[i]);
		}	
	}
}

function loadModels() {
	var cat = document.configurator.CatName.selectedIndex;
	var ind = document.configurator.B.selectedIndex;
	if (ind > 0) {
		document.getElementById('div_model_0').className = 'hideGrp';
		document.getElementById('div_model').className = 'showGrp';
		document.getElementById('M').focus();
	}
	else {
		document.getElementById('div_model_0').className = 'showGrp';
		document.getElementById('div_model').className = 'hideGrp';
	}
	ind = ind - 1
	if (ind >= 0) {
		document.configurator.M.length = 0;
		document.configurator.M.options[0] = new Option('Selecione o modelo ...');
		if (cat == 1) {
			for (var i = 0; i < camcorder_models[ind].length; i++) {
				document.configurator.M.options[i+1] = new Option(camcorder_models[ind][i]);
			}
		}
		else if (cat == 2) {
			for (var i = 0; i < digitalcamera_models[ind].length; i++) {
				document.configurator.M.options[i+1] = new Option(digitalcamera_models[ind][i]);
			}	
		}
	}
}	