
function MapBrowse () {
	var m_mapTable;
	
	this.init = function () {
	  m_mapTable = dojo.widget.byId("loadMapTable");
	  if (null != m_mapTable) {
		  m_mapTable.onSelect = selectMap;
	      dojo.io.bind({
    		url: "/actionServlet",
	    	content: {action: "GetMaps", published:true},
     		load: showMapsResult,
     		mimetype: "text/plain",
  	 		method:"POST"
   	       	}); 		  
	  }
	}		

    var selectMap = function (e) {
		var row = dojo.html.getParentByType(e.target,"tr");    
		var mapId = row.getAttribute("value");	
		window.location = "/newWindow.jsp?jsp=mapView.jsp&mapId="+mapId+"&format=view";
    } 	
    
 var showMapsResult = function (op, result) {    
    	var maps = JSON.parse(result);
		m_mapTable.store.setData(maps);
	}    
	
}