maerker = new Array('All counties')
maerker2 = new Array('All counties')
maerker3 = new Array('All counties')

for (i = 0; i < maerker.length; i++) maerker[i] = new Array();
maerker[0][0] = 'All towns'

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (';', offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + '=';
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(' ', i) + 1;
if (i == 0) break;
}
return null;
}
function LoadDropDown() {
for(i=0;i<maerker2.length;i++){
document.PlaceForm.County.options[i] = new Option (maerker2[i],maerker3[i]);
if (GetCookie('SaveCounty9') != null) {
if (maerker3[i].replace(/ /g, '+') == GetCookie('SaveCounty9')) {
document.PlaceForm.County.options[i].selected = true;
}
}
}
if (GetCookie('SaveCounty9') != null) {
skift(document.PlaceForm);
}
}
function skift(frm) {
ind = frm.County.selectedIndex;
frm.Town.length = maerker[ind].length;
for (n = 0; n < maerker[ind].length; n++) {
frm.Town.options[n].text = maerker[ind][n];
frm.Town.options[n].value = maerker[ind][n];
//frm.Town.selectedIndex = 0;
if (GetCookie('SaveTown9') != null) {
if (maerker[ind][n].replace(/ /g, '+') == GetCookie('SaveTown9')) {
frm.Town.options[n].selected = true;
}
}
}
}
