/*
   	$Id: $
    Copyright (c) 2005 NILU
   
   	@Author(s): Demis/Robert Logna
   
	Purpose: Handles mapclip operations
*/

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var aMaps = new Array();

function loadMap(WMS){
	window.status = "Reloading " + WMS + "...";
}

function mouseMove(WMS, x, y){
	//Disabled in the Flash object
	//window.status = WMS + ": (" + x + "," + y + ")";
}

// Handle all the the FSCommand messages in a Flash movie
function MapClip_DoFSCommand(command, args) {
	
	var arrArgs = args.split(",");
	var MapClipObj = InternetExplorer ? MapClip : document.MapClip;

	if (command == "MapClip mousemove") {
		//window.status = arrArgs[2] + " map, (x=" + arrArgs[0] + ", y=" + arrArgs[1] + ")";
	}else if (command == "MapClip featureinfo") {
		//window.status = args;
	}else if (command == "MapClip zoomall") {
		//window.status = "Zooming out ...";
	}else if (command == "MapClip load") {
		//window.status = "Reloading ..." + arrArgs[2];
	}
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub MapClip_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call MapClip_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}


