	var city_id;
    function getCity(prefecture, id) {
    	var url = "/Search.html?type=3&prefecture=" + encodeURIComponent(prefecture);
    	if (id) {
    		city_id = id;
    	}
    	new Ajax.Request(url,{method:"get", onComplete:renderCity});
    }

    function getRegisterCity(prefecture, id) {
    	var url = "/Search.html?type=3&prefecture=" + encodeURIComponent(prefecture);
    	if (id) {
    		city_id = id;
    	}
    	new Ajax.Request(url,{method:"get", onComplete:renderRegisterCity});
    }

    function renderCity(listData){
    	var dat = eval("("+listData.responseText+")");
    	var idx = $("cty").options.length;
    	for(var i = 0; i <=idx ; i++) {
	   		$("cty").options[0] = null;
    	}

    	for(var i = 0; i < dat.length; i++) {
    		$("cty").options[i] = new Option(dat[i].city_name + "(" + dat[i].cnt + "件)", dat[i].city_id);
    		if (city_id && dat[i].city_id == city_id) {
    			$("cty").options[i].selected = true;
    		}
    	}

    }

    function renderRegisterCity(listData){
    	var dat = eval("("+listData.responseText+")");
    	var idx = $("cty").options.length;
    	for(var i = 0; i <=idx ; i++) {
	   		$("cty").options[0] = null;
    	}

    	for(var i = 0; i < dat.length; i++) {
    		$("cty").options[i] = new Option(dat[i].city_name, dat[i].city_id);
    		if (city_id && dat[i].city_id == city_id) {
    			$("cty").options[i].selected = true;
    		}
    	}

    }
