// Inizializzazioni
//var map_width = <%=mappasize_width%>; // Larghezza dell'immagine mappa
//var map_height = <%=mappasize_height%>; // Altezza dell'immagine mappa
//var map_context = "<%=ContextName%>"; // Contesto della mappa
	
	
function mapIconOver() 
{
	if (!map_zooming)
		map_overIcon = true;

	document.getElementById("zoomat").style.cursor = "help";

	return true;
}

function mapIconOut() 
{
	if (!map_zooming)
		map_overIcon = false;

	if (map_zoomMode == 'in' || map_zoomMode == 'out')
		document.getElementById("zoomat").style.cursor = "hand";
			
	else if(map_zoomMode == 'area')
		document.getElementById("zoomat").style.cursor = "crosshair";
			
	else if(map_zoomMode == 'drag')
		document.getElementById("zoomat").style.cursor = "move";

	else if(map_zoomMode == 'info')
		document.getElementById("zoomat").style.cursor = "help";
			
	else
		document.getElementById("zoomat").style.cursor = "hand";

	return true;
}

function sottomettiForm(azione, command )
{
	document.map_form.map_action.value = azione;
	document.map_form.map_command.value = command;
	document.map_form.map_wait.value = '0';
	document.map_form.submit();
}



function manager_formsubmit( azione, command )
{
	document.map_form.map_action.value = azione;
	document.map_form.map_command.value = command;
	document.map_form.map_wait.value = '0';

	if (command == '200' )
		document.map_form.map_zoom.value = 'out';
			
	else if(command == '100')
		document.map_form.map_zoom.value = 'in';
			
	else
		document.map_form.map_zoom.value = '';
	
	document.map_form.submit();
}


function salvaManuale()
{
	document.map_form.cmdSalvaManuale.value = 18;
	document.map_form.map_action.value = '';
	document.map_form.map_command.value = '';
	document.map_form.map_zoom.value = 'in';
	document.map_form.submit();

}

function changeStylePosition(el)
{
	var myel = document.getElementById(el);
	myel.style.position='absolute';
}

function goNextAnchor(where)
{

	if (navigator.appName == "Netscape")
		{
		// Netscape Navigator (JavaScript) code
		}
		else
			window.location.hash = where;
			
}

function waitingworld()
{
	if ( document.map_form.map_wait.value=='0' )
		{
		mappaquadro = new Image;
		document.map_tool.mappaquadro.src = "mapimages/mondogira.gif";
		}
}

function activeHourglass()
{
	document.zoomat.onclick = activewaitingworld;
}

function activewaitingworld()
{
	mappaquadro = new Image;
	document.map_tool.mappaquadro.src = "mapimages/mondogira.gif";
	return true;
}

