function zoomToScale(mScale)
{
	//alert (mScale + " -" ) ;
	if (mScale == "" || mScale == 0 )
	{
		alert ( 'Scale cannot be zero') ;

	}
	else
	{

	var mWidth, mHeight
	mWidth = parent.mapFrame.getClientWidth();
	mHeight = parent.mapFrame.getClientHeight();
	var sMapHREF =  'map.asp?Cmd=ZOOMTOSCALE&scale=' + mScale +
                 "&mWidth=" + mWidth + "&mHeight=" + mHeight

	var mpFrame;
	mpFrame=parent.mapFrame;
	mpFrame.showLayer("loadLayer");
	mpFrame.location =  sMapHREF ;
	}
}

function toggleMouseTip(theControl)
{
	//alert(theControl.checked);
	(theControl.checked)?parent.mapFrame.showLayer("MouseTip"):parent.mapFrame.hideLayer("MouseTip");
}


function showScale()
{
	var mapFr = parent.mapFrame ;
	var varForm ;
	if (mapFr.isNav) 	varForm	= mapFr.document.Variables ;
	else varForm	= mapFr.Variables ;
			
	if (varForm) 	{
		if (mapFr.isNav) var scForm = document.scaleForm ;
		else var scForm = scaleForm ;
		scForm.mScale.value = varForm.mScale.value ;
		scForm.showMouseTip.checked = (mapFr.isLayerVisible("MouseTip"));
	}
}

