// JavaScript Document
function mydataloader(){
        <!-- AndyW. This function strips the data from the alldata.txt textfile and parses it to the variables -->
        process_it = function(doc) {
        lines = doc.split("\n");
        for (var i=0; i<lines.length; i++) {
          if (lines[i].length > 1) {
            var v_panorama = 0;
            parts = lines[i].split("|");
            var v_id           = parts[0];
            var checkicon      = parts[1];
            var label          = parts[2];
            var smallImage     = parts[3];
            var lat            = parseFloat(parts[4]);
            var lng            = parseFloat(parts[5]);
            var html1          = parts[6];
            var html2          = parts[7];
            var v_location     = parts[8];
            var v_area         = parts[9];
            var v_telephone    = parts[10];
            var v_mobile       = parts[11];
            var v_fax          = parts[12];
            var v_weblink      = parts[13];
            var v_email        = parts[14];
            var v_wifi         = parts[15];
            var v_picture2     = parts[16];
            var v_maplink      = parts[17];
            var v_extra1       = parts[18];
            var v_ATM          = parts[19];
            var v_panorama     = parts[20];
            var v_panoramaLink = parts[21];
            
        <!-- AndyW. this is where we check the different types of markers and add to the combo boxes -->
        var v_BubbleHeaderStyle = '<div style="font: 12px Tahoma ;color:black;text-decoration: underline">';
        var v_BubbleInfoStyle   = '</div><br><div style="font: 12px Tahoma ;color:#006666; text-decoration: none">';
        var v_BubbleInfoBig     = v_BubbleHeaderStyle+checkicon + v_BubbleInfoStyle + label + '</div>';
        var v_BubbleInfoSmall   = v_BubbleInfoStyle + label + '</div>';
        icontype = icdefault;
switch (checkicon) {
    case 'Excursion' :
        icontype = icexcursion;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'PropertyForRent' : 
        icontype = icrentalprop;
        rentalselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++rentallist;
        rentallistloc[rentallist] = i;
        category = 'cbrentals';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersRentals.push(marker);
        break;
    case 'Airport' : 
        icontype = icplane;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'InfoPoints' :
        icontype = icinfo;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'PhotoSpots' :
        icontype = iccamera;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Shopping' :
        icontype = icshop;
        shopselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++shoplist;
        shoplistloc[shoplist] = i;
        category = 'cbshops';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersShops.push(marker);
        break;
    case 'Supermarkets' :
        icontype = icsuper;
        shopselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++shoplist;
        shoplistloc[shoplist] = i;
        category = 'cbshops';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersShops.push(marker);
        break;
    case 'Mosques' :
        icontype = icmosque;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Police' :
        icontype = icpolice;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Banks' :
        icontype = icbank;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
     case 'Oriental' :
        icontype = icoriental;
        barandrestselect_html += '<option> ' + '(R) '+label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersRestaurants.push(marker);
        break;
     case 'Restaurants' :
        icontype = icrestaurant;
        if (label == 'KFC') {
            icontype = ickfc;
        }
        if (label == 'McDonalds') {
            icontype = icmcdonalds;
        }
        barandrestselect_html += '<option> ' + '(R) '+label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersRestaurants.push(marker);
        break;
     case 'Post Offices' :
        icontype = icpost;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
     case 'Hotels':
        icontype = ichotel;
        hotelselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++hotellist
        hotellistloc[hotellist] = i
        category = 'cbhotels';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersHotels.push(marker);
        break;
     case 'Coffeeshops' :
        icontype = iccafe;
        barandrestselect_html += '<option> ' + '(C) '+ label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersRestaurants.push(marker);
        break;
     case 'Hospitals' :
        icontype = ichospital;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Pharmacies' :
        icontype = icpharmacy;
        shopselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++shoplist;
        shoplistloc[shoplist] = i;
        category = 'cbshops';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersShops.push(marker);
        break;
    case 'Divecenters' :
        icontype = icdiver;
        divingselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++divinglist;
        divinglistloc[divinglist] = i;
        category = 'cbdivecenters';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersDivecenters.push(marker);
        break;
    case 'KiteSurfing' :
        icontype = ickites;
        divingselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++divinglist;
        divinglistloc[divinglist] = i;
        category = 'cbdivecenters';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersDivecenters.push(marker);
        break;    
    case 'WindSurfing' :
        icontype = icsurf;
        divingselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++divinglist;
        divinglistloc[divinglist] = i;
        category = 'cbdivecenters';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersDivecenters.push(marker);
        break;    
    case 'Bars' :
        icontype = icbarpub;
        barandrestselect_html += '<option> ' + '(B) '+ label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersRestaurants.push(marker);
        break;
    case 'Dancing' :
        icontype = icdiscothek;
        barandrestselect_html += '<option> ' + '(D) ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersRestaurants.push(marker);
        break;
    case 'Schools' :
        icontype = icschool;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Vodafone Shops' :
        icontype = icvodafone;
        shopselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++shoplist;
        shoplistloc[shoplist] = i;
        category = 'cbshops';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,label,icontype);
        gmarkersShops.push(marker);
        break;
    case 'MobilNil' :
        icontype = icmobinil;
        shopselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++shoplist;
        shoplistloc[shoplist] = i;
        category = 'cbshops';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,label,icontype);
        gmarkersShops.push(marker);
        break;
    case 'Church' :
        icontype = icchurch;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'McDonalds' :
        icontype = icmcdonalds;
        barandrestselect_html += '<option> ' + '(R) ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersRestaurants.push(marker);
        break;
    case 'KFC' :
        icontype = ickfc;
        barandrestselect_html += '<option> ' + '(R) ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++barandrestlist;
        barandrestlistloc[barandrestlist] = i;
        category = 'cbrestaurants';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersRestaurants.push(marker);
        break;
    case 'StreetNames' :
        icontype = icstreet;
        streetselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++streetlist;
        streetlistloc[streetlist] = i;
        category = 'cbstreets';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersStreets.push(marker);
        break;
    case 'PublicBeaches' :
        icontype = icbeach;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'IceCreamParlour' :
        icontype = icicecream;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Doctors and Small Clinics' :
        icontype = icdoctor;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Others' :
        icontype = icother;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'PetrolStation' :
        icontype = icpetrol;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Buscompany' :
        icontype = icbuscompany;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Cinema' :
        icontype = iccinema;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Bazaars' :
        icontype = icshop;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoBig,icontype);
        gmarkersOthers.push(marker);
        break;
    case 'Cashmaschines' :
        icontype = icatm;
        otherselect_html += '<option> ' + label + ", " + v_location + ", " + v_area + '</option>';
        ++otherlist;
        otherlistloc[otherlist] = i;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
    default :
        icontype = icdefault;
        category = 'cbothers';
        var point = new GLatLng(lat,lng);
        var marker = createMarker(point,v_BubbleInfoSmall,icontype);
        gmarkersOthers.push(marker);
        break;
      } <!--Switch Bracket-->
        <!-- AndyW. This is where we make the actual marker on the map. -->
        marker.type         = checkicon;
        marker.label        = label;
        marker.location     = v_location;
        marker.area         = v_area;
        marker.desc1        = html1;
        marker.desc2        = html2;
        marker.image        = '<img src='+smallImage+' width="275" height="300" /></a>';
        marker.image2       = '<img src='+v_picture2+' width="275" height="85" /></a>';
        marker.extra1       = v_extra1;
        marker.weblink      = v_weblink;
        marker.email        = v_email;
        marker.panorama     = v_panorama;
        marker.panoramaLink = v_panoramaLink;
        map.addOverlay(marker);
     }  <!--If Bracket    -->
    }   <!--For Bracket   -->
        
        <!-- Display the dropdowns with data and show/hide the initial categories-->
         document.getElementById("streets").innerHTML = streetselect_html;
         document.getElementById("hotels").innerHTML = hotelselect_html;
         document.getElementById("diving").innerHTML = divingselect_html;
         document.getElementById("barandrest").innerHTML = barandrestselect_html;
         document.getElementById("shops").innerHTML = shopselect_html;
         document.getElementById("rental").innerHTML = rentalselect_html;
         document.getElementById("other").innerHTML = otherselect_html;
         show("cbhotels");
         show("cbrestaurants");
         hide("cbshops");
         show("cbdivecenters");
         hide("cbstreets");
         hide("cbrentals");
         hide("cbothers");
    } <!--Process_It Bracket-->
}<!--END Bracket dataloader()-->

