// ********************************************
// **        Flashmaps DB Mapper 4.0.1       **
// **       JavaScript API Functions         **
// ********************************************
// ** Please DO NOT make any changes here.   **
// ** You may want to chenge fmDBMCustom.js  **
// ********************************************
// **      (c)2008 Flashmaps Geospatial      **
// **        http://www.flashmaps.com        **
// ********************************************

// ********************************************
// **  Functions called from the map, events **
// ********************************************

// The map is ready to receive commands
function fmMapIsReady() {
	return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outMapIsReady");
}

// A POI event was triggered
function fmPOIEvent(eventName, fmPOIID) {
	switch (eventName) {
		case 'onrollover':
			// The visitor placed the mouse over a POI
			fmCustomPOIOnRollOver(fmPOIID);
			break;
			
		case 'onrollout':
			// The visitor moved the mouse out of a POI
			fmCustomPOIOnRollOut(fmPOIID);
			break;
			
		case 'onrelease':
			// The visitor clicked on a POI
			fmCustomPOIOnRelease(fmPOIID);
			break;
						
		default:
			// Should not happen
			alert('Event ' + event + ' was triggered over POI ID ' + fmPOIID);
			break;
	}
}

// A set of POIs has been loaded
function fmPOIURLLoaded(strPOIsURL, iPOIsNumber) {
	fmPOIsLoaded = true;
	fmPOIsURL = strPOIsURL;
	fmCustomPOIURLLoaded(strPOIsURL, iPOIsNumber);
}

function fmGeometryEvent(eventName, geometryID) {
	switch(eventName) {
		case 'onrollover':
			break;
		case 'onrollout':
			break;
		case 'onrelease':
			break;
	}
}

// ********************************************
// **             Map properties             **
// ********************************************

// Get map latitude / longitude / scale
function fmGetMapLat()   { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outLat"); }
function fmGetMapLon()   { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outLon"); }
function fmGetMapScale() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outScale"); }

// Get current view's minimum latitude, longitude, maximum latitude and longitude
function fmGetMapViewMinLat() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewMinLat"); }
function fmGetMapViewMaxLat() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewMaxLat"); }
function fmGetMapViewMaxLon() {	return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewMaxLon"); }
function fmGetMapViewMinLon() {	return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewMinLon"); }

//GET current view the latitude/longitude of the corners
function fmGetMapViewSWLat() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewSWLat"); }
function fmGetMapViewNWLat() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewNWLat"); }
function fmGetMapViewSELat() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewSELat"); }
function fmGetMapViewNELat() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewNELat"); }
function fmGetMapViewSWLon() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewSWLon"); }
function fmGetMapViewNWLon() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewNWLon"); }
function fmGetMapViewSELon() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewSELon"); }
function fmGetMapViewNELon() { return fmMapObj1.GetVariable("_root." + fmMcPath + "map_mc.outViewNELon"); }

// ********************************************
// **  Functions to send commands to the map **
// ********************************************

//Execute a POI event
function fmPOIEventTrigger(strEvent, strTarget, strUrl, fmPOIID) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideEvent", strEvent); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideTarget", strTarget); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideUrl", strUrl); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIID", fmPOIID); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "POIEventTrigger"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Highlight a POI
function fmPOIHighlight(fmPOIID, strMethod) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIID", fmPOIID); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "highlightPOI"); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideHighlightMethod", strMethod); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Unhighlight a POI
function fmPOIUnhighlight(fmPOIID) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIID", fmPOIID);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "unhighlightPOI"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Unhighlight all
function fmPOIUnhighlightAll() {
	fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "unhighlightAll"); 
	fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
}

// Highlight and focus on a POI
function fmPOIHighlightAndFocusOn(fmPOIID, strMapScale, strMethod){
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIID", fmPOIID); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideScale", strMapScale); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "highlightAndFocusOnPOI"); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideHighlightMethod", strMethod); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Focus on a certain point, lat/lon.
function fmFocusOnLatLon(strLat, strLon, strMapScale) {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLat", strLat); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLon", strLon);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideScale", strMapScale); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "FocusOnLatLon"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

//Focus on a Scale
function fmFocusOnScale(strMapScale) {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideScale", strMapScale); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "FocusOnScale"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Focus on a min/max lat/lon.
function fmFocusOnMinMax(strMinLat, strMinLon, strMaxLat, strMaxLon) {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideMinLat", strMinLat); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideMinLon", strMinLon);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideMaxLat", strMaxLat); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideMaxLon", strMaxLon);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "FocusOnMinMax"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmFocusOnAllPOIs(strCategory) {
//do: Focus on the POIs of a particular category or on all of them

	if (fmPOIsLoaded) {
		if (strCategory == "") {strCategory = "*";}
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideCategory", strCategory);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "FocusOnAllPOIs"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

//Focus on an address
function fmFocusOnAddress(strAddress, strCity, strState, strZipCode, strCountry) {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAddress", strAddress);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideCity", strCity);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideState", strState);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideZipCode", strZipCode);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideCountry", strCountry);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "FocusOnAddress"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Highlight on a certain lat/lon.
function fmHighlightLatLon(strLat, strLon) {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLat", strLat); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLon", strLon);
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "highlightLatLon"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Show category (* for all)
function fmPOIShowCategory(strCategory) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideCategory", strCategory); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "showCategory"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Hide category (* for all)
function fmPOIHideCategory(strCategory) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideCategory", strCategory); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "hideCategory"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Show a POI
function fmPOIShow(id_str) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIID", id_str); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "showPOI"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Hide a POI
function fmPOIHide(id_str) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIID", id_str); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "hidePOI"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Show cross hair
function fmShowCrossHair() {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "showCrossHair");
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Hide cross hair
function fmHideCrossHair() {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "hideCrossHair"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Load a set of POIs
function fmPOILoadURL(strPOIsURL) {
	if (fmMapIsReady()) {
		fmPOIsURL = strPOIsURL;
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIsURL", strPOIsURL); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "loadPOIsURL"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Load a set of POIs
function fmPOILoadURLAndFocus(strPOIsURL) {
	if (fmMapIsReady()) {
		fmPOIsURL = strPOIsURL;
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsidePOIsURL", strPOIsURL); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "loadPOIsURLAndFocus"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// Remove all POIs
function fmPOIRemoveAll() {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "removeAllPOIs"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");		
		fmPOIsLoaded = false;
	}
}

// Remove all POIs of a category
function fmPOIRemoveCategory(strCategory) {
	if (fmPOIsLoaded) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideCategory", strCategory); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "removeCategory"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");		
	}
}

// Load an set of POIs for the administration tool
function fmAdminPOILoadURL(strFile)  {
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "mcAddPlugging.fromOutsideXML", strFile); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "mcAddPlugging.adminFromOutside_mc", "doAction");
	}
}

// Initial view of the map
function fmInitialView() {
	fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "initialView");
	fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
}

function fmMaximize(fmToolbar, fmWidth, fmHeight, fmLat, fmLon, fmScale) {
//do: enlarge map

	//STEP 1 - browser detection
	if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
		var isIE = (navigator.appName.indexOf("Microsoft")!=-1)?1:0;
		var isNN = (navigator.appName=="Netscape")?1:0;
		var isSF = (fmCheckString("Safari", navigator.appVersion)!=-1)?1:0;
	}

	//STEP 2 - window size calculation
	factorW = (fmWidth * 100) /screen.width;
	factorH = (fmHeight * 100)/screen.height;
	if (factorW > factorH) {
		newW = screen.width;
		newH = (((screen.width*100)/fmWidth)/100)*fmHeight;
		posX = 0;
		posY = (screen.height - newH) / 2;
	} else {
		if (factorW < factorH) {
			newW = (((screen.height*100)/fmHeight)/100)*fmWidth;
			newH = screen.height;
			posX = (screen.width - newW) / 2;
			posY = 0;
		} else {
			newW = screen.width;
			newH = screen.height;
			posX = 0;
			posY = 0;
		}
	}
	
	//STEP 3 - variables for open the new window
	var optIE = 'scrollbars=no, menubar=0,  width=' + newW + ', height=' + newH + ', left=' + posX + ', top=' + posY+'';
	var optNN = 'scrollbars=no, menubar=no, width=' + newW + ', height=' + newH + ', left=' + posX + ', top=' + posY +'';
	
	//STEP 4 - open the window
	if (isIE) { newWindow = window.open('about:blank', '', optIE); 
	} else    { newWindow = window.open('', '', optNN); }
	
	newW = newW - 20;
	newH = newH - 20;
	
	//STEP 5 - write for the new window
	var fmObject = fmObjectActivate("fmDBMEngine", fmToolbar, newW , newH, "true", "high", "#FFFFFF", ".");
	newWindow.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	newWindow.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml">');
	newWindow.document.writeln('<head>');
	newWindow.document.writeln(' <title>Flashmaps DBMapper</title>');
	newWindow.document.writeln('</head>')
	newWindow.document.writeln('<body bgcolor="#FFFFFF" scroll="no" margin="0px">');
	newWindow.document.writeln('<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">');
	newWindow.document.writeln('    <tr><td align="center">');
	newWindow.document.writeln(fmObject);
	newWindow.document.writeln('        <sc'+'ript language="JavaScript" src="include/fmDBMInitVars.js"></sc'+'ript>');
	newWindow.document.writeln('    </td></tr>')
	newWindow.document.writeln('</table>');
	newWindow.document.writeln('</body>')
	newWindow.document.writeln('</html>');
}

// ********************************************
// **              Miscellaneous             **
// ********************************************

// Check string, for navigator version
function fmCheckString(str_find, str) {
	var result=-1;
	var re = new RegExp(str_find) ;

	if (str.search(re) != -1)
		result = 0;
	else
		result = -1;
	return result;
} 


// ********************************************
// **             Layer functions            **
// ********************************************

function fmLayerLoad(strLayer) {
//do: load and show a layer

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLayer", strLayer); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "customLayerLoad"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmLayerRemove(strLayerID) {
//do: remove a layer

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLayer", strLayerID); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "customLayerRemove"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmLayerShow(strLayerID) {
//do: show a layer or all '*'

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLayer", strLayerID); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "customLayerShow"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmLayerHide(strLayerID) {
//do: hide a layer or all '*'
	
	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideLayer", strLayerID); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "customLayerHide"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

// ********************************************
// **          Geometry functions            **
// ********************************************

function fmGeometryLoad(strGeometryURL) {
//do: load a geometry url in XML format

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideGeometry", strGeometryURL); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "geometryLoad"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmGeometryLoadAndFocus(strGeometryURL) {
//do: load a geometry url in XML format, and focus

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideGeometry", strGeometryURL); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "geometryLoadAndFocus"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmGeometryUnload() {
//do: unload all geometry elements into the dbmapper

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "geometryUnload"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmGeometryElementShow(strId) {
//do: show a geometry element (use "*" for all elements)

	if (fmMapIsReady()) {
		if (strId == "") { strId = "*" }
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideElement", strId); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "geometryElementShow"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmGeometryElementHide(strId) {
//do: hide a geometry element (use "*" for all elements)

	if (fmMapIsReady()) {
		if (strId == "") { strId = "*" }
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideElement", strId); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "geometryElementHide"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

function fmGeometryElementRemove(strId) {
//do: remove a geometry element

	if (fmMapIsReady()) {
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideElement", strId); 
		fmMapObj1.SetVariable("_root." + fmMcPath + "map_mc.fromOutsideAction", "geometryElementRemove"); 
		fmMapObj1.TCallLabel("_root." + fmMcPath + "map_mc.fromOutside_mc", "doAction");
	}
}

