function load_city () {

  var prefecture = document.f.prefecture;
  var pref = prefecture.value;
  

 if (!pref) {

 return;
 }
  
 prefecture.disabled = true;
 var scriptTag = document.createElement("script");
 scriptTag.setAttribute("type", "text/javascript");
  scriptTag.setAttribute("src", "index.php?pg=contents.search_city_jsonp&callback=set_city&prefecture=" + encodeURIComponent(pref));
 document.getElementsByTagName("head")[0].appendChild(scriptTag);
}

function set_city(data) {

  var city = document.f.city;
  var opt1 = city.getElementsByTagName("option")[0];
  opt1.innerHTML = "選択してください。";
  var frg = document.createDocumentFragment();
  frg.appendChild(opt1);
  city.innerHTML = "";
  for (var i = 0, len = data.length; i < len; i++) {
    if (typeof data[i] == "undefined") continue;
    var option = document.createElement("option");
    option.value = data[i];
    option.appendChild(document.createTextNode(data[i]));
    if (typeof city_name != "undefined" && city_name == data[i]) option.selected = "selected";
    frg.appendChild(option);
  }
  city.appendChild(frg);
  document.f.prefecture.disabled = false;
 
} 