﻿function $get(id){return document.getElementById(id)}

function controls_init()
{
}

// Select pan or zoom radio button
function dragmode(e)
{
	var targ = e.target;
	if (targ == null) targ = e.srcElement;
	
	var dth = $get("DragTypeHidden");//From Server
	var hdt = $get("hiddenDragType");//To Server
	var inputRubberband = $get("inputRubberband");
	var inputPan = $get("inputPan");
	
	if(targ == inputRubberband)
	{
		inputRubberband.src = 'img/rubberband_on.gif';
		inputPan.src = 'img/pan_off.gif';
		$get('theMapImage').style.cursor = 'crosshair';
		dth.value = 0;
		hdt.value = "rubberband";
	}
	else if(targ == inputPan)
	{
		inputRubberband.src = 'img/rubberband_off.gif';
		inputPan.src = 'img/pan_on.gif';
		$get('theMapImage').style.cursor = 'pointer';
		dth.value = 1;
		hdt.value = "pan";
	}
	return true;
}

function setTarget(id){
	__doPostBack('theMapImage','poiclick(' + id + ')');
}

// Notify ScriptManager that this is the end of the script.
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

