entf =
[
[ 0  ,154,177,168,243,122,115, 60, 89,177,175,112,209,158,260,336,222,103, 56,243,190, 34,253, 82,220, 72, 45,121,156,306,121, 85,112,280,218,236,198,220,195,206,149,276 ],
[ 0  ,  0,272,163,196,270,261,206, 66,272,322, 58,364,304,277,195,168,249,138,377,337,121,111,113,367,218,170,216,101,304, 74,240, 82,138,373,355,106,166, 53,296, 39,401 ],
[ 0  ,  0,  0, 32,167,229,237,230,206, 24,256,230,134,273,128,454,170,206,134,134,241,175,370,159,211,242,222, 56,233,123,262,129,230,398,175,112,277,167,312, 53,290,158 ],
[ 0  ,  0,  0,  0,183,198,205,197,197,  8,240,222,117,253,141,445,188,171,124,118,224,168,361,150,195,212,213, 47,250,138,253, 98,221,388,159, 96,292,186,309, 37,281,142 ],
[ 0  ,  0,  0,  0,  0,367,358,303,163,175,380,142,261,397, 80,378, 34,346,187,260,366,217,295,212,336,315,286,224, 95,106,270,296,162,322,301,238,138, 31,237,179,228,284 ],
[ 0  ,  0,  0,  0,  0,  0,  9, 64,212,204, 52,236,174, 35,325,460,346, 21,180,219, 66,157,376,206,096, 52, 99,244,280,321,195,100,236,406,131,200,322,344,318,219,247,241 ],
[ 0  ,  0,  0,  0,  0,  0,  0, 55,203,212, 61,226,183, 44,333,451,337, 12,171,228, 75,148,367,197,105, 43, 90,235,271,329,186,108,227,395,140,209,312,335,309,210,238,250 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,148,205,116,172,238, 99,320,396,282, 43,116,283,130, 93,312,142,160, 12, 35,180,216,322,131,101,169,340,195,264,257,280,254,222,183,305 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,206,264, 25,298,247,248,248,133,191, 72,318,176, 55,164, 47,309,160,129,150, 68,270,140,174, 24,192,307,296,109,132,106,237, 86,342 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,232,230,109,245,133,452,180,179,133,110,216,175,370,159,187,220,222, 56,242,129,262,106,230,397,151, 88,284,178,312, 29,288,134 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,289,122, 17,307,512,383, 72,232,167, 13,209,428,257, 45,104,151,290,332,303,248,150,288,455, 80,148,373,381,370,203,299,189 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,323,272,223,222,115,215, 97,345,301, 79,157, 72,331,183, 63,174, 43,250,132,198, 24,182,332,322, 85,112,100,264, 90,365 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,140,184,546,262,193,245, 45,108,243,462,270, 77,226,273,167,323,180,330,124,322,489, 43, 27,367,259,404, 80,358, 67 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,320,494,381, 56,215,184, 31,191,410,241, 61, 87,133,278,315,316,230,133,271,438, 96,165,356,379,353,216,282,207 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,459,114,302,204,185,291,246,375,220,262,332,355,184,175, 74,333,225,242,402,226,164,219,111,317,104,308,209 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,348,439,320,565,524,303,218,295,557,409,375,398,283,486,269,422,262,246,555,543,237,348,142,484,234,589 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,325,196,262,370,190,266,182,339,294,262,227, 65,142,242,298,132,291,304,241,108,  6,210,182,199,287 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,159,240, 87,136,355,185,117, 31, 78,192,259,298,174, 77,215,383,152,221,300,322,298,198,226,262 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,245,246, 42,237, 26,276,128, 99, 77,140,264,129,142, 92,264,275,223,182,203,179,164,157,269 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,153,288,483,273,123,271,318,168,324,181,376,169,342,511, 86, 19,367,260,425, 81,399, 65 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,222,442,269, 30,118,164,278,246,287,261,164,302,470, 65,134,385,367,382,187,313,175 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,219, 68,254,105, 74,119,122,306, 87,119, 79,246,253,270,164,187,161,206,115,311 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,211,473,324,281,314,200,401,185,338,185, 27,471,461,174,264, 77,402,150,507 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,303,154,127,103,114,292,154,167, 71,238,314,251,156,179,153,192,133,297 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,148,195,245,377,258,293,169,331,501, 35,104,418,336,414,158,343,145 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 47,192,228,334,143,106,181,352,183,252,269,292,266,234,195,293 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,166,196,357, 96,136,153,308,230,299,237,261,235,257,148,340 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,217,187,206,148,174,341,210,146,259,224,256, 87,234,192 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,202,175,241, 67,227,365,302,129, 64,142,243,134,348 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,377,221,268,430,222,159,246,138,344,100,355,205 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,206,156,212,326,354,180,240,127,295, 51,400 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,198,365,133,151,283,296,280,121,234,191 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,206,331,314,109,131,124,255,100,358 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,496,489,201,291,105,430,177,535 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 69,408,301,412,122,369,110 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,345,238,403, 59,380, 43 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,108, 97,286,146,391 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,206,179,197,284 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,344, 86,449 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,321,105 ],
[ 0  ,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,426 ],
]

entf_nam = ['Ambepussa','Anuradapura','Badulla','Bandarawela','Batticoloa','Bentota','Beruwela','Colombo','Dambulla','Ella','Galle','Habarana','Hambantota','Hikkaduwa','Inginiyagala','Jaffna','Kalkudah','Kalutara','Kandy','Kataragama','Koggala','Kurunegala','Mannar','Matale','Matara','Mt. Lavinia','Negombo','Nuwara Eliya','Polonnaruwa','Pottuvil','Puttalam','Ratnapura','Sigiriya','Talaimannar','Tangalla','Tissamaharama','Trincomalee','Valaichchenai','Vavuniya','Wellawaya','Wilpattu','Yala']

function FillCombos() {
 var von_elem = document.forms['main'].von;
 von_elem.options.length=0;
 var nach_elem = document.forms['main'].nach;
 nach_elem.options.length=0;
 
 for (i = 0; i < entf_nam.length; i++) {
  var no = new Option();
  no.value = entf_nam[i];
  no.text = entf_nam[i];
  von_elem.options[von_elem.options.length] = no;
  var no = new Option();
  no.value = entf_nam[i];
  no.text = entf_nam[i];
  nach_elem.options[nach_elem.options.length] = no;
 }
 von_elem.selectedIndex = 0;
 nach_elem.selectedIndex = 0;
 
}

function Calc() {
	if(document.forms['main'].von.selectedIndex > document.forms['main'].nach.selectedIndex) {
		val = entf[document.forms['main'].nach.selectedIndex][document.forms['main'].von.selectedIndex];
	} else {
		val = entf[document.forms['main'].von.selectedIndex][document.forms['main'].nach.selectedIndex];
	}
	document.forms['main'].res.value = + val  + ' km'
}

