		var map = null;
		var hShape = null;
		var __frenchFlag;
		var imgExt = (jQuery.browser.version=='6.0' && jQuery.browser.msie) ? ".gif" : ".png";
		var bShapeIcon = "<div id='marker' style='position:absolute;top:-20px;left:10px;'><img src='"+imgDomain+"/images/mapicon/mapicon_dot_off"+imgExt+"' /></div>";
		
		function getSmallMap() {
			var $ = jQuery;
			var mapId = 'small_map';

			var smallMap = new VEMap(mapId);

			smallMap.LoadMap();    
			smallMap.SetCenterAndZoom(new VELatLong(mapCenterLat, mapCenterLng), 14);
			smallMap.HideDashboard();
			
			// in order to make it static
			smallMap.AttachEvent('ondoubleclick', function(){return true;});
			smallMap.AttachEvent('onmousemove', function() {return true;});
			smallMap.AttachEvent('onmouseover', function() {return true;});
			smallMap.AttachEvent('ondoubleclick', function(){return true;});
			smallMap.AttachEvent("onmousewheel", function(){return true;});		
	
			var shape = new VEShape(VEShapeType.Pushpin, smallMap.GetCenter());
			shape.SetCustomIcon(bShapeIcon);
			smallMap.AddShape(shape);
			if(scaleType=='K')
				smallMap.SetScaleBarDistanceUnit(VEDistanceUnit.Kilometers);
			else
				smallMap.SetScaleBarDistanceUnit(VEDistanceUnit.Miles);
			
			// in order to disable css selector for the first small map, so that the bigger map works properly with css hacking
			$('#MSVE_navAction_FlatlandMapMode').attr('id', '');
			$('#MSVE_navAction_View3DMapMode').attr('id','');
			$('#MSVE_navAction_showLabels').attr('id','');
			$('#MSVE_navAction_separator0, #MSVE_navAction_separator2, #MSVE_navAction_separator3').attr('id','');
			$('#MSVE_navAction_container').attr('id', '');
			$('#MSVE_navAction_toggleGlyphWrapper').attr('id','');
			$('#ZoomBar_Background').attr('id', '');
			$('#MSVE_navAction_leftBar').attr('id', '');
			$('#MSVE_navAction_leftBackground').attr('id', '');
		}
	
		function loadMap() {
			var $ = jQuery;
			var ext = ($.browser.version=='6.0' && $.browser.msie) ? ".gif" : ".png";
	
			map = MapLIB.init({
									mapId:"map",
									centerLat:mapCenterLat, 
									centerLng:mapCenterLng,
									mapLeftOffset:-1,
									distanceUnit: scaleType,
									zoom: 16,
									lang:detailLang,
									onMapLoad: onMapLoaded
								});

			mjStreetView.init({mapId:'map', streetId:'mapStreet',normalMapHeight:500, toggledMapHeight:200, svHeight:300, 
												frenchFlag:detailLang, pageType:'D', serverName:serverName,
												initLat: mapCenterLat, initLng: mapCenterLng,
												mapInstance:map
												});	

			mjStreetView.showTile(0);
			setTimeout(function(){MapLIB.streetSceneButton();}, 500);

			MapLIB.addPushpin({pinHTML: bShapeIcon, pinIMG: imgDomain +"/images/mapicon/mapicon_dot_off"+ext});
	
			var frenchFlag = detailLang == "1" ? "T" :"F";
			var streetLeftOffset = frenchFlag == 'F' ? "5px" : "10px";
	
		 $('<div id="btnStreetScene" class="customBtn" style="display:none">' +		// by default hide the button
			 '<div style="position:relative;top:7px;left:'+streetLeftOffset+';font-weight:bold;"></div>' +
			 '<img src="/images/nav_select.gif" style="position:relative;top:9px;left:40px;display:none;" /></div>')
		 .setCustomButton({
		 		//containerID: "#map",
		 		name: MapLIB.getMessage("streetScene"),
		 		style: {left:"260px", width:"80px"},
		 		clickFn: MapLIB.Button.streetScene
		 });

			map.AttachEvent("onendpan", endPanHandler);
			map.AttachEvent("onendzoom", zoomEndHandler);				
			map.AttachEvent("onclick", mouseClickHandler);
			map.AttachEvent("onmousedown", mouseDownHandler);		
			map.AttachEvent("onmouseup", mouseUpHandler);
		  map.AttachEvent('onmousemove', mouseMoveHandler);
		  map.AttachEvent("onmouseover", mouseOverHandler);
			map.AttachEvent("onmouseout", mouseOutHandler);
		 
		 Webcam.get(map, frenchFlag, 'T');
		 //setEventsOnIconTextLink();
		//	});
		}

		// if it is not resized, map doesn't display properly.
		function onMapLoaded(map) {
			return function() {	
				map.Resize();
				setTimeout(function() {
						map.PanToLatLong(new VELatLong(mapCenterLat, mapCenterLng));
				}, 700);	
			}
		}
		function setCategory2() {
			var id = document.getElementById("nt2");
			id.innerHTML = "C";
		}
		function setName2() {
			var id = document.getElementById("nt2");
			id.innerHTML = "N";
		}

