// ********************************************
// **        Flashmaps PinPoint! 1.0         **
// **      JavaScript Custom Functions       **
// ********************************************
// ** Feel free to make any changes you need **
// **      to fit your requirements.         **
// ********************************************
// **      (c)2004 Flashmaps Geospatial      **
// **        http://www.flashmaps.com        **
// ********************************************
// **  Functions called from the map, events **
// ********************************************
// The visitor placed the mouse over a POI
function fmCustomPOIOnRollOver(fmPOIID) {
	// Write your code here, For example, display POI's picture
	//document.all['selected_location_img'].src = 'pois/images/' + fmPOIID + '.jpg';
}
// The visitor moved the mouse out of a POI
function fmCustomPOIOnRollOut(fmPOIID1) {
	// Write your code here, for example, display a blank picture
	//document.all['selected_location_img'].src = 'pois/images/blank.gif';
}
// The visitor clicked on a POI
function fmCustomPOIOnRelease(fmPOIID) {
	fmCustomPOIHighlightAndFocusOn(fmPOIID,'14000');
	}
// The map is ready to receive commands
function fmCustomMapIsReady() {	
	//nmc - xml_file_to_load is set on locations.cfm
	if (typeof xml_file_to_load == 'undefined') {
		xml_file_to_load = 'melsa.xml';//'fm/fmPPMap/'		
	}
	fmPOILoadURL(xml_file_to_load);
}
// A set of POIs has been loaded
function fmCustomPOIURLLoaded(strPOIsURL, iPOIsNumber) {
	//alert( 'loaded ' + strPOIsURL + '\n with ' + iPOIsNumber + ' POIs');
}
// **  Functions to send commands to the map **
// Highlight a POI
function fmCustomPOIHighlight(fmPOIID, strMethod) {	
	fmPOIHighlight(fmPOIID, strMethod);// Highlight a POI inside the map
	// Write your code here, For example, display a POIs picture
	//document.all['selected_location_img'].src = 'pois/images/' + fmPOIID + '.jpg';
	//nmc added
   if (document.getElementById){ var id = "addr_" + fmPOIID; document.getElementById(id).style.border="1px solid #333"; document.getElementById(id).style.background="#EFEFEF";}
}
// Unhighlight a POI
function fmCustomPOIUnhighlight(fmPOIID) {// Unhighlight a POI inside the map
	fmPOIUnhighlight(fmPOIID);
	// Write your code here, For example, display a blank picture
	//document.all['selected_location_img'].src = 'pois/images/blank.gif';
    //nmc added
    if (document.getElementById){ var id = "addr_" + fmPOIID; document.getElementById(id).style.border="1px solid #ccc"; document.getElementById(id).style.background="#FFF";}
}
// Highlight and focus on a POI
function fmCustomPOIHighlightAndFocusOn(fmPOIID, strMapScale, strMethod){
	// Focus and highlight on a POI inside the map
	fmPOIHighlightAndFocusOn(fmPOIID, strMapScale, strMethod);
	// Write your code here
}