var graphic = null;
var text = null;

var mapPoints = null;
var imagePoints = null;

var isLine = false;
var isPolygon = false;


 function mapClick() {
  if (identifySelected()) 
  {
    var p = mapMain.mapPoint;
    
    if (layer != null) {
      var url = "UtilityIdentify.aspx?layer=" + layer +
          "&pixelsize=" + pixelSize + "&x=" + p.x + "&y=" + p.y;   
    }
    else
    {
      var url = "UtilityIdentify.aspx?layer=null" +
          "&pixelsize=" + pixelSize + "&x=" + p.x + "&y=" + p.y;       
    }
      var features = "height=500,width=400,location=no," + 
          "menubar=no,personalbar=no,resizable=no,scrollbars=yes," + 
          "status=no,titlebar=no,toolbar=no";
      window.open(url, "Identify", features);
  }
}


function identifySelected() {
  var s = false;
  
  if (document.getElementById("optIdentifyTool_button") != null) 
  {
    s = optIdentifyTool.isSelected();
  }
  return s;
}



function GroupCheck(prefixString)
{
	for(var i = 0; i < 100; i++)
	{
		var ctl = document.getElementById(prefixString + i.toString());
		if (ctl != null)
		{
			var grpCtl = document.getElementById(prefixString);
			if (grpCtl.checked)
			{
			ctl.checked = true;
			}
			else
			{
			ctl.checked = false;
			}
		}
	}
}
