function Displ(action){
	if (action == 'HAll'){		$("#Region").attr("disabled", true);
		$("#City").attr("disabled", true);
	}
	if (action == 'HCity'){
		$("#City").attr("disabled", true);
	}
	if (action == 'SRegion'){
		$("#Region").removeAttr('disabled');
	}
	if (action == 'SCity'){
		$("#City").removeAttr('disabled');
	}
}

function LoadIT(act, th){	var val = th.value;
	if (act == 'Country') {		if (val == '-1') {			$('#Country').attr("disabled", true);
      $('#Country').load('/p_country.php', { action: 'LoadCountry', val: val });
      $('#Country').removeAttr('disabled');
		      Displ('HAll');
   	}
		else if (val == '0') {
      Displ('HAll');
   	}
   	else
   	{
   		$('#Region').attr("disabled", true);   		$('#Region').load('/p_country.php', { action: 'LoadRegion', val: val });
   		$('#Region').removeAttr('disabled');
   		Displ("HCity");
   		Displ("SRegion");
   	}
  }
	if (act == 'Region') {		$('#City').attr("disabled", true);		$('#City').load('/p_country.php', { action: 'LoadCity', val: val });
		$('#City').removeAttr('disabled');
		Displ("SCity");
	}
}

function SetDef(){	Displ('HAll');
	var Country = document.getElementById("Country");
	var Region = document.getElementById("Region");
//	document.write("Country=" + Country.value + " Region=" + Region.value);
	if (Country.value != '0') {
		Displ('SRegion');
	}
	if (Region.value != '0'){
		Displ('SCity');
	}
}


