
/*******************************************************************************************
// Zoom In Controls
*******************************************************************************************/

// == Create a Custom GControl ==
function zoomInControl() { }
zoomInControl.prototype = new GControl();

// == This gets called bu the API when addControl(new YSlider()) is used ==
zoomInControl.prototype.initialize = function(map)
{
	// obtain Function Closure on a reference to "this"
	var that=this;
	// store a reference to the map so that we can call setZoom() on it
	this.map = map;

	// Is this MSIE, if so we need to use AlphaImageLoader
	var agent = navigator.userAgent.toLowerCase();
	if ((agent.indexOf("msie") > -1) && (agent.indexOf("opera") < 1)){this.ie = true} else {this.ie = false}

	// create the background graphic as a <div> containing an image
	var container = document.createElement("div");
	container.style.width="22px";
	container.style.height="22px";

	// Handle transparent PNG files in MSIE
	if (this.ie)
	{
		var loader = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.northwestidx.com/images/map/slider_plus.png', sizingMethod='scale');";
		container.innerHTML = '<a href="javascript:void(0);" onClick="clickZoomIn();" onMouseover="showtip(this,event,\'Zoom In\')" onMouseout="hidetip()"><div style="height:22px; width:22px; ' +loader+ '" ></div></a>';
		//container.innerHTML = '<a href="#" onClick="clickZoomIn();" onMouseover="showtip(this,event,\'Zoom In\')" onMouseout="hidetip()"><div style="height:22px; width:22px; ' +loader+ '" ></div></a>';

	}
	else
	{
		var tempInnerHTML = '<a href="javascript:void(0);" onClick="clickZoomIn();" onMouseover="showtip(this,event,\'Zoom In\')" onMouseout="hidetip()"><img src="http://www.northwestidx.com/images/map/slider_plus.png" width=22 height=22 border="0"/></a>';
		container.innerHTML = tempInnerHTML;
	}

	// attach the control to the map
	map.getContainer().appendChild(container);

	return container;
}

// == Set the default position for the control ==
zoomInControl.prototype.getDefaultPosition = function()
{
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(12, 40));
}

/*******************************************************************************************
// Zoom Out Controls
*******************************************************************************************/

// == Create a Custom GControl ==
function zoomOutControl() { }
zoomOutControl.prototype = new GControl();

// == This gets called bu the API when addControl(new YSlider()) is used ==
zoomOutControl.prototype.initialize = function(map)
{
	// obtain Function Closure on a reference to "this"
	var that=this;
	// store a reference to the map so that we can call setZoom() on it
	this.map = map;

	// Is this MSIE, if so we need to use AlphaImageLoader
	var agent = navigator.userAgent.toLowerCase();
	if ((agent.indexOf("msie") > -1) && (agent.indexOf("opera") < 1)){this.ie = true} else {this.ie = false}

	// create the background graphic as a <div> containing an image
	var container = document.createElement("div");
	container.style.width="22px";
	container.style.height="22px";

	// Handle transparent PNG files in MSIE
	if (this.ie)
	{
		var loader = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.northwestidx.com/images/map/slider_minus.png', sizingMethod='scale');";
		container.innerHTML = '<a href="javascript:void(0);" onClick="clickZoomOut();" onMouseover="showtip(this,event,\'Zoom Out\')" onMouseout="hidetip()"><div style="height:22px; width:22px; ' +loader+ '" ></div></a>';
	}
	else
	{
		var tempInnerHTML = '<a href="javascript:void(0);" onClick="clickZoomOut();" onMouseover="showtip(this,event,\'Zoom Out\')" onMouseout="hidetip()"><img src="http://www.northwestidx.com/images/map/slider_minus.png" width=22 height=22 border="0"/></a>';
		container.innerHTML = tempInnerHTML;
	}

	// attach the control to the map
	map.getContainer().appendChild(container);

	return container;
}

// == Set the default position for the control ==
zoomOutControl.prototype.getDefaultPosition = function()
{
	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(12, 226));
}


