﻿var cityPoly = null;
var cityIndex = null;


//JavaScript value= 0:初期 1:変更時
function changeZahyo_Area1(value)
{
    waitOperation(true);
    
    var cbo1 = document.getElementById("tab1_cboZahyo1");
    if(cbo1 == null)return;
    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;
    var cbo14 = document.getElementById("tab1_cboZahyo4");
    if(cbo14 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo1");
    if(cbo2 == null)return;
    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;
    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;

    //四角形タブ 2010.11.12 fuchi
    var optWaku_sikaku = document.getElementById("tab1_zahyo_sikaku_opt");
    if (optWaku_sikaku == null) return;

    //多角形タブ 2010.11.12 fuchi
    var optWaku_takaku = document.getElementById("tab1_zahyo_takaku_opt");
    if (optWaku_takaku == null) return;

    //2010.11.12 fuchi 四角形タブ/座標単位(10進/60進)
    var optZahyoSikaku_10 = document.getElementById("optZahyoSikaku_10");
    if (optZahyoSikaku_10 == null) return;

    var optZahyoSikaku_60 = document.getElementById("optZahyoSikaku_60");
    if (optZahyoSikaku_60 == null) return;

    //2010.11.12 fuchi 多角形タブ/座標単位(10進/60進)
    var optZahyoTakaku_10 = document.getElementById("optZahyoTakaku_10");
    if (optZahyoTakaku_10 == null) return;

    var optZahyoTakaku_60 = document.getElementById("optZahyoTakaku_60");
    if (optZahyoTakaku_60 == null) return;
    
    //サイズ指定タブ
    var lbl1 = document.getElementById("Tbl1_lblZahyo1_tani1");
    if(lbl1 == null)return;

    var lbl2 = document.getElementById("Tbl1_lblZahyo1_tani2");
    if(lbl2 == null)return;

    var lbl3 = document.getElementById("tab1_zahyo1_lbl1");
    if(lbl3 == null)return;
    
    var lbl4 = document.getElementById("tab1_zahyo1_lbl2");
    if(lbl4 == null)return;

    var table1 = document.getElementById("tab1_zahyo1_Type1");
    if(table1 == null)return;
    
    var table2 = document.getElementById("tab1_zahyo1_Type2");
    if(table2 == null)return;
    
    var optWaku = document.getElementById("tab1_zahyo1_opt");
    if(optWaku == null) return;

    //座標値指定タブ
    var lbl1_2 = document.getElementById("Tbl1_lblZahyo2_tani1");
    if(lbl1_2 == null)return;

    var lbl2_2 = document.getElementById("Tbl1_lblZahyo2_tani2");
    if(lbl2_2 == null)return;

    var lbl3_2 = document.getElementById("tab1_zahyo2_lbl1");
    if(lbl3_2 == null)return;
    
    var lbl4_2 = document.getElementById("tab1_zahyo2_lbl2");
    if(lbl4_2 == null)return;

    var table1_2 = document.getElementById("tab1_zahyo2_Type1");
    if(table1_2 == null)return;
    
    var table2_2 = document.getElementById("tab1_zahyo2_Type2");
    if(table2_2 == null)return;
    
    var optWaku_2 = document.getElementById("tab1_zahyo2_opt");
    if(optWaku_2 == null) return;

    var opt1 = document.getElementById("optZahyo1_10");
    if(opt1 == null)return;

    var opt2 = document.getElementById("optZahyo1_60");
    if(opt2 == null)return;

    var opt3 = document.getElementById("optZahyo2_10");
    if(opt3 == null)return;

    var opt4 = document.getElementById("optZahyo2_60");
    if(opt4 == null)return;
    
    delKei("tab1_cboKeiNo1");
    delKei("tab1_cboKeiNo2");
    delKei("tab1_cboKeiNo3");
    delKei("tab1_cboKeiNo4");

    //2010/11/30 Add 60進⇒10進変換を追加
    //緯度経度60進表示モード判定
    if (table1.style.display == "none" && cbo1.selectedIndex != 0) {
        //[サイズ指定][座標値指定]タブの緯度経度を60進数から10進数に変換しセットする。
        if (!setDDAll()) {

        }
    }
    //2010/11/30 Add End 60進⇒10進変換を追加
    
    switch(cbo1.selectedIndex){
        case 0:
            optWaku_sikaku.style.display = "";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "";      //2010.11.12 fuchi

            cbo2.disabled="disabled";
            cbo22.disabled="disabled";
            cbo23.disabled="disabled";
            cbo24.disabled="disabled";
//            cbo2.disabled="";
//            cbo22.disabled="";
//            cbo23.disabled="";
//            cbo24.disabled="";
//            cbo2.options[0] = new Option("緯度経度座標系",  0);
//            cbo22.options[0] = new Option("緯度経度座標系",  0);
//            cbo23.options[0] = new Option("緯度経度座標系",  0);
//            cbo24.options[0] = new Option("緯度経度座標系",  0);

            lbl1.innerHTML = "";
            lbl2.innerHTML = "";

            lbl1_2.innerHTML = "";
            lbl2_2.innerHTML = "";

            optWaku.style.display = "";
            optWaku_2.style.display = "";
            
            if(opt1.checked == true){
                //10進
                table1.style.display = "";
                table2.style.display = "none";
                lbl3.innerHTML = "&#160 経度";
                lbl4.innerHTML = "&#160 緯度";
                table1_2.style.display = "";
                table2_2.style.display = "none";
                lbl3_2.innerHTML = "&#160 経度";
                lbl4_2.innerHTML = "&#160 緯度";
                
            }else{
                //60進
                table1.style.display = "none";
                table2.style.display = "";
                table1_2.style.display = "none";
                table2_2.style.display = "";
            }
            break;
    
        case 1:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            cbo24.disabled="";
            setKei_UTM("tab1_cboKeiNo1");
            setKei_UTM("tab1_cboKeiNo2");
            setKei_UTM("tab1_cboKeiNo3");
            setKei_UTM("tab1_cboKeiNo4");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "&#160&#160 X";
            lbl4.innerHTML = "&#160&#160 Y";

            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "&#160&#160 X";
            lbl4_2.innerHTML = "&#160&#160 Y";

            break;

        case 2:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            cbo24.disabled="";
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            setKei_Heimen("tab1_cboKeiNo4");
            table1.style.display = "";
            table2.style.display = "none";            
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";

            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";

            break;
        case 3:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            cbo24.disabled="";
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            setKei_Heimen("tab1_cboKeiNo4");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";
            
            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";

            break;
            
        default:
            break;
    }
    if (value=='1')
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";
        
        var argument = "Control=AREA2_0";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (optZahyoSikaku_10.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (optZahyoSikaku_10.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA1_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA1_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (optZahyoSikaku_10.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }
        eval(onAreaCallback);
    }
    
    convertCbo('1');

}

function changeZahyo_Area2(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo1");
    if(cbo1 == null)return;
    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;
    var cbo14 = document.getElementById("tab1_cboZahyo4");
    if(cbo14 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo1");
    if(cbo2 == null)return;
    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;
    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;

    //四角形タブ 2010.11.12 fuchi
    var optWaku_sikaku = document.getElementById("tab1_zahyo_sikaku_opt");
    if (optWaku_sikaku == null) return;

    //多角形タブ 2010.11.12 fuchi
    var optWaku_takaku = document.getElementById("tab1_zahyo_takaku_opt");
    if (optWaku_takaku == null) return;

    //2010.11.12 fuchi 四角形タブ/座標単位(10進/60進)
    var optZahyoSikaku_10 = document.getElementById("optZahyoSikaku_10");
    if (optZahyoSikaku_10 == null) return;

    var optZahyoSikaku_60 = document.getElementById("optZahyoSikaku_60");
    if (optZahyoSikaku_60 == null) return;

    //2010.11.12 fuchi 多角形タブ/座標単位(10進/60進)
    var optZahyoTakaku_10 = document.getElementById("optZahyoTakaku_10");
    if (optZahyoTakaku_10 == null) return;

    var optZahyoTakaku_60 = document.getElementById("optZahyoTakaku_60");
    if (optZahyoTakaku_60 == null) return;
    
    //サイズ指定タブ
    var lbl1 = document.getElementById("Tbl1_lblZahyo1_tani1");
    if(lbl1 == null)return;

    var lbl2 = document.getElementById("Tbl1_lblZahyo1_tani2");
    if(lbl2 == null)return;

    var lbl3 = document.getElementById("tab1_zahyo1_lbl1");
    if(lbl3 == null)return;
    
    var lbl4 = document.getElementById("tab1_zahyo1_lbl2");
    if(lbl4 == null)return;

    var table1 = document.getElementById("tab1_zahyo1_Type1");
    if(table1 == null)return;
    
    var table2 = document.getElementById("tab1_zahyo1_Type2");
    if(table2 == null)return;
    
    var optWaku = document.getElementById("tab1_zahyo1_opt");
    if(optWaku == null) return;

    //座標値指定タブ
    var lbl1_2 = document.getElementById("Tbl1_lblZahyo2_tani1");
    if(lbl1_2 == null)return;

    var lbl2_2 = document.getElementById("Tbl1_lblZahyo2_tani2");
    if(lbl2_2 == null)return;

    var lbl3_2 = document.getElementById("tab1_zahyo2_lbl1");
    if(lbl3_2 == null)return;
    
    var lbl4_2 = document.getElementById("tab1_zahyo2_lbl2");
    if(lbl4_2 == null)return;

    var table1_2 = document.getElementById("tab1_zahyo2_Type1");
    if(table1_2 == null)return;
    
    var table2_2 = document.getElementById("tab1_zahyo2_Type2");
    if(table2_2 == null)return;
    
    var optWaku_2 = document.getElementById("tab1_zahyo2_opt");
    if(optWaku_2 == null) return;


    var opt1 = document.getElementById("optZahyo1_10");
    if(opt1 == null)return;

    var opt2 = document.getElementById("optZahyo1_60");
    if(opt2 == null)return;

    var opt3 = document.getElementById("optZahyo2_10");
    if(opt3 == null)return;

    var opt4 = document.getElementById("optZahyo2_60");
    if(opt4 == null)return;

    
    delKei("tab1_cboKeiNo1");
    delKei("tab1_cboKeiNo2");
    delKei("tab1_cboKeiNo3");
    delKei("tab1_cboKeiNo4");

    //2010/11/30 Add 60進⇒10進変換を追加
    //緯度経度60進表示モード判定
    if (table1.style.display == "none" && cbo1.selectedIndex != 0) {
        //[サイズ指定][座標値指定]タブの緯度経度を60進数から10進数に変換しセットする。
        if (!setDDAll()) {

        } 
    }
    //2010/11/30 Add End 60進⇒10進変換を追加

    switch(cbo12.selectedIndex){
        case 0:
            optWaku_sikaku.style.display = "";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "";      //2010.11.12 fuchi
            cbo2.disabled="disabled";
            cbo22.disabled="disabled";
            cbo23.disabled="disabled";
            cbo24.disabled="disabled";
//            cbo2.disabled="";
//            cbo22.disabled="";
//            cbo23.disabled="";
//            cbo24.disabled="";
//            cbo2.options[0] = new Option("緯度経度座標系",  0);
//            cbo22.options[0] = new Option("緯度経度座標系",  0);
//            cbo23.options[0] = new Option("緯度経度座標系",  0);
//            cbo24.options[0] = new Option("緯度経度座標系",  0);

            lbl1.innerHTML = "";
            lbl2.innerHTML = "";
            lbl1_2.innerHTML = "";
            lbl2_2.innerHTML = "";
            optWaku.style.display = "";
            optWaku_2.style.display = "";
            if(opt1.checked == true){
                //10進
                table1.style.display = "";
                table2.style.display = "none";
                lbl3.innerHTML = "&#160 経度";
                lbl4.innerHTML = "&#160 緯度";
                table1_2.style.display = "";
                table2_2.style.display = "none";
                lbl3_2.innerHTML = "&#160 経度";
                lbl4_2.innerHTML = "&#160 緯度";
                
            }else{
                //60進
                table1.style.display = "none";
                table2.style.display = "";
                table1_2.style.display = "none";
                table2_2.style.display = "";
            }
            break;

        case 1:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            cbo24.disabled="";
            setKei_UTM("tab1_cboKeiNo1");
            setKei_UTM("tab1_cboKeiNo2");
            setKei_UTM("tab1_cboKeiNo3");
            setKei_UTM("tab1_cboKeiNo4");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "&#160&#160 X";
            lbl4.innerHTML = "&#160&#160 Y";

            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "&#160&#160 X";
            lbl4_2.innerHTML = "&#160&#160 Y";

            break;

        case 2:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi        
            cbo2.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            cbo24.disabled="";
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            setKei_Heimen("tab1_cboKeiNo4");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";
            
            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";

            break;
        case 3:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            cbo24.disabled="";
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            setKei_Heimen("tab1_cboKeiNo4");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";
            
            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";

            break;
            
        default:
            break;
    }
    if (value=='1')
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";

        var argument = "Control=AREA1_0";
        argument += "&INDEX1=" + cbo12.selectedIndex;
        argument += "&INDEX2=" + cbo22.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (optZahyoTakaku_10.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo12.selectedIndex;
        argument += "&INDEX2=" + cbo22.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (optZahyoTakaku_10.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA2_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA2_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo12.selectedIndex;
        argument += "&INDEX2=" + cbo22.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (optZahyoTakaku_10.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }
        eval(onAreaCallback);
    }
    
    convertCbo('2');
}

function changeZahyo_Area3(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo3");
    if(cbo1 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo3");
    if(cbo2 == null)return;
    
    var table1 = document.getElementById("tab1_zahyo1_Type1");
    if(table1 == null)return;
    
    var table2 = document.getElementById("tab1_zahyo1_Type2");
    if(table2 == null)return;
    
    var optWaku = document.getElementById("tab1_zahyo1_opt");
    if(optWaku == null) return;
    
    var table1_2 = document.getElementById("tab1_zahyo2_Type1");
    if(table1_2 == null)return;
    
    var table2_2 = document.getElementById("tab1_zahyo2_Type2");
    if(table2_2 == null)return;
    
    var optWaku_2 = document.getElementById("tab1_zahyo2_opt");
    if(optWaku_2 == null) return;

    //四角形タブ 2010.11.12 fuchi
    var optWaku_sikaku = document.getElementById("tab1_zahyo_sikaku_opt");
    if (optWaku_sikaku == null) return;

    //多角形タブ 2010.11.12 fuchi
    var optWaku_takaku = document.getElementById("tab1_zahyo_takaku_opt");
    if (optWaku_takaku == null) return;

    //2010.11.12 fuchi 四角形タブ/座標単位(10進/60進)
    var optZahyoSikaku_10 = document.getElementById("optZahyoSikaku_10");
    if (optZahyoSikaku_10 == null) return;

    var optZahyoSikaku_60 = document.getElementById("optZahyoSikaku_60");
    if (optZahyoSikaku_60 == null) return;

    //2010.11.12 fuchi 多角形タブ/座標単位(10進/60進)
    var optZahyoTakaku_10 = document.getElementById("optZahyoTakaku_10");
    if (optZahyoTakaku_10 == null) return;

    var optZahyoTakaku_60 = document.getElementById("optZahyoTakaku_60");
    if (optZahyoTakaku_60 == null) return;
        
    var opt1 = document.getElementById("optZahyo1_10");
    if(opt1 == null)return;

    var opt2 = document.getElementById("optZahyo1_60");
    if(opt2 == null)return;

    var opt3 = document.getElementById("optZahyo2_10");
    if(opt3 == null)return;

    var opt4 = document.getElementById("optZahyo2_60");
    if(opt4 == null)return;

    
    var lbl1 = document.getElementById("Tbl1_lblZahyo1_tani1");
    if(lbl1 == null)return;

    var lbl2 = document.getElementById("Tbl1_lblZahyo1_tani2");
    if(lbl2 == null)return;

    var lbl3 = document.getElementById("tab1_zahyo1_lbl1");
    if(lbl3 == null)return;
    
    var lbl4 = document.getElementById("tab1_zahyo1_lbl2");
    if(lbl4 == null)return;

    var lbl1_2 = document.getElementById("Tbl1_lblZahyo2_tani1");
    if(lbl1_2 == null)return;

    var lbl2_2 = document.getElementById("Tbl1_lblZahyo2_tani2");
    if(lbl2_2 == null)return;

    var lbl3_2 = document.getElementById("tab1_zahyo2_lbl1");
    if(lbl3_2 == null)return;
    
    var lbl4_2 = document.getElementById("tab1_zahyo2_lbl2");
    if(lbl4_2 == null)return;
    
    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;
    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;
    var cbo14 = document.getElementById("tab1_cboZahyo4");
    if(cbo14 == null)return;

    var cbo21 = document.getElementById("tab1_cboKeiNo1");
    if(cbo21 == null)return;
    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;
    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if (txt4 == null) return;
    
    delKei("tab1_cboKeiNo1");
    delKei("tab1_cboKeiNo2");
    delKei("tab1_cboKeiNo3");
    delKei("tab1_cboKeiNo4");

    //2010/11/30 Add 60進⇒10進変換を追加
    //緯度経度60進表示モード判定
    if (table1.style.display == "none" && cbo1.selectedIndex != 0) {
        //[サイズ指定][座標値指定]タブの緯度経度を60進数から10進数に変換しセットする。
        if (!setDDAll()) {

        } 
    }
    //2010/11/30 Add End 60進⇒10進変換を追加
    
    switch(cbo1.selectedIndex){
        case 0:
            optWaku_sikaku.style.display = "";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "";      //2010.11.12 fuchi
            cbo2.disabled="disabled";
            cbo21.disabled="disabled";
            cbo22.disabled="disabled";
            cbo24.disabled="disabled";
//            cbo2.disabled="";
//            cbo21.disabled="";
//            cbo22.disabled="";
//            cbo24.disabled="";
//            cbo2.options[0] = new Option("緯度経度座標系",  0);
//            cbo21.options[0] = new Option("緯度経度座標系",  0);
//            cbo22.options[0] = new Option("緯度経度座標系",  0);
//            cbo24.options[0] = new Option("緯度経度座標系",  0);

            lbl1.innerHTML = "";
            lbl2.innerHTML = "";
            lbl1_2.innerHTML = "";
            lbl2_2.innerHTML = "";
            
            if(opt1.checked == false && opt2.checked == false){
                opt1.checked = true;
            }
            
            optWaku.style.display = "";
            optWaku_2.style.display = "";
            if(opt1.checked == true){
                //10進
                table1.style.display = "";
                table2.style.display = "none";
                lbl3.innerHTML = "&#160 経度";
                lbl4.innerHTML = "&#160 緯度";
                table1_2.style.display = "";
                table2_2.style.display = "none";
                lbl3_2.innerHTML = "&#160 経度";
                lbl4_2.innerHTML = "&#160 緯度";
                
            }else{
                //60進
                table1.style.display = "none";
                table2.style.display = "";
                table1_2.style.display = "none";
                table2_2.style.display = "";
            }
            break;

        case 1:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo21.disabled="";
            cbo22.disabled="";
            cbo24.disabled="";
            setKei_UTM("tab1_cboKeiNo4");
            setKei_UTM("tab1_cboKeiNo1");
            setKei_UTM("tab1_cboKeiNo2");
            setKei_UTM("tab1_cboKeiNo3");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "&#160&#160 X";
            lbl4.innerHTML = "&#160&#160 Y";

            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "&#160&#160 X";
            lbl4_2.innerHTML = "&#160&#160 Y";

            break;

        case 2:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo21.disabled="";
            cbo22.disabled="";
            cbo24.disabled="";
            setKei_Heimen("tab1_cboKeiNo4");
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";

            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";

            break;
        case 3:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo21.disabled="";
            cbo22.disabled="";
            cbo24.disabled="";
            setKei_Heimen("tab1_cboKeiNo4");
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";

            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";

            break;
            
        default:
            break;
    }
    if (value=='1')
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";

        var argument = "Control=AREA2_0";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (opt1.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (opt1.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA1_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA1_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (opt1.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }
        eval(onAreaCallback);
    }
    convertCbo('3');
}
function changeZahyo_Area4(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo4");
    if(cbo1 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo4");
    if(cbo2 == null)return;
    
    var table1 = document.getElementById("tab1_zahyo2_Type1");
    if(table1 == null)return;
    
    var table2 = document.getElementById("tab1_zahyo2_Type2");
    if(table2 == null)return;
    
    var optWaku = document.getElementById("tab1_zahyo2_opt");
    if(optWaku == null) return;
    
    var table1_2 = document.getElementById("tab1_zahyo1_Type1");
    if(table1_2 == null)return;
    
    var table2_2 = document.getElementById("tab1_zahyo1_Type2");
    if(table2_2 == null)return;
    
    var optWaku_2 = document.getElementById("tab1_zahyo1_opt");
    if(optWaku_2 == null) return;

    //四角形タブ 2010.11.12 fuchi
    var optWaku_sikaku = document.getElementById("tab1_zahyo_sikaku_opt");
    if (optWaku_sikaku == null) return;

    //多角形タブ 2010.11.12 fuchi
    var optWaku_takaku = document.getElementById("tab1_zahyo_takaku_opt");
    if (optWaku_takaku == null) return;
    
    var opt1 = document.getElementById("optZahyo2_10");
    if(opt1 == null)return;

    var opt2 = document.getElementById("optZahyo2_60");
    if(opt2 == null)return;

    var opt3 = document.getElementById("optZahyo1_10");
    if(opt3 == null)return;

    var opt4 = document.getElementById("optZahyo1_60");
    if(opt4 == null)return;
    
    var lbl1 = document.getElementById("Tbl1_lblZahyo2_tani1");
    if(lbl1 == null)return;

    var lbl2 = document.getElementById("Tbl1_lblZahyo2_tani2");
    if(lbl2 == null)return;

    var lbl3 = document.getElementById("tab1_zahyo2_lbl1");
    if(lbl3 == null)return;
    
    var lbl4 = document.getElementById("tab1_zahyo2_lbl2");
    if(lbl4 == null)return;
    
    var lbl1_2 = document.getElementById("Tbl1_lblZahyo1_tani1");
    if(lbl1_2 == null)return;

    var lbl2_2 = document.getElementById("Tbl1_lblZahyo1_tani2");
    if(lbl2_2 == null)return;

    var lbl3_2 = document.getElementById("tab1_zahyo1_lbl1");
    if(lbl3_2 == null)return;
    
    var lbl4_2 = document.getElementById("tab1_zahyo1_lbl2");
    if(lbl4_2 == null)return;
    
    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;
    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;

    var cbo21 = document.getElementById("tab1_cboKeiNo1");
    if(cbo21 == null)return;
    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;
    
    delKei("tab1_cboKeiNo1");
    delKei("tab1_cboKeiNo2");
    delKei("tab1_cboKeiNo3");
    delKei("tab1_cboKeiNo4");

    //2010/11/30 Add 60進⇒10進変換を追加
    //緯度経度60進表示モード判定
    if (table1.style.display == "none" && cbo1.selectedIndex != 0) {
        //[サイズ指定][座標値指定]タブの緯度経度を60進数から10進数に変換しセットする。
        if (!setDDAll()) {

        } 
    }
    //2010/11/30 Add End 60進⇒10進変換を追加

    switch(cbo1.selectedIndex){
        case 0:
            optWaku_sikaku.style.display = "";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "";      //2010.11.12 fuchi
            cbo2.disabled="disabled";
            cbo21.disabled="disabled";
            cbo22.disabled="disabled";
            cbo23.disabled="disabled";
//            cbo2.disabled="";
//            cbo21.disabled="";
//            cbo22.disabled="";
//            cbo23.disabled="";
//            cbo2.options[0] = new Option("緯度経度座標系",  0);
//            cbo21.options[0] = new Option("緯度経度座標系",  0);
//            cbo22.options[0] = new Option("緯度経度座標系",  0);
//            cbo23.options[0] = new Option("緯度経度座標系",  0);

            lbl1.innerHTML = "";
            lbl2.innerHTML = "";
            lbl1_2.innerHTML = "";
            lbl2_2.innerHTML = "";
            
            if(opt1.checked == false && opt2.checked == false){
                opt1.checked = true;
            }
            
            optWaku.style.display = "";
            optWaku_2.style.display = "";
            if(opt1.checked == true){
                //10進
                table1.style.display = "";
                table2.style.display = "none";
                lbl3.innerHTML = "&#160 経度";
                lbl4.innerHTML = "&#160 緯度";
                table1_2.style.display = "";
                table2_2.style.display = "none";
                lbl3_2.innerHTML = "&#160 経度";
                lbl4_2.innerHTML = "&#160 緯度";
            }else{
                //60進
                table1.style.display = "none";
                table2.style.display = "";
                table1_2.style.display = "none";
                table2_2.style.display = "";
            }
            break;

        case 1:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo21.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            setKei_UTM("tab1_cboKeiNo4");
            setKei_UTM("tab1_cboKeiNo1");
            setKei_UTM("tab1_cboKeiNo2");
            setKei_UTM("tab1_cboKeiNo3");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "&#160&#160 X";
            lbl4.innerHTML = "&#160&#160 Y";
            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "&#160&#160 X";
            lbl4_2.innerHTML = "&#160&#160 Y";
            break;

        case 2:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo21.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            setKei_Heimen("tab1_cboKeiNo4");
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";
            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";
            break;
        case 3:
            optWaku_sikaku.style.display = "none";      //2010.11.12 fuchi
            optWaku_takaku.style.display = "none";      //2010.11.12 fuchi
            cbo2.disabled="";
            cbo21.disabled="";
            cbo22.disabled="";
            cbo23.disabled="";
            setKei_Heimen("tab1_cboKeiNo4");
            setKei_Heimen("tab1_cboKeiNo1");
            setKei_Heimen("tab1_cboKeiNo2");
            setKei_Heimen("tab1_cboKeiNo3");
            table1.style.display = "";
            table2.style.display = "none";
            optWaku.style.display = "none";
            lbl1.innerHTML = "m";
            lbl2.innerHTML = "m";
            lbl3.innerHTML = "X(東西)";
            lbl4.innerHTML = "Y(南北)";
            table1_2.style.display = "";
            table2_2.style.display = "none";
            optWaku_2.style.display = "none";
            lbl1_2.innerHTML = "m";
            lbl2_2.innerHTML = "m";
            lbl3_2.innerHTML = "X(東西)";
            lbl4_2.innerHTML = "Y(南北)";
            break;
            
        default:
            break;
    }
    if (value=='1')
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";

        var argument = "Control=AREA1_0";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (opt1.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA2_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA2_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (opt1.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4_0";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4_0";
        //2010/11/26 Rev End コールバックを一括送信に変更。

        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010.11.11 fuchi 座標単位(10進or60進)
        if (opt1.checked == true) {
            argument += "&TANI=10";
        }
        else {
            argument += "&TANI=60";
        }

        //2010/12/01 Del
//        //2010/11/26 Rev コールバックを一括送信に変更。
//        //eval(onAreaCallback);
//        //var argument = "Control=convertZahyoText";
//        //2010.11.15 fuchi 座標値指定タブの入力座標項目を10進/60進で表示変換する
//        argument += CB_SEPARATOR;
//        argument += "Control=convertZahyoText";
//        //2010/11/26 Rev End コールバックを一括送信に変更。

//        if (opt1.checked == true) {
//            argument += "&OPT_VALUE=3";
//        }
//        else {
//            argument += "&OPT_VALUE=4";
//        }
//        argument += "&CBOZAHYO_INDEX=" + cbo1.selectedIndex;
        //2010/12/01 Del End
        
        eval(onAreaCallback);
        
    }
    convertCbo('4');
}

//[サイズ指定][座標値指定]タブの緯度経度を60進数から10進数に変換しセットする。
function setDDAll() {
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if (txt1 == null) return false;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if (txt2 == null) return false;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if (txt3 == null) return false;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if (txt4 == null) return false;
    var txt51 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_1");
    if (txt51 == null) return false;
    var txt52 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_2");
    if (txt52 == null) return false;
    var txt53 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_3");
    if (txt53 == null) return false;
    var txt61 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_1");
    if (txt61 == null) return false;
    var txt62 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_2");
    if (txt62 == null) return false;
    var txt63 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_3");
    if (txt63 == null) return false;
    var txt71 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_1");
    if (txt71 == null) return false;
    var txt72 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_2");
    if (txt72 == null) return false;
    var txt73 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_3");
    if (txt73 == null) return false;
    var txt81 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_1");
    if (txt81 == null) return false;
    var txt82 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_2");
    if (txt82 == null) return false;
    var txt83 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_3");
    if (txt83 == null) return false;

    if (!setDD(txt1, txt51, txt52, txt53, false)) {
        //計算失敗
        txt1.value = '';
        txt51.value = '';
        txt52.value = '';
        txt53.value = '';
    }
    if (!setDD(txt2, txt61, txt62, txt63, true)) {
        //計算失敗
        txt2.value = '';
        txt61.value = '';
        txt62.value = '';
        txt63.value = '';
    }
    if (!setDD(txt3, txt71, txt72, txt73, false)) {
        //計算失敗
        txt3.value = '';
        txt71.value = '';
        txt72.value = '';
        txt73.value = '';
    }
    if (!setDD(txt4, txt81, txt82, txt83, true)) {
        //計算失敗
        txt4.value = '';
        txt81.value = '';
        txt82.value = '';
        txt83.value = '';
    }
    return true;
}


function changeZahyo_Opt(value) {

    //10進数　緯経度 有効桁数
    var decRoundDigits = 6;
    //16進数　緯経度[秒] 有効桁数
    var hexSecRoundDigits = 2;

    //テキスト座標変換
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;

    var txt51 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_1");
    if(txt51 == null)return;
    var txt52 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_2");
    if(txt52 == null)return;
    var txt53 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_3");
    if(txt53 == null)return;
    
    var txt61 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_1");
    if(txt61 == null)return;
    var txt62 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_2");
    if(txt62 == null)return;
    var txt63 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_3");
    if(txt63 == null)return;
    
    var txt71 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_1");
    if(txt71 == null)return;
    var txt72 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_2");
    if(txt72 == null)return;
    var txt73 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_3");
    if(txt73 == null)return;
    
    var txt81 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_1");
    if(txt81 == null)return;
    var txt82 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_2");
    if(txt82 == null)return;
    var txt83 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_3");
    if(txt83 == null)return;

    //2010.11.12 fuchi 四角形タブ/座標単位(10進/60進)
    var optZahyoSikaku_10 = document.getElementById("optZahyoSikaku_10");
    if (optZahyoSikaku_10 == null) return;

    var optZahyoSikaku_60 = document.getElementById("optZahyoSikaku_60");
    if (optZahyoSikaku_60 == null) return;

    //2010.11.12 fuchi 多角形タブ/座標単位(10進/60進)
    var optZahyoTakaku_10 = document.getElementById("optZahyoTakaku_10");
    if (optZahyoTakaku_10 == null) return;

    var optZahyoTakaku_60 = document.getElementById("optZahyoTakaku_60");
    if (optZahyoTakaku_60 == null) return;
    
    var opt1 = document.getElementById("optZahyo1_10");
    if(opt1 == null)return;

    var opt2 = document.getElementById("optZahyo1_60");
    if(opt2 == null)return;

    var opt3 = document.getElementById("optZahyo2_10");
    if(opt3 == null)return;

    var opt4 = document.getElementById("optZahyo2_60");
    if(opt4 == null)return;
    
    var table1 = document.getElementById("tab1_zahyo1_Type1");
    if(table1 == null)return;
    
    var table2 = document.getElementById("tab1_zahyo1_Type2");
    if(table2 == null)return;
    
    var table3 = document.getElementById("tab1_zahyo2_Type1");
    if(table3 == null)return;
    
    var table4 = document.getElementById("tab1_zahyo2_Type2");
    if(table4 == null)return;

    var cboZahyo1 = document.getElementById("tab1_cboZahyo1");      //2010.11.15 四角形タブ.座標タイプコンボ
    if (cboZahyo1 == null) return;

    var cboZahyo2 = document.getElementById("tab1_cboZahyo2");      //2010.11.15 多角形タブ.座標タイプコンボ
    if (cboZahyo2 == null) return;

    var cboZahyo4 = document.getElementById("tab1_cboZahyo4");      //2010.11.15 座標値タブ.座標タイプコンボ
    if (cboZahyo4 == null) return;
    
    if (value == '1' || value == '3') {
        opt1.checked = false;
        opt3.checked = false;
        opt2.checked = true;
        opt4.checked = true;

        var errText1 = null;
        var errText3 = null;

        //[TabUserControl.js]checkDMSメソッド　DMSテキストボックス整形及びチェック処理
        //  引数1:Dテキストボックス
        //  引数2:Mテキストボックス
        //  引数3:Sテキストボックス
        //  引数4:[true]緯度 [false]経度
        //  戻り値:エラーしたテキストボックス
        errText1 = checkDMS(txt51, txt52, txt53, false);
        if (errText1 == null) {
            errText1 = checkDMS(txt61, txt62, txt63, true);
        }
        else {
            checkDMS(txt61, txt62, txt63, true);
        }

        errText3 = checkDMS(txt71, txt72, txt73, false);
        if (errText3 == null) {
            errText3 = checkDMS(txt81, txt82, txt83, true);
        }
        else {
            checkDMS(txt81, txt82, txt83, true);
        }

        //エラー判定
        if (value == '1') {
            //サイズ指定タブ表示時
            if (errText1 != null && errText1.value != '') {
                alert("入力値に誤りがあります");
                errText1.focus();
                return false;
            }
        }
        else if (value == '3') {
            //座標値指定タブ表示時
            if (errText3 != null && errText3.value != '') {
                alert("入力値に誤りがあります");
                errText3.focus();
                return false;
            }
        }

        //2010/11/19 Add 計算処理をメソッドにまとめた。
        //[TabUserControl.js]setDDメソッド　DMS⇒DD変換処理
        //  引数1:DDテキストボックス
        //  引数2:Dテキストボックス
        //  引数3:Mテキストボックス
        //  引数4:Sテキストボックス
        //  引数5:[true]緯度 [false]経度
        if (!setDD(txt1, txt51, txt52, txt53, false)) {
            //計算失敗
            txt1.value = '';
            txt51.value = '';
            txt52.value = '';
            txt53.value = '';
        }
        if (!setDD(txt2, txt61, txt62, txt63, true)) {
            //計算失敗
            txt2.value = '';
            txt61.value = '';
            txt62.value = '';
            txt63.value = '';
        }
        if (!setDD(txt3, txt71, txt72, txt73, false)) {
            //計算失敗
            txt3.value = '';
            txt71.value = '';
            txt72.value = '';
            txt73.value = '';
        }
        if (!setDD(txt4, txt81, txt82, txt83, true)) {
            //計算失敗
            txt4.value = '';
            txt81.value = '';
            txt82.value = '';
            txt83.value = '';
        }
        //2010/11/19 Add End計算処理をメソッドにまとめた。
        
        optZahyoSikaku_10.checked = true;       //2010.11.12 fuchi
        optZahyoSikaku_60.checked = false;      //2010.11.12 fuchi
        optZahyoTakaku_10.checked = true;       //2010.11.12 fuchi
        optZahyoTakaku_60.checked = false;      //2010.11.12 fuchi

        opt1.checked = true;
        opt3.checked = true;
        opt2.checked = false;
        opt4.checked = false;

        table1.style.display = "";
        table2.style.display = "none";
        table3.style.display = "";
        table4.style.display = "none";

    }
    else if (value == '2' || value == '4') {
        opt1.checked = true;
        opt3.checked = true;
        opt2.checked = false;
        opt4.checked = false;

        var errText2 = null;
        var errText4 = null;

        //[TabUserControl.js]checkDDメソッド　DMSテキストボックス整形及びチェック処理
        //  引数1:DDテキストボックス
        //  引数4:[true]緯度 [false]経度
        //  戻り値:[true]正常 [false]エラー
        if(!checkDD(txt1, false)){
            errText2 = txt1;
        }
        if (errText2 == null) {
            if (!checkDD(txt2, true)) {
                errText2 = txt2;
            }
        }
        else {
            checkDD(txt2, true);
        }

        if (!checkDD(txt3, false)) {
            errText4 = txt3;
        }
        if (errText4 == null) {
            if (!checkDD(txt4, true)) {
                errText4 = txt4;
            }
        }
        else {
            checkDD(txt4, true);
        }

        //エラー判定
        if (value == '2') {
            //サイズ指定タブ表示時
            if (errText2 != null && errText2.value != '') {
                alert("入力値に誤りがあります");
                errText2.focus();
                return false;
            }
        }
        else if (value == '4') {
            //座標値指定タブ表示時
            if (errText4 != null && errText4.value != '') {
                alert("入力値に誤りがあります");
                errText4.focus();
                return false;
            }
        }

        //2010/11/19 Add 計算処理をメソッドにまとめた。
        //[TabUserControl.js]setDDメソッド　DMS⇒DD変換処理
        //  引数1:DDテキストボックス
        //  引数2:Dテキストボックス
        //  引数3:Mテキストボックス
        //  引数4:Sテキストボックス
        //  引数5:[true]緯度 [false]経度
        if (!setDMS(txt1, txt51, txt52, txt53, false)) {
            //計算失敗
            txt1.value = '';
            txt51.value = '';
            txt52.value = '';
            txt53.value = '';
        }
        if (!setDMS(txt2, txt61, txt62, txt63, true)) {
            //計算失敗
            txt2.value = '';
            txt61.value = '';
            txt62.value = '';
            txt63.value = '';
        }
        if (!setDMS(txt3, txt71, txt72, txt73, false)) {
            //計算失敗
            txt3.value = '';
            txt71.value = '';
            txt72.value = '';
            txt73.value = '';
        }
        if (!setDMS(txt4, txt81, txt82, txt83, true)) {
            //計算失敗
            txt4.value = '';
            txt81.value = '';
            txt82.value = '';
            txt83.value = '';
        }
        //2010/11/19 Add End計算処理をメソッドにまとめた。

        optZahyoSikaku_10.checked = false;      //2010.11.12 fuchi
        optZahyoSikaku_60.checked = true;       //2010.11.12 fuchi
        optZahyoTakaku_10.checked = false;      //2010.11.12 fuchi
        optZahyoTakaku_60.checked = true;       //2010.11.12 fuchi

        opt1.checked = false;
        opt3.checked = false;
        opt2.checked = true;
        opt4.checked = true;

        table1.style.display = "none";
        table2.style.display = "";
        table3.style.display = "none";
        table4.style.display = "";
    }
    else if (value == 'sikaku10' || value == 'takaku10') {    
        optZahyoSikaku_10.checked = true;
        optZahyoSikaku_60.checked = false;
        optZahyoTakaku_10.checked = true;
        optZahyoTakaku_60.checked = false;
        opt1.checked = true;
        opt2.checked = false;
        opt3.checked = true;
        opt4.checked = false;
        //座標入力項目
        table1.style.display = "";
        table2.style.display = "none";
        table3.style.display = "";
        table4.style.display = "none";
    }
    else if (value == 'sikaku60' || value == 'takaku60') {
        optZahyoSikaku_10.checked = false;
        optZahyoSikaku_60.checked = true;
        optZahyoTakaku_10.checked = false;
        optZahyoTakaku_60.checked = true;
        opt1.checked = false;
        opt2.checked = true;
        opt3.checked = false;
        opt4.checked = true;
        //座標入力項目
        table1.style.display = "none";
        table2.style.display = "";
        table3.style.display = "none";
        table4.style.display = "";
    }

    //2010.11.11 fuchi ラジオ選択でcallbackして、座標一覧の10進/60進を切替え
    //10進
    if (value == "3" || value == "sikaku10" || value == "takaku10") {
        var argument = "Control=changeZahyoOpt";
        argument += "&OPT_VALUE=sikaku10";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo1.selectedIndex;
        eval(onAreaCallback);

        var argument = "Control=changeZahyoOpt";
        argument += "&OPT_VALUE=takaku10";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo2.selectedIndex;
        eval(onAreaCallback);

        var argument = "Control=changeZahyoOpt";
        argument += "&OPT_VALUE=3";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo4.selectedIndex;
        eval(onAreaCallback);
    }
    //60進
    else if (value == "4" || value == "sikaku60" || value == "takaku60") {
        var argument = "Control=changeZahyoOpt";
        argument += "&OPT_VALUE=sikaku60";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo1.selectedIndex;
        eval(onAreaCallback);

        var argument = "Control=changeZahyoOpt";
        argument += "&OPT_VALUE=takaku60";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo2.selectedIndex;
        eval(onAreaCallback);

        var argument = "Control=changeZahyoOpt";
        argument += "&OPT_VALUE=4";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo4.selectedIndex;
        eval(onAreaCallback);
    }

    //2010.11.15 fuchi ラジオ選択でcallbackして、座標値指定タブの入力座標項目を10進/60進で表示変換する
    /*
    if (value == "3") {
        var argument = "Control=convertZahyoText";
        argument += "&OPT_VALUE=3";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo4.selectedIndex;
        eval(onAreaCallback);
    }
    else if (value == "4") {
        var argument = "Control=convertZahyoText";
        argument += "&OPT_VALUE=4";
        argument += "&CBOZAHYO_INDEX=" + cboZahyo4.selectedIndex;
        eval(onAreaCallback);
    }
    */        
}

//JavaScript value= 0:初期 1:変更時
function changeKei1(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo1");
    if(cbo1 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo1");
    if(cbo2 == null)return;

    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;
    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;

    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;
    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    
    cbo22.selectedIndex=cbo2.selectedIndex;
    cbo23.selectedIndex=cbo2.selectedIndex;
    cbo24.selectedIndex=cbo2.selectedIndex;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;
    

    if (value=='1'&&cbo1.selectedIndex!=0)
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";

        var argument = "Control=AREA2";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA1";
        argument += CB_SEPARATOR;
        argument += "Control=AREA1";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        eval(onAreaCallback);
    }
    convertCbo('1');
}
function changeKei2(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo2");
    if(cbo1 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo2");
    if(cbo2 == null)return;

    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;
    var cbo14 = document.getElementById("tab1_cboZahyo4");
    if(cbo14 == null)return;

    var cbo21 = document.getElementById("tab1_cboKeiNo1");
    if(cbo21 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;
    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    cbo21.selectedIndex=cbo2.selectedIndex;
    cbo23.selectedIndex=cbo2.selectedIndex;
    cbo24.selectedIndex=cbo2.selectedIndex;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;

    if (value=='1'&&cbo1.selectedIndex!=0)
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";

        var argument = "Control=AREA1";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA2";
        argument += CB_SEPARATOR;
        argument += "Control=AREA2";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        eval(onAreaCallback);
    }
    convertCbo('2');
}
function changeKei3(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo3");
    if(cbo1 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo3");
    if(cbo2 == null)return;

    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo2");
    if(cbo13 == null)return;
    var cbo14 = document.getElementById("tab1_cboZahyo4");
    if(cbo14 == null)return;

    var cbo21 = document.getElementById("tab1_cboKeiNo1");
    if(cbo21 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo2");
    if(cbo23 == null)return;
    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    cbo21.selectedIndex=cbo2.selectedIndex;
    cbo23.selectedIndex=cbo2.selectedIndex;
    cbo24.selectedIndex=cbo2.selectedIndex;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;

    if (value=='1'&&cbo1.selectedIndex!=0)
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";

        var argument = "Control=AREA2";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA1";
        argument += CB_SEPARATOR;
        argument += "Control=AREA1";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        eval(onAreaCallback);
    }
    convertCbo('3');
}
function changeKei4(value)
{
    waitOperation(true);

    var cbo1 = document.getElementById("tab1_cboZahyo4");
    if(cbo1 == null)return;

    var cbo2 = document.getElementById("tab1_cboKeiNo4");
    if(cbo2 == null)return;
    
    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;
    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;

    var cbo21 = document.getElementById("tab1_cboKeiNo1");
    if(cbo21 == null)return;
    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;
    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;

    cbo21.selectedIndex=cbo2.selectedIndex;
    cbo22.selectedIndex=cbo2.selectedIndex;
    cbo23.selectedIndex=cbo2.selectedIndex;
    
    var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
    if(txt1 == null)return;
    var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
    if(txt2 == null)return;
    var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
    if(txt3 == null)return;
    var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
    if(txt4 == null)return;

    if (value=='1'&&cbo1.selectedIndex!=0)
    {
        //地図の範囲を取得
        var centerat = new GLatLng();
        centerat = gmap.getCenter();
        //中心座標
        //2010/11/22 Rev 丸め処理共通化
        //var lat = Math.round(centerat.lat() * 10000);
        //lat = lat / 10000;
        //var lon = Math.round(centerat.lng()*10000);
        //lon = lon / 10000;
        var lat = roundPoint(centerat.lat());
        var lon = roundPoint(centerat.lng());
        //2010/11/22 Rev 丸め処理共通化

        //2010/11/26 Add 区切り文字
        var CB_SEPARATOR = "||||";
        
        var argument = "Control=AREA1";
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA2";
        argument += CB_SEPARATOR;
        argument += "Control=AREA2";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=0";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        //2010/11/26 Rev コールバックを一括送信に変更。
        //eval(onAreaCallback);
        //argument = "Control=AREA4";
        argument += CB_SEPARATOR;
        argument += "Control=AREA4";
        //2010/11/26 Rev End コールバックを一括送信に変更。
        argument += "&INDEX1=" + cbo1.selectedIndex;
        argument += "&INDEX2=" + cbo2.selectedIndex;
        argument += "&TEXT1=" + txt1.value;
        argument += "&TEXT2=" + txt2.value;
        argument += "&TEXT3=" + txt3.value;
        argument += "&TEXT4=" + txt4.value;
        argument += "&FLG=1";
        argument += "&LAT=" + lat.toString();
        argument += "&LON=" + lon.toString();
        eval(onAreaCallback);
   }
    convertCbo('4');
}


//系ｺﾝﾎﾞﾎﾞｯｸｽ削除
function delKei(Name){
    var cbo = document.getElementById(Name);
    if(cbo == null)return;
    
    var cnt = 0;
    cnt = cbo.length;
    
    if(cnt == 0)return;
    if(cbo.options[0] == null) retrun;

    var i;
    for(i = 0; i < cnt; i++) {
        cbo.options[cbo.length -1] = null;                
    }
}

//平面直角 系ｺﾝﾎﾞﾎﾞｯｸｽ設定
function setKei_Heimen(Name){
    var cbo = document.getElementById(Name);
    if(cbo == null)return;
    
    var i;
    var kei =1;
    for(i = 0; i< 19; i++){
        cbo.options[i] = new Option(kei + "系",  i);
        kei++;
    }
}

//UTM 系ｺﾝﾎﾞﾎﾞｯｸｽ設定
function setKei_UTM(Name){
    var cbo = document.getElementById(Name);
    if(cbo == null)return;
    
    var i;
    var kei =1;
    for(i = 0; i< 60; i++){
        cbo.options[i] = new Option(kei + "帯",  i);
        kei++;
    }
}

function convertCbo(name)
{
    var cbo11 = document.getElementById("tab1_cboZahyo1");
    if(cbo11 == null)return;

    var cbo21 = document.getElementById("tab1_cboKeiNo1");
    if(cbo21 == null)return;

    var cbo12 = document.getElementById("tab1_cboZahyo2");
    if(cbo12 == null)return;

    var cbo22 = document.getElementById("tab1_cboKeiNo2");
    if(cbo22 == null)return;

    var cbo14 = document.getElementById("tab1_cboZahyo4");
    if(cbo14 == null)return;

    var cbo24 = document.getElementById("tab1_cboKeiNo4");
    if(cbo24 == null)return;
    
    var cbo13 = document.getElementById("tab1_cboZahyo3");
    if(cbo13 == null)return;

    var cbo23 = document.getElementById("tab1_cboKeiNo3");
    if(cbo23 == null)return;

    if (name=='1' && cbo11.selectedIndex>=0)
    {
        cbo12.selectedIndex = cbo11.selectedIndex;
        cbo13.selectedIndex = cbo11.selectedIndex;
        cbo14.selectedIndex = cbo11.selectedIndex;

        cbo22.selectedIndex = cbo21.selectedIndex;
        cbo23.selectedIndex = cbo21.selectedIndex;
        cbo24.selectedIndex = cbo21.selectedIndex;

    }
    if (name=='2' && cbo12.selectedIndex>=0)
    {
        cbo11.selectedIndex = cbo12.selectedIndex;
        cbo13.selectedIndex = cbo12.selectedIndex;
        cbo14.selectedIndex = cbo12.selectedIndex;

        cbo22.selectedIndex = cbo22.selectedIndex;
        cbo23.selectedIndex = cbo22.selectedIndex;
        cbo24.selectedIndex = cbo22.selectedIndex;

    }
    if (name=='3' && cbo13.selectedIndex>=0)
    {
        cbo11.selectedIndex = cbo13.selectedIndex;
        cbo12.selectedIndex = cbo13.selectedIndex;
        cbo14.selectedIndex = cbo13.selectedIndex;

        cbo21.selectedIndex = cbo23.selectedIndex;
        cbo22.selectedIndex = cbo23.selectedIndex;
        cbo24.selectedIndex = cbo23.selectedIndex;

    }
    if (name=='4' && cbo14.selectedIndex>=0)
    {
        cbo11.selectedIndex = cbo14.selectedIndex;
        cbo12.selectedIndex = cbo14.selectedIndex;
        cbo13.selectedIndex = cbo14.selectedIndex;

        cbo21.selectedIndex = cbo24.selectedIndex;
        cbo22.selectedIndex = cbo24.selectedIndex;
        cbo23.selectedIndex = cbo24.selectedIndex;

    }
}

// CallBack戻り
function resultonArea(value) {
    var CB_SEPARATOR = "||||";
    var strsResponses = value.toString().split(CB_SEPARATOR);

    for (var i in strsResponses) {
        resultonAreaMain(strsResponses[i]);
    }
    
}

//2010/11/26 Rev メソッド名変更 複数のレスポンスを同時に処理する為
//function resultonArea(value){
function resultonAreaMain(value){

    waitOperation(false);

    if (value=='1')
    {
        return;
    }
    if (value=='-1')
    {
        return;
    }

    var tgvalue = value.toString().split('@')
    if(tgvalue[0]=='kei')
    {
        var cbo21 = document.getElementById("tab1_cboKeiNo1");
        if(cbo21 == null)return;
        var cbo22 = document.getElementById("tab1_cboKeiNo2");
        if(cbo22 == null)return;
        var cbo23 = document.getElementById("tab1_cboKeiNo3");
        if(cbo23 == null)return;
        var cbo24 = document.getElementById("tab1_cboKeiNo4");
        if(cbo24 == null)return;
        
        cbo21.selectedIndex=Number(tgvalue[1]);
        cbo22.selectedIndex=Number(tgvalue[1]);
        cbo23.selectedIndex=Number(tgvalue[1]);
        cbo24.selectedIndex=Number(tgvalue[1]);
        
        var div = document.getElementById(tgvalue[2]);
        div.innerHTML = tgvalue[3];
        var div2 = document.getElementById(tgvalue[4]);
        div2.innerHTML = tgvalue[5];
        //テキスト座標変換
        var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
        if(txt1 == null)return;
        var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
        if(txt2 == null)return;
        var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
        if(txt3 == null)return;
        var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
        if(txt4 == null)return;
        if(tgvalue.length>=10)
        {
            if (tgvalue[6]=='-99999999')tgvalue[6]='';
            if (tgvalue[7]=='-99999999')tgvalue[7]='';
            if (tgvalue[8]=='-99999999')tgvalue[8]='';
            if (tgvalue[9]=='-99999999')tgvalue[9]='';
            txt1.value=tgvalue[6];
            txt2.value=tgvalue[7];
            txt3.value=tgvalue[8];
            txt4.value=tgvalue[9];
        
        }
        if(tgvalue.length>=11)
        {
            var val1 = tgvalue[11].split(',');
            if(val1[0] == "") return;
            var pnts = new Array();
            for(var i = 0; i < val1.length; i+=2) {
                pnts.push(new GLatLng(val1[i+1], val1[i]));
            }
            changeAreaEnvelope(pnts);
        }
        return;

    }
    if(tgvalue[0]=='kei2')
    {
        var cbo21 = document.getElementById("tab1_cboKeiNo1");
        if(cbo21 == null)return;
        var cbo22 = document.getElementById("tab1_cboKeiNo2");
        if(cbo22 == null)return;
        var cbo23 = document.getElementById("tab1_cboKeiNo3");
        if(cbo23 == null)return;
        var cbo24 = document.getElementById("tab1_cboKeiNo4");
        if(cbo24 == null)return;
        
        cbo21.selectedIndex=Number(tgvalue[1]);
        cbo22.selectedIndex=Number(tgvalue[1]);
        cbo23.selectedIndex=Number(tgvalue[1]);
        cbo24.selectedIndex=Number(tgvalue[1]);

        var div = document.getElementById(tgvalue[2]);
        div.innerHTML = tgvalue[3];
        var div2 = document.getElementById(tgvalue[4]);
        div2.innerHTML = tgvalue[5];

        var div3 = document.getElementById(tgvalue[6]);
        div3.innerHTML = tgvalue[7];
        var div4 = document.getElementById(tgvalue[8]);
        div4.innerHTML = tgvalue[9];
        //テキスト座標変換
        var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
        if(txt1 == null)return;
        var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
        if(txt2 == null)return;
        var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
        if(txt3 == null)return;
        var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
        if(txt4 == null)return;
        if(tgvalue.length==14)
        {
            if (tgvalue[10]=='-99999999')tgvalue[10]='';
            if (tgvalue[11]=='-99999999')tgvalue[11]='';
            if (tgvalue[12]=='-99999999')tgvalue[12]='';
            if (tgvalue[13]=='-99999999')tgvalue[13]='';
            txt1.value=tgvalue[10];
            txt2.value=tgvalue[11];
            txt3.value=tgvalue[12];
            txt4.value=tgvalue[13];
        
        }

        return;

    }
    if(tgvalue[0]=='kei4')
    {

        var cbo21 = document.getElementById("tab1_cboKeiNo1");
        if(cbo21 == null)return;
        var cbo22 = document.getElementById("tab1_cboKeiNo2");
        if(cbo22 == null)return;
        var cbo23 = document.getElementById("tab1_cboKeiNo3");
        if(cbo23 == null)return;
        var cbo24 = document.getElementById("tab1_cboKeiNo4");
        if(cbo24 == null)return;
        
        cbo21.selectedIndex=Number(tgvalue[1]);
        cbo22.selectedIndex=Number(tgvalue[1]);
        cbo23.selectedIndex=Number(tgvalue[1]);
        cbo24.selectedIndex=Number(tgvalue[1]);

        var div = document.getElementById(tgvalue[2]);
        div.innerHTML = tgvalue[3];
        var div2 = document.getElementById(tgvalue[4]);
        div2.innerHTML = tgvalue[5];
 
        var div3 = document.getElementById(tgvalue[6]);
        div3.innerHTML = tgvalue[7];
        var div4 = document.getElementById(tgvalue[8]);
        div4.innerHTML = tgvalue[9];
        //テキスト座標変換
        var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
        if(txt1 == null)return;
        var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
        if(txt2 == null)return;
        var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
        if(txt3 == null)return;
        var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
        if (txt4 == null) return;
        
        //2010/11/30 Rev
        //if(tgvalue.length==14)
        if (tgvalue.length == 15)
        //2010/11/30 Rev End
        {
            if (tgvalue[10]=='-99999999')tgvalue[10]='';
            if (tgvalue[11]=='-99999999')tgvalue[11]='';
            if (tgvalue[12]=='-99999999')tgvalue[12]='';
            if (tgvalue[13]=='-99999999')tgvalue[13]='';
            txt1.value=tgvalue[10];
            txt2.value=tgvalue[11];
            txt3.value=tgvalue[12];
            txt4.value=tgvalue[13];
        
        }
      
        return;

    }

    if(tgvalue[0]=='lat')
    {
        
        var div = document.getElementById(tgvalue[1]);
        div.innerHTML = tgvalue[2];
        var div2 = document.getElementById(tgvalue[3]);
        div2.innerHTML = tgvalue[4];
        
        var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data1");
        if(txt1 == null)return;
        var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data2");
        if(txt2 == null)return;
        var txt3 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
        if(txt3 == null)return;
        var txt4 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
        if(txt4 == null)return;

        var txt51 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_1");
        if(txt51 == null)return;
        var txt52 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_2");
        if(txt52 == null)return;
        var txt53 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data3_3");
        if(txt53 == null)return;
        
        var txt61 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_1");
        if(txt61 == null)return;
        var txt62 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_2");
        if(txt62 == null)return;
        var txt63 = document.getElementById("ucTab11_TabContainer1_TabPanel3_txtZahyo1_Data4_3");
        if(txt63 == null)return;
        
        var txt71 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_1");
        if(txt71 == null)return;
        var txt72 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_2");
        if(txt72 == null)return;
        var txt73 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_3");
        if(txt73 == null)return;
        
        var txt81 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_1");
        if(txt81 == null)return;
        var txt82 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_2");
        if(txt82 == null)return;
        var txt83 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_3");
        if(txt83 == null)return;
        
        if(tgvalue.length>4)
        {
            var div3 = document.getElementById(tgvalue[5]);
            if(div3!=null)
            {
                div3.innerHTML = tgvalue[6];
            }
            var div4 = document.getElementById(tgvalue[7]);
            if(div4!=null)
            {
                div4.innerHTML = tgvalue[8];
            }
        }
        //2010/11/30 Rev
        //if(tgvalue.length==13)
        if (tgvalue.length == 14)
        //2010/11/30 Rev End
        {
            
            //テキスト座標変換
            if (tgvalue[9]=='-99999999')tgvalue[9]='';
            if (tgvalue[10]=='-99999999')tgvalue[10]='';
            if (tgvalue[11]=='-99999999')tgvalue[11]='';
            if (tgvalue[12]=='-99999999')tgvalue[12]='';
            txt1.value = tgvalue[9];
            txt2.value = tgvalue[10];
            txt3.value = tgvalue[11];
            txt4.value = tgvalue[12];

            if (tgvalue[9] != '') {
                //2010/11/24 Rev 処理を共通化
                //var lat1 = Math.floor(Number(txt1.value));
                //var lat2 = Math.floor((Number(txt1.value) * 60) % 60);
                //var lat3 = Math.round((Number(txt1.value) * 3600) % 60);
                //txt51.value = lat1.toString();
                //txt52.value = lat2.toString();
                //txt53.value = lat3.toString();
                if (!setDMS(txt1, txt51, txt52, txt53, false)) {
                    txt1.value = "";
                    txt51.value = "";
                    txt52.value = "";
                    txt53.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
            if(tgvalue[10]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //var lng1 = Math.floor(Number(txt2.value));
                //var lng2 = Math.floor((Number(txt2.value) * 60) % 60);
                //var lng3 = Math.round((Number(txt2.value) * 3600) % 60);
                //txt61.value = lng1.toString();
                //txt62.value = lng2.toString();
                //txt63.value = lng3.toString();
                if (!setDMS(txt2, txt61, txt62, txt63, true)) {
                    txt2.value = "";
                    txt61.value = "";
                    txt62.value = "";
                    txt63.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
            
            if(tgvalue[11]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //lat1 = Math.floor(Number(txt3.value));
                //lat2 = Math.floor((Number(txt3.value) * 60) % 60);
                //lat3 = Math.round((Number(txt3.value) * 3600) % 60);
                //txt71.value = lat1.toString();
                //txt72.value = lat2.toString();
                //txt73.value = lat3.toString();
                if (!setDMS(txt3, txt71, txt72, txt73, false)) {
                    txt3.value = "";
                    txt71.value = "";
                    txt72.value = "";
                    txt73.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
            if(tgvalue[12]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //lng1 = Math.floor(Number(txt4.value));
                //lng2 = Math.floor((Number(txt4.value) * 60) % 60);
                //lng3 = Math.round((Number(txt4.value) * 3600) % 60);
                //txt81.value = lng1.toString();
                //txt82.value = lng2.toString();
                //txt83.value = lng3.toString();
                if (!setDMS(txt4, txt81, txt82, txt83, true)) {
                    txt4.value = "";
                    txt81.value = "";
                    txt82.value = "";
                    txt83.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
        }
        //UPDATE 2009.10.18 ST
        //if(tgvalue.length==10)
        if(tgvalue.length==11)
        //UPDATE 2009.10.18 ED
        {
            
            //テキスト座標変換
            if (tgvalue[5]=='-99999999')tgvalue[5]='';
            if (tgvalue[6]=='-99999999')tgvalue[6]='';
            if (tgvalue[7]=='-99999999')tgvalue[7]='';
            if (tgvalue[8]=='-99999999')tgvalue[8]='';
            txt1.value=tgvalue[5];
            txt2.value=tgvalue[6];
            txt3.value=tgvalue[7];
            txt4.value=tgvalue[8];
            if(tgvalue[5]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //var lat1 = Math.floor(Number(txt1.value));
                //var lat2 = Math.floor((Number(txt1.value) * 60) % 60);
                //var lat3 = Math.round((Number(txt1.value) * 3600) % 60);
                //txt51.value = lat1.toString();
                //txt52.value = lat2.toString();
                //txt53.value = lat3.toString();
                if (!setDMS(txt1, txt51, txt52, txt53, false)) {
                    txt51.value = "";
                    txt52.value = "";
                    txt53.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
            if(tgvalue[6]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //var lng1 = Math.floor(Number(txt2.value));
                //var lng2 = Math.floor((Number(txt2.value) * 60) % 60);
                //var lng3 = Math.round((Number(txt2.value) * 3600) % 60);
                //txt61.value = lng1.toString();
                //txt62.value = lng2.toString();
                //txt63.value = lng3.toString();
                if (!setDMS(txt2, txt61, txt62, txt63, true)) {
                    txt61.value = "";
                    txt62.value = "";
                    txt63.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
            
            if(tgvalue[7]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //lat1 = Math.floor(Number(txt3.value));
                //lat2 = Math.floor((Number(txt3.value) * 60) % 60);
                //lat3 = Math.round((Number(txt3.value) * 3600) % 60);
                //txt71.value = lat1.toString();
                //txt72.value = lat2.toString();
                //txt73.value = lat3.toString();
                if (!setDMS(txt3, txt71, txt72, txt73, false)) {
                    txt71.value = "";
                    txt72.value = "";
                    txt73.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
            if(tgvalue[8]!='')
            {
                //2010/11/24 Rev 処理を共通化
                //lng1 = Math.floor(Number(txt4.value));
                //lng2 = Math.floor((Number(txt4.value) * 60) % 60);
                //lng3 = Math.round((Number(txt4.value) * 3600) % 60);
                //txt81.value = lng1.toString();
                //txt82.value = lng2.toString();
                //txt83.value = lng3.toString();
                if (!setDMS(txt4, txt81, txt82, txt83, true)) {
                    txt81.value = "";
                    txt82.value = "";
                    txt83.value = "";
                }
                //2010/11/24 Rev End 処理を共通化
            }
        }
        if(tgvalue.length==11)
        {
            var val1 = tgvalue[10].split(',');
            if(val1[0] == "") return;
            var pnts = new Array();
            for(var i = 0; i < val1.length; i+=2) {
                pnts.push(new GLatLng(val1[i+1], val1[i]));
            }
            changeAreaPolygon(pnts);
        }
        
//        else
//        {
//            //テキスト座標変換
//            if (tgvalue[5]=='-99999999')tgvalue[5]='';
//            if (tgvalue[6]=='-99999999')tgvalue[6]='';
//            if (tgvalue[7]=='-99999999')tgvalue[7]='';
//            if (tgvalue[8]=='-99999999')tgvalue[8]='';
//            txt1.value=tgvalue[5];
//            txt2.value=tgvalue[6];
//            txt3.value=tgvalue[7];
//            txt4.value=tgvalue[8];
//        }
//        return;

    }
    if(tgvalue[0]=='cityon')
    {
//        if (cityPoly==null)
//        {
//            cityPoly = new Array();
//        }
//        if (cityIndex==null)
//        {
//            cityIndex = new Array();
//        }
//    
        var val1 = tgvalue[1].split(',');
        if(val1[0] == "") return;
        var pnts = new Array();
        for(var i = 0; i < val1.length; i+=2) {
            pnts.push(new GLatLng(val1[i+1], val1[i]));
        }
        changeAreaPolygon(pnts);

        //多角形
        var div2 = document.getElementById('ucTab11_TabContainer1_TabPanel2_ucTableView2_tbldiv');
        div2.innerHTML = tgvalue[9];
        var div3 = document.getElementById('ucTab11_TabContainer1_TabPanel2_ucTableView3_tbldiv');
        div3.innerHTML = tgvalue[10];
        //座標指定
        var div4 = document.getElementById('ucTab11_TabContainer1_TabPanel4_ucTableView4_tbldiv');
        div4.innerHTML = tgvalue[11];
        var div5 = document.getElementById('ucTab11_TabContainer1_TabPanel4_ucTableView5_tbldiv');
        div5.innerHTML = tgvalue[12];

        var centerat = new GLatLng(tgvalue[3], tgvalue[4]);  //Y,X
        var sw = new GLatLng(tgvalue[5],tgvalue[6]);
        var ne = new GLatLng(tgvalue[7],tgvalue[8]);
        var bounds = new GLatLngBounds(sw, ne);

        var zoomlebel = gmap.getBoundsZoomLevel(bounds);
        gmap.setCenter(centerat, zoomlebel);
        //_dynMapOv_gyosei.show();
        waitOperation(false);
    }
    if(tgvalue[0]=='cityoff')
    {
        if(tgvalue[1]=="")
        {
            removeAreaPolygon();
            HeaderMessage.innerHTML ="";
            _polygonArea = 0;
        }
        else
        {
            var val1 = tgvalue[1].split(',');
            if(val1[0] == "") return;
            var pnts = new Array();
            for(var i = 0; i < val1.length; i+=2) {
                pnts.push(new GLatLng(val1[i+1], val1[i]));
            }
            changeAreaPolygon(pnts);

            var centerat = new GLatLng(tgvalue[3], tgvalue[4]);  //Y,X
            var sw = new GLatLng(tgvalue[5],tgvalue[6]);
            var ne = new GLatLng(tgvalue[7],tgvalue[8]);
            var bounds = new GLatLngBounds(sw, ne);

            var zoomlebel = gmap.getBoundsZoomLevel(bounds);
            gmap.setCenter(centerat, zoomlebel);
       }

        //多角形
        var div2 = document.getElementById('ucTab11_TabContainer1_TabPanel2_ucTableView2_tbldiv');
        div2.innerHTML = tgvalue[9];
        var div3 = document.getElementById('ucTab11_TabContainer1_TabPanel2_ucTableView3_tbldiv');
        div3.innerHTML = tgvalue[10];
        //座標指定
        var div4 = document.getElementById('ucTab11_TabContainer1_TabPanel4_ucTableView4_tbldiv');
        div4.innerHTML = tgvalue[11];
        var div5 = document.getElementById('ucTab11_TabContainer1_TabPanel4_ucTableView5_tbldiv');
        div5.innerHTML = tgvalue[12];

        //_dynMapOv_gyosei.refresh();
        
        waitOperation(false);
    
//        if (cityPoly==null)
//        {
//            return;
//        }
//        for (var i = 0; i<cityPoly.length;i++)
//        {
//            if(cityIndex[i]==tgvalue[1])
//            {
//                gmap.removeOverlay(cityPoly[i]);
//                cityPoly.splice(i,1);
//                cityIndex.splice(i,1);
//                break;             
//            }
//        
//        }
//        waitOperation(false);
    }
    
    //2010.11.15
    if (tgvalue[0] == 'convertZahyoText') {

        var txt1 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data1");
        var txt2 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data2");
        txt1.value = tgvalue[1].toString();
        txt2.value = tgvalue[2].toString();

        var txt51 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_1");
        var txt52 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_2");
        var txt53 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data3_3");

        var txt61 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_1");
        var txt62 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_2");
        var txt63 = document.getElementById("ucTab11_TabContainer1_TabPanel4_txtZahyo2_Data4_3");

        txt51.value = tgvalue[3].toString();
        txt52.value = tgvalue[4].toString();
        txt53.value = tgvalue[5].toString();

        txt61.value = tgvalue[6].toString();
        txt62.value = tgvalue[7].toString();
        txt63.value = tgvalue[8].toString();    
    }

    return;
}
function citysel_click(TBL,value)
{
    var chk_nm = TBL + '_chk' + value;
    var index = Number(value.substring(2));

    var chk = document.getElementById(chk_nm);
    if (chk.src.indexOf('Check_OFF')==-1)
    {
        chk.src=chk.src.replace("Check_ON","Check_OFF");
        
        var argument = "Control=CITY_OFF";
        argument += "&ROW=" + index;
        eval(onAreaCallback);
        waitOperation(true);

    }
    else if (chk.src.indexOf('Check_ON')==-1)
    {
        chk.src=chk.src.replace("Check_OFF","Check_ON");
        var argument = "Control=CITY_ON";
        argument += "&ROW=" + index;
        eval(onAreaCallback);
        waitOperation(true);
    }

    return false;
}

function key_press_tab1(value){ 
    if(event.keyCode == 13){ 
        onClickTab1(value); 
    } 
    return false;
}

