function createWindow(what) {
    var URL = what.value;
    window.open (URL, "PopWin", "resizable=1,height=500,width=566,scrollbars=1, top=0, left=0");
	
}


var whatForm, whatTo, whatText;

function load() {

    whatFrom = document.formName.selectName1;
    whatTo = document.formName.selectName2;
	whatText = whatFrom.options[whatFrom.selectedIndex].value + 'and' + whatTo.options[whatTo.selectedIndex].value;


    if (whatText == '1and1') {
        document.formName.dist.value=0
    }
    if (whatText == '1and2' || whatText == '2and1') {
        document.formName.dist.value=178
    }
    if (whatText == '1and3' || whatText == '3and1') {
        document.formName.dist.value=77
    }
    if (whatText == '1and4' || whatText == '4and1') {
        document.formName.dist.value=73
    }
    if (whatText == '1and5' || whatText == '5and1') {
        document.formName.dist.value=137
    }
    if (whatText == '1and6' || whatText == '6and1') {
        document.formName.dist.value=111
    }
    if (whatText == '1and7' || whatText == '7and1') {
        document.formName.dist.value=222
    }
    if (whatText == '1and8' || whatText == '8and1') {
        document.formName.dist.value=121
    }
    if (whatText == '1and9' || whatText == '9and1') {
        document.formName.dist.value=110
    }
    if (whatText == '1and10' || whatText == '10and1') {
        document.formName.dist.value=158
    }
    if (whatText == '1and11' || whatText == '11and1') {
        document.formName.dist.value=171
    }
    if (whatText == '1and12' || whatText == '12and1') {
        document.formName.dist.value=125
    }
    if (whatText == '1and13' || whatText == '13and1') {
        document.formName.dist.value=133
    }
    if (whatText == '1and14' || whatText == '14and1') {
        document.formName.dist.value=171
    }
    if (whatText == '1and15' || whatText == '15and1') {
        document.formName.dist.value=90
    }
    if (whatText == '1and16' || whatText == '16and1') {
        document.formName.dist.value=120
    }
    if (whatText == '1and17' || whatText == '17and1') {
        document.formName.dist.value=45
    }
    if (whatText == '1and18' || whatText == '18and1') {
        document.formName.dist.value=123
    }
    if (whatText == '1and19' || whatText == '19and1') {
        document.formName.dist.value=67
    }
    if (whatText == '1and20' || whatText == '20and1') {
        document.formName.dist.value=123
    }
    if (whatText == '1and21' || whatText == '21and1') {
        document.formName.dist.value=183
    }
    if (whatText == '1and22' || whatText == '22and1') {
        document.formName.dist.value=40
    }

    if (whatText == '2and2') {
        document.formName.dist.value=0
    }
    if (whatText == '2and3' || whatText == '3and2') {
        document.formName.dist.value=165
    }
    if (whatText == '2and4' || whatText == '4and2') {
        document.formName.dist.value=180
    }
    if (whatText == '2and5' || whatText == '5and2') {
        document.formName.dist.value=76
    }
    if (whatText == '2and6' || whatText == '6and2') {
        document.formName.dist.value=130
    }
    if (whatText == '2and7' || whatText == '7and2') {
        document.formName.dist.value=399
    }
    if (whatText == '2and8' || whatText == '8and2') {
        document.formName.dist.value=173
    }
    if (whatText == '2and9' || whatText == '9and2') {
        document.formName.dist.value=103
    }
    if (whatText == '2and10' || whatText == '10and2') {
        document.formName.dist.value=20
    }
    if (whatText == '2and11' || whatText == '11and2') {
        document.formName.dist.value=248
    }
    if (whatText == '2and12' || whatText == '12and2') {
        document.formName.dist.value=124
    }
    if (whatText == '2and13' || whatText == '13and2') {
        document.formName.dist.value=51
    }
    if (whatText == '2and14' || whatText == '14and2') {
        document.formName.dist.value=59
    }
    if (whatText == '2and15' || whatText == '15and2') {
        document.formName.dist.value=126
    }
    if (whatText == '2and16' || whatText == '16and2') {
        document.formName.dist.value=216
    }
    if (whatText == '2and17' || whatText == '17and2') {
        document.formName.dist.value=133
    }
    if (whatText == '2and18' || whatText == '18and2') {
        document.formName.dist.value=142
    }
    if (whatText == '2and19' || whatText == '19and2') {
        document.formName.dist.value=237
    }
    if (whatText == '2and20' || whatText == '20and2') {
        document.formName.dist.value=203
    }
    if (whatText == '2and21' || whatText == '21and2') {
        document.formName.dist.value=137
    }
    if (whatText == '2and22' || whatText == '22and2') {
        document.formName.dist.value=218
    }


    if (whatText == '3and3') {
        document.formName.dist.value=0
    }
    if (whatText == '3and4' || whatText == '4and3') {
        document.formName.dist.value=79
    }
    if (whatText == '3and5' || whatText == '5and3') {
        document.formName.dist.value=124
    }
    if (whatText == '3and6' || whatText == '6and3') {
        document.formName.dist.value=98
    }
    if (whatText == '3and7' || whatText == '7and3') {
        document.formName.dist.value=250
    }
    if (whatText == '3and8' || whatText == '8and3') {
        document.formName.dist.value=150
    }
    if (whatText == '3and9' || whatText == '9and3') {
        document.formName.dist.value=97
    }
    if (whatText == '3and10' || whatText == '10and3') {
        document.formName.dist.value=145
    }
    if (whatText == '3and11' || whatText == '11and3') {
        document.formName.dist.value=199
    }
    if (whatText == '3and12' || whatText == '12and3') {
        document.formName.dist.value=131
    }
    if (whatText == '3and13' || whatText == '13and3') {
        document.formName.dist.value=120
    }
    if (whatText == '3and14' || whatText == '14and3') {
        document.formName.dist.value=158
    }
    if (whatText == '3and15' || whatText == '15and3') {
        document.formName.dist.value=77
    }
    if (whatText == '3and16' || whatText == '16and3') {
        document.formName.dist.value=51
    }
    if (whatText == '3and17' || whatText == '17and3') {
        document.formName.dist.value=32
    }
    if (whatText == '3and18' || whatText == '18and3') {
        document.formName.dist.value=129
    }
    if (whatText == '3and19' || whatText == '19and3') {
        document.formName.dist.value=136
    }
    if (whatText == '3and20' || whatText == '20and3') {
        document.formName.dist.value=151
    }
    if (whatText == '3and21' || whatText == '21and3') {
        document.formName.dist.value=170
    }
    if (whatText == '3and22' || whatText == '22and3') {
        document.formName.dist.value=86
    }

    if (whatText == '4and4') {
        document.formName.dist.value=0
    }
    if (whatText == '4and5' || whatText == '5and4') {
        document.formName.dist.value=100
    }
    if (whatText == '4and6' || whatText == '6and4') {
        document.formName.dist.value=113
    }
    if (whatText == '4and7' || whatText == '7and4') {
        document.formName.dist.value=171
    }
    if (whatText == '4and8' || whatText == '8and4') {
        document.formName.dist.value=71
    }
    if (whatText == '4and9' || whatText == '9and4') {
        document.formName.dist.value=88
    }
    if (whatText == '4and10' || whatText == '10and4') {
        document.formName.dist.value=156
    }
    if (whatText == '4and11' || whatText == '11and4') {
        document.formName.dist.value=120
    }
    if (whatText == '4and12' || whatText == '12and4') {
        document.formName.dist.value=52
    }
    if (whatText == '4and13' || whatText == '13and4') {
        document.formName.dist.value=135
    }
    if (whatText == '4and14' || whatText == '14and4') {
        document.formName.dist.value=173
    }
    if (whatText == '4and15' || whatText == '15and4') {
        document.formName.dist.value=92
    }
    if (whatText == '4and16' || whatText == '16and4') {
        document.formName.dist.value=130
    }
    if (whatText == '4and17' || whatText == '17and4') {
        document.formName.dist.value=47
    }
    if (whatText == '4and18' || whatText == '18and4') {
        document.formName.dist.value=50
    }
    if (whatText == '4and19' || whatText == '19and4') {
        document.formName.dist.value=57
    }
    if (whatText == '4and20' || whatText == '20and4') {
        document.formName.dist.value=72
    }
    if (whatText == '4and21' || whatText == '21and4') {
        document.formName.dist.value=185
    }
    if (whatText == '4and22' || whatText == '22and4') {
        document.formName.dist.value=113
    }

    if (whatText == '5and5') {
        document.formName.dist.value=0
    }
    if (whatText == '5and6' || whatText == '6and5') {
        document.formName.dist.value=136
    }
    if (whatText == '5and7' || whatText == '7and5') {
        document.formName.dist.value=223
    }
    if (whatText == '5and8' || whatText == '8and5') {
        document.formName.dist.value=97
    }
    if (whatText == '5and9' || whatText == '9and5') {
        document.formName.dist.value=27
    }
    if (whatText == '5and10' || whatText == '10and5') {
        document.formName.dist.value=56
    }
    if (whatText == '5and11' || whatText == '11and5') {
        document.formName.dist.value=172
    }
    if (whatText == '5and12' || whatText == '12and5') {
        document.formName.dist.value=48
    }
    if (whatText == '5and13' || whatText == '13and5') {
        document.formName.dist.value=48
    }
    if (whatText == '5and14' || whatText == '14and5') {
        document.formName.dist.value=80
    }
    if (whatText == '5and15' || whatText == '15and5') {
        document.formName.dist.value=115
    }
    if (whatText == '5and16' || whatText == '16and5') {
        document.formName.dist.value=175
    }
    if (whatText == '5and17' || whatText == '17and5') {
        document.formName.dist.value=92
    }
    if (whatText == '5and18' || whatText == '18and5') {
        document.formName.dist.value=66
    }
    if (whatText == '5and19' || whatText == '19and5') {
        document.formName.dist.value=157
    }
    if (whatText == '5and20' || whatText == '20and5') {
        document.formName.dist.value=127
    }
    if (whatText == '5and21' || whatText == '21and5') {
        document.formName.dist.value=158
    }
    if (whatText == '5and22' || whatText == '22and5') {
        document.formName.dist.value=177
    }

    if (whatText == '6and6') {
        document.formName.dist.value=0
    }
    if (whatText == '6and7' || whatText == '7and6') {
        document.formName.dist.value=284
    }
    if (whatText == '6and8' || whatText == '8and6') {
        document.formName.dist.value=184
    }
    if (whatText == '6and9' || whatText == '9and6') {
        document.formName.dist.value=109
    }
    if (whatText == '6and10' || whatText == '10and6') {
        document.formName.dist.value=110
    }
    if (whatText == '6and11' || whatText == '11and6') {
        document.formName.dist.value=233
    }
    if (whatText == '6and12' || whatText == '12and6') {
        document.formName.dist.value=165
    }
    if (whatText == '6and13' || whatText == '13and6') {
        document.formName.dist.value=85
    }
    if (whatText == '6and14' || whatText == '14and6') {
        document.formName.dist.value=71
    }
    if (whatText == '6and15' || whatText == '15and6') {
        document.formName.dist.value=21
    }
    if (whatText == '6and16' || whatText == '16and6') {
        document.formName.dist.value=95
    }
    if (whatText == '6and17' || whatText == '17and6') {
        document.formName.dist.value=66
    }
    if (whatText == '6and18' || whatText == '18and6') {
        document.formName.dist.value=163
    }
    if (whatText == '6and19' || whatText == '19and6') {
        document.formName.dist.value=170
    }
    if (whatText == '6and20' || whatText == '20and6') {
        document.formName.dist.value=185
    }
    if (whatText == '6and21' || whatText == '21and6') {
        document.formName.dist.value=72
    }
    if (whatText == '6and22' || whatText == '22and6') {
        document.formName.dist.value=151
    }

    if (whatText == '7and7') {
        document.formName.dist.value=0
    }
    if (whatText == '7and8' || whatText == '8and7') {
        document.formName.dist.value=130
    }
    if (whatText == '7and9' || whatText == '9and7') {
        document.formName.dist.value=215
    }
    if (whatText == '7and10' || whatText == '10and7') {
        document.formName.dist.value=279
    }
    if (whatText == '7and11' || whatText == '11and7') {
        document.formName.dist.value=59
    }
    if (whatText == '7and12' || whatText == '12and7') {
        document.formName.dist.value=179
    }
    if (whatText == '7and13' || whatText == '13and7') {
        document.formName.dist.value=259
    }
    if (whatText == '7and14' || whatText == '14and7') {
        document.formName.dist.value=306
    }
    if (whatText == '7and15' || whatText == '15and7') {
        document.formName.dist.value=263
    }
    if (whatText == '7and16' || whatText == '16and7') {
        document.formName.dist.value=301
    }
    if (whatText == '7and17' || whatText == '17and7') {
        document.formName.dist.value=218
    }
    if (whatText == '7and18' || whatText == '18and7') {
        document.formName.dist.value=157
    }
    if (whatText == '7and19' || whatText == '19and7') {
        document.formName.dist.value=155
    }
    if (whatText == '7and20' || whatText == '20and7') {
        document.formName.dist.value=99
    }
    if (whatText == '7and21' || whatText == '21and7') {
        document.formName.dist.value=356
    }
    if (whatText == '7and22' || whatText == '22and7') {
        document.formName.dist.value=262
    }

    if (whatText == '8and8') {
        document.formName.dist.value=0
    }
    if (whatText == '8and9' || whatText == '9and8') {
        document.formName.dist.value=89
    }
    if (whatText == '8and10' || whatText == '10and8') {
        document.formName.dist.value=153
    }
    if (whatText == '8and11' || whatText == '11and8') {
        document.formName.dist.value=79
    }
    if (whatText == '8and12' || whatText == '12and8') {
        document.formName.dist.value=53
    }
    if (whatText == '8and13' || whatText == '13and8') {
        document.formName.dist.value=133
    }
    if (whatText == '8and14' || whatText == '14and8') {
        document.formName.dist.value=177
    }
    if (whatText == '8and15' || whatText == '15and8') {
        document.formName.dist.value=163
    }
    if (whatText == '8and16' || whatText == '16and8') {
        document.formName.dist.value=201
    }
    if (whatText == '8and17' || whatText == '17and8') {
        document.formName.dist.value=118
    }
    if (whatText == '8and18' || whatText == '18and8') {
        document.formName.dist.value=31
    }
    if (whatText == '8and19' || whatText == '19and8') {
        document.formName.dist.value=54
    }
    if (whatText == '8and20' || whatText == '20and8') {
        document.formName.dist.value=34
    }
    if (whatText == '8and21' || whatText == '21and8') {
        document.formName.dist.value=256
    }
    if (whatText == '8and22' || whatText == '22and8') {
        document.formName.dist.value=161
    }

    if (whatText == '9and9') {
        document.formName.dist.value=0
    }
    if (whatText == '9and10' || whatText == '10and9') {
        document.formName.dist.value=83
    }
    if (whatText == '9and11' || whatText == '11and9') {
        document.formName.dist.value=164
    }
    if (whatText == '9and12' || whatText == '12and9') {
        document.formName.dist.value=36
    }
    if (whatText == '9and13' || whatText == '13and9') {
        document.formName.dist.value=44
    }
    if (whatText == '9and14' || whatText == '14and9') {
        document.formName.dist.value=88
    }
    if (whatText == '9and15' || whatText == '15and9') {
        document.formName.dist.value=88
    }
    if (whatText == '9and16' || whatText == '16and9') {
        document.formName.dist.value=148
    }
    if (whatText == '9and17' || whatText == '17and9') {
        document.formName.dist.value=65
    }
    if (whatText == '9and18' || whatText == '18and9') {
        document.formName.dist.value=58
    }
    if (whatText == '9and19' || whatText == '19and9') {
        document.formName.dist.value=145
    }
    if (whatText == '9and20' || whatText == '20and9') {
        document.formName.dist.value=119
    }
    if (whatText == '9and21' || whatText == '21and9') {
        document.formName.dist.value=181
    }
    if (whatText == '9and22' || whatText == '22and9') {
        document.formName.dist.value=150
    }

    if (whatText == '10and10') {
        document.formName.dist.value=0
    }
    if (whatText == '10and11' || whatText == '11and10') {
        document.formName.dist.value=228
    }
    if (whatText == '10and12' || whatText == '12and10') {
        document.formName.dist.value=104
    }
    if (whatText == '10and13' || whatText == '13and10') {
        document.formName.dist.value=31
    }
    if (whatText == '10and14' || whatText == '14and10') {
        document.formName.dist.value=39
    }
    if (whatText == '10and15' || whatText == '15and10') {
        document.formName.dist.value=106
    }
    if (whatText == '10and16' || whatText == '16and10') {
        document.formName.dist.value=196
    }
    if (whatText == '10and17' || whatText == '17and10') {
        document.formName.dist.value=113
    }
    if (whatText == '10and18' || whatText == '18and10') {
        document.formName.dist.value=122
    }
    if (whatText == '10and19' || whatText == '19and10') {
        document.formName.dist.value=217
    }
    if (whatText == '10and20' || whatText == '20and10') {
        document.formName.dist.value=183
    }
    if (whatText == '10and21' || whatText == '21and10') {
        document.formName.dist.value=117
    }
    if (whatText == '10and22' || whatText == '22and10') {
        document.formName.dist.value=198
    }

    if (whatText == '11and11') {
        document.formName.dist.value=0
    }
    if (whatText == '11and12' || whatText == '12and11') {
        document.formName.dist.value=128
    }
    if (whatText == '11and13' || whatText == '13and11') {
        document.formName.dist.value=208
    }
    if (whatText == '11and14' || whatText == '14and11') {
        document.formName.dist.value=252
    }
    if (whatText == '11and15' || whatText == '15and11') {
        document.formName.dist.value=212
    }
    if (whatText == '11and16' || whatText == '16and11') {
        document.formName.dist.value=250
    }
    if (whatText == '11and17' || whatText == '17and11') {
        document.formName.dist.value=167
    }
    if (whatText == '11and18' || whatText == '18and11') {
        document.formName.dist.value=106
    }
    if (whatText == '11and19' || whatText == '19and11') {
        document.formName.dist.value=104
    }
    if (whatText == '11and20' || whatText == '20and11') {
        document.formName.dist.value=48
    }
    if (whatText == '11and21' || whatText == '21and11') {
        document.formName.dist.value=305
    }
    if (whatText == '11and22' || whatText == '22and11') {
        document.formName.dist.value=211
    }

    if (whatText == '12and12') {
        document.formName.dist.value=0
    }
    if (whatText == '12and13' || whatText == '13and12') {
        document.formName.dist.value=80
    }
    if (whatText == '12and14' || whatText == '14and12') {
        document.formName.dist.value=128
    }
    if (whatText == '12and15' || whatText == '15and12') {
        document.formName.dist.value=144
    }
    if (whatText == '12and16' || whatText == '16and12') {
        document.formName.dist.value=182
    }
    if (whatText == '12and17' || whatText == '17and12') {
        document.formName.dist.value=99
    }
    if (whatText == '12and18' || whatText == '18and12') {
        document.formName.dist.value=22
    }
    if (whatText == '12and19' || whatText == '19and12') {
        document.formName.dist.value=109
    }
    if (whatText == '12and20' || whatText == '20and12') {
        document.formName.dist.value=83
    }
    if (whatText == '12and21' || whatText == '21and12') {
        document.formName.dist.value=26
    }
    if (whatText == '12and22' || whatText == '22and12') {
        document.formName.dist.value=165
    }

    if (whatText == '13and13') {
        document.formName.dist.value=0
    }
    if (whatText == '13and14' || whatText == '14and13') {
        document.formName.dist.value=44
    }
    if (whatText == '13and15' || whatText == '15and13') {
        document.formName.dist.value=81
    }
    if (whatText == '13and16' || whatText == '16and13') {
        document.formName.dist.value=171
    }
    if (whatText == '13and17' || whatText == '17and13') {
        document.formName.dist.value=88
    }
    if (whatText == '13and18' || whatText == '18and13') {
        document.formName.dist.value=102
    }
    if (whatText == '13and19' || whatText == '19and13') {
        document.formName.dist.value=192
    }
    if (whatText == '13and20' || whatText == '20and13') {
        document.formName.dist.value=163
    }
    if (whatText == '13and21' || whatText == '21and13') {
        document.formName.dist.value=122
    }
    if (whatText == '13and22' || whatText == '22and13') {
        document.formName.dist.value=173
    }

    if (whatText == '14and14') {
        document.formName.dist.value=0
    }
    if (whatText == '14and15' || whatText == '15and14') {
        document.formName.dist.value=86
    }
    if (whatText == '14and16' || whatText == '16and14') {
        document.formName.dist.value=166
    }
    if (whatText == '14and17' || whatText == '17and14') {
        document.formName.dist.value=126
    }
    if (whatText == '14and18' || whatText == '18and14') {
        document.formName.dist.value=146
    }
    if (whatText == '14and19' || whatText == '19and14') {
        document.formName.dist.value=230
    }
    if (whatText == '14and20' || whatText == '20and14') {
        document.formName.dist.value=207
    }
    if (whatText == '14and21' || whatText == '21and14') {
        document.formName.dist.value=78
    }
    if (whatText == '14and22' || whatText == '22and14') {
        document.formName.dist.value=211
    }

    if (whatText == '15and15') {
        document.formName.dist.value=0
    }
    if (whatText == '15and16' || whatText == '16and15') {
        document.formName.dist.value=74
    }
    if (whatText == '15and17' || whatText == '17and15') {
        document.formName.dist.value=45
    }
    if (whatText == '15and18' || whatText == '18and15') {
        document.formName.dist.value=142
    }
    if (whatText == '15and19' || whatText == '19and15') {
        document.formName.dist.value=149
    }
    if (whatText == '15and20' || whatText == '20and15') {
        document.formName.dist.value=164
    }
    if (whatText == '15and21' || whatText == '21and15') {
        document.formName.dist.value=93
    }
    if (whatText == '15and22' || whatText == '22and15') {
        document.formName.dist.value=130
    }

    if (whatText == '16and16') {
        document.formName.dist.value=0
    }
    if (whatText == '16and17' || whatText == '17and16') {
        document.formName.dist.value=83
    }
    if (whatText == '16and18' || whatText == '18and16') {
        document.formName.dist.value=180
    }
    if (whatText == '16and19' || whatText == '19and16') {
        document.formName.dist.value=187
    }
    if (whatText == '16and20' || whatText == '20and16') {
        document.formName.dist.value=202
    }
    if (whatText == '16and21' || whatText == '21and16') {
        document.formName.dist.value=167
    }
    if (whatText == '16and22' || whatText == '22and16') {
        document.formName.dist.value=80
    }

    if (whatText == '17and17') {
        document.formName.dist.value=0
    }
    if (whatText == '17and18' || whatText == '18and17') {
        document.formName.dist.value=97
    }
    if (whatText == '17and19' || whatText == '19and17') {
        document.formName.dist.value=104
    }
    if (whatText == '17and20' || whatText == '20and17') {
        document.formName.dist.value=119
    }
    if (whatText == '17and21' || whatText == '21and17') {
        document.formName.dist.value=138
    }
    if (whatText == '17and22' || whatText == '22and17') {
        document.formName.dist.value=85
    }

    if (whatText == '18and18') {
        document.formName.dist.value=0
    }
    if (whatText == '18and19' || whatText == '19and18') {
        document.formName.dist.value=63
    }
    if (whatText == '18and20' || whatText == '20and18') {
        document.formName.dist.value=61
    }
    if (whatText == '18and21' || whatText == '21and18') {
        document.formName.dist.value=224
    }
    if (whatText == '18and22' || whatText == '22and18') {
        document.formName.dist.value=163
    }

    if (whatText == '19and19') {
        document.formName.dist.value=0
    }
    if (whatText == '19and20' || whatText == '20and19') {
        document.formName.dist.value=56
    }
    if (whatText == '19and21' || whatText == '21and19') {
        document.formName.dist.value=242
    }
    if (whatText == '19and22' || whatText == '22and19') {
        document.formName.dist.value=107
    }

    if (whatText == '20and20') {
        document.formName.dist.value=0
    }
    if (whatText == '20and21' || whatText == '21and20') {
        document.formName.dist.value=257
    }
    if (whatText == '20and22' || whatText == '22and21') {
        document.formName.dist.value=163
    }

    if (whatText == '21and21') {
        document.formName.dist.value=0
    }
    if (whatText == '21and22' || whatText == '22and21') {
        document.formName.dist.value=223
    }

    if (whatText == '22and22') {
        document.formName.dist.value=0
    }

return false;    
}