function chkInit(){
	chklist = new CheckList();
	chklist.containerName = "zoneBox";
	chklist.zoneSelectedCtlName = "zonelist";
	chklist.onSelectZone = zone_select;
	chklist.onUnselectZone = zone_unselect;
	chklist.onSelectAll = allzone_select;
	chklist.onUnselectAll = allzone_unselect;
	chklist.onSelectGroup = group_select;
	chklist.onUnselectGroup = group_unselect;
	chklist.onZoneOver = zone_over;
	chklist.onZoneOut = zone_out;
	chklist.Init();
}

function zone_over(){
	var span = this;
	var zoneCode = span.id;
	if (IsBigCity($(ctlComune).value)) {
		var zoneId = DecodeZone(zoneCode);
		if (zoneId) {
			map.RollOver(zoneId);
		}
	}
}

function zone_out(){
	var span = this;
	var zoneCode = span.id;
	if (IsBigCity($(ctlComune).value)) {
		var zoneId = DecodeZone(zoneCode);
		if (zoneId) {
			map.RollOut(zoneId);
		}
	}
}

function zone_select(zoneCode){
	if (IsBigCity($(ctlComune).value)) {
		var zoneId = DecodeZone(zoneCode);
		if (zoneId) {
			map.SelectArea(zoneId);
		}
	}
}

function zone_unselect(zoneCode){
	if (IsBigCity($(ctlComune).value)) {
		var zoneId = DecodeZone(zoneCode);
		if (zoneId) {
			map.RemoveArea(zoneId);
		}
	}
}

function allzone_select(){
	//SelectAllZones();
}

function allzone_unselect(){
	//UnselectAllZones();
}

function group_select(idgroup){
	var zoneId = DecodeZone('g'+idgroup);
	if (zoneId){
		map.SelectArea(zoneId);
	}
}

function group_unselect(idgroup){
	var zoneId = DecodeZone('g'+idgroup);
	if (zoneId){
		map.RemoveArea(zoneId);
	}
}

function zone_click(){
	var chk = this;
	var zoneCode = chk.parentNode.id;
	if (chk.checked) {
		chklist.selectZone(chk);
	}
	else {
		chklist.unselectZone(chk);
	}
}

function group_click(){
	var chk = this;
	if (chk.checked) {
		chklist.selectGroup(chk);
	}
	else {
		chklist.unselectGroup(chk);
	}
}
