function createIcon(type)
{
	var newIcon = new GIcon();
    newIcon.shadow = '/images/mapmarkers/shadow.png';
    newIcon.iconSize = new GSize(37,50);
    newIcon.shadowSize = new GSize(62,50);
    newIcon.iconAnchor = new GPoint(19,50);
    newIcon.infoWindowAnchor = new GPoint(19,0);
    newIcon.printShadow = '/images/mapmarkers/printShadow.gif';
    newIcon.transparent = '/images/mapmarkers/transparent.png';
    newIcon.imageMap = [23,0,25,1,27,2,28,3,30,4,31,5,31,6,32,7,33,8,33,9,34,10,34,11,34,12,35,13,35,14,35,15,35,16,35,17,35,18,35,19,35,20,35,21,35,22,34,23,34,24,34,25,33,26,32,27,32,28,31,29,30,30,29,31,28,32,27,33,26,34,26,35,25,36,24,37,23,38,23,39,22,40,22,41,21,42,20,43,20,44,19,45,19,46,19,47,18,48,18,49,17,49,17,48,16,47,16,46,16,45,15,44,15,43,14,42,13,41,13,40,12,39,11,38,11,37,10,36,9,35,8,34,7,33,6,32,6,31,5,30,4,29,3,28,2,27,2,26,1,25,1,24,0,23,0,22,0,21,0,20,0,19,0,18,0,17,0,16,0,15,0,14,0,13,0,12,1,11,1,10,1,9,2,8,3,7,3,6,4,5,5,4,6,3,8,2,9,1,12,0];

    switch(type)
    {
    case 'origin':
	    newIcon.image = '/images/mapmarkers/imageOrigin.png';
	    newIcon.printImage = '/images/mapmarkers/printImageOrigin.gif';
	    newIcon.mozPrintImage = '/images/mapmarkers/mozPrintImageOrigin.gif';
      break;
    case 'destination':
	    newIcon.image = '/images/mapmarkers/imageDestination.png';
	    newIcon.printImage = '/images/mapmarkers/printImageDestination.gif';
	    newIcon.mozPrintImage = '/images/mapmarkers/mozPrintImageDestination.gif';
      break;
    case 'empty':
    default:
	    newIcon.image = '/images/mapmarkers/imageEmpty.png';
    	newIcon.printImage = '/images/mapmarkers/printImageEmpty.gif';
    	newIcon.mozPrintImage = '/images/mapmarkers/mozPrintImageEmpty.gif';
    }
    return newIcon;
}
function getHotelAdverts() {
	var url = '/search/hotel/search/searchId/' + searchId;
	$.getJSON(url,
			  { format :'json'},
				function(detailjson){
					if (!detailjson.error) {
						if(detailjson.status == 2){
							$('#hotel').html(detailjson.html);
						}else{
	                        setTimeout("getHotelAdverts();",3000);
						}
					} else {
					}
			  });
}