function setScaleIndex(scale)
{
	document.MapForm.ScaleIndex.value = scale;
	document.MapForm.Cmd.value = 'setScaleIndex';	
	document.MapForm.submit();
}
function incScaleIndex()
{
var index = parseInt(document.MapForm.currScaleIndex.value);
var max = parseInt(document.MapForm.maxScales.value);

if (index + 1 <= max) 
	setScaleIndex(index+1);

return false;
}
function decScaleIndex()
{
var index = parseInt(document.MapForm.currScaleIndex.value);
var max = parseInt(document.MapForm.maxScales.value);

if (index - 1 >= 0) setScaleIndex(index-1);

return false;
}

function doPan(panCommand)
{
	document.MapForm.Cmd.value = panCommand;
	document.MapForm.submit();
}

function doMapResize(MapSize)
{
	if (MapSize != null){
	document.MapForm.Cmd.value = 'MapResize';
	document.MapForm.MapSize.value = MapSize;	
	document.MapForm.submit();}
}

function OnStateChange()
{
	document.MapForm.cmd.value = "ZOOM_TO_STATE";
	document.MapForm.submit();
}

function openwin(URL) 
{
	window.open(URL,null,"status=1,menubar=0,scrollbars=1,width=280,height=300");
}
