    /**
*
*  URL encode / decode
*  http://www.webtoolkit.info/
*
**/

var Url = {

    // public method for url encoding
    encode : function (string) {
        return escape(this._utf8_encode(string));
    },

    // public method for url decoding
    decode : function (string) {
        return this._utf8_decode(unescape(string));
    },

    // private method for UTF-8 encoding
    _utf8_encode : function (string) {
        string = string.replace(/\r\n/g,"\n");
        var utftext = "";

        for (var n = 0; n < string.length; n++) {

            var c = string.charCodeAt(n);

            if (c < 128) {
                utftext += String.fromCharCode(c);
            }
            else if((c > 127) && (c < 2048)) {
                utftext += String.fromCharCode((c >> 6) | 192);
                utftext += String.fromCharCode((c & 63) | 128);
            }
            else {
                utftext += String.fromCharCode((c >> 12) | 224);
                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
                utftext += String.fromCharCode((c & 63) | 128);
            }

        }

        return utftext;
    },

    // private method for UTF-8 decoding
    _utf8_decode : function (utftext) {
        var string = "";
        var i = 0;
        var c = c1 = c2 = 0;

        while ( i < utftext.length ) {

            c = utftext.charCodeAt(i);

            if (c < 128) {
                string += String.fromCharCode(c);
                i++;
            }
            else if((c > 191) && (c < 224)) {
                c2 = utftext.charCodeAt(i+1);
                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                i += 2;
            }
            else {
                c2 = utftext.charCodeAt(i+1);
                c3 = utftext.charCodeAt(i+2);
                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                i += 3;
            }

        }

        return string;
    }

}
var iconBlue = new GIcon(); 
    iconBlue.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
    iconBlue.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconBlue.iconSize = new GSize(12, 20);
    iconBlue.shadowSize = new GSize(22, 20);
    iconBlue.iconAnchor = new GPoint(6, 20);
    iconBlue.infoWindowAnchor = new GPoint(5, 1);

    var iconRed = new GIcon(); 
    iconRed.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
    iconRed.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconRed.iconSize = new GSize(12, 20);
    iconRed.shadowSize = new GSize(22, 20);
    iconRed.iconAnchor = new GPoint(6, 20);
    iconRed.infoWindowAnchor = new GPoint(5, 1);
    
    var iconGreen = new GIcon(); 
    iconGreen.image = "http://labs.google.com/ridefinder/images/mm_20_green.png";
    iconGreen.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconGreen.iconSize = new GSize(12, 20);
    iconGreen.shadowSize = new GSize(22, 20);
    iconGreen.iconAnchor = new GPoint(6, 20);
    iconGreen.infoWindowAnchor = new GPoint(5, 1);
    
    var iconPurple = new GIcon(); 
    iconPurple.image = "http://labs.google.com/ridefinder/images/mm_20_purple.png";
    iconPurple.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconPurple.iconSize = new GSize(12, 20);
    iconPurple.shadowSize = new GSize(22, 20);
    iconPurple.iconAnchor = new GPoint(6, 20);
    iconPurple.infoWindowAnchor = new GPoint(5, 1);
    
    var iconWhite = new GIcon(); 
    iconWhite.image = "http://labs.google.com/ridefinder/images/mm_20_white.png";
    iconWhite.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconWhite.iconSize = new GSize(12, 20);
    iconWhite.shadowSize = new GSize(22, 20);
    iconWhite.iconAnchor = new GPoint(6, 20);
    iconWhite.infoWindowAnchor = new GPoint(5, 1);
    
    var iconGray = new GIcon(); 
    iconGray.image = "http://labs.google.com/ridefinder/images/mm_20_gray.png";
    iconGray.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconGray.iconSize = new GSize(12, 20);
    iconGray.shadowSize = new GSize(22, 20);
    iconGray.iconAnchor = new GPoint(6, 20);
    iconGray.infoWindowAnchor = new GPoint(5, 1);
    
    var iconBrown = new GIcon(); 
    iconGray.image = "http://labs.google.com/ridefinder/images/mm_20_brown.png";
    iconGray.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconGray.iconSize = new GSize(12, 20);
    iconGray.shadowSize = new GSize(22, 20);
    iconGray.iconAnchor = new GPoint(6, 20);
    iconGray.infoWindowAnchor = new GPoint(5, 1);


    var customIcons = [];
    customIcons["appartement"] = iconBlue;
    customIcons["maison"] = iconWhite;
    customIcons["mobil-home"] = iconGreen;
    customIcons["chalet"] = iconPurple;
    customIcons["hotel"] = iconBrown;
    customIcons["chambre-hote"] = iconRed;
    customIcons["gite"] = iconRed;
    customIcons["camping2"] = iconGray;
    customIcons["autre"] = iconGray;
	

