
/*******************************************************************************************
// Zoom In Controls
*******************************************************************************************/
var mapSize;
var mapObject;

// == Create a Custom GControl ==
function small_zoomInControl(tempMapSize, tempMapObject) 
{ 
	mapSize = tempMapSize;
	mapObject = tempMapObject;
}

small_zoomInControl.prototype = new GControl();

// == This gets called bu the API when addControl(new YSlider()) is used ==
small_zoomInControl.prototype.initialize = function(small_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.small_map = small_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="small_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="small_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
	small_map.getContainer().appendChild(container);

	return container;
}

// == Set the default position for the control ==
small_zoomInControl.prototype.getDefaultPosition = function()
{
	if(mapSize == "small")
	{	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(8, 5));	}
	else if(mapSize == "large")
	{	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(8, 5));	}
	else
	{	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(12, 40));	}
}

/*******************************************************************************************
// Zoom Out Controls
*******************************************************************************************/

// == Create a Custom GControl ==
function small_zoomOutControl() { }

small_zoomOutControl.prototype = new GControl();

// == This gets called bu the API when addControl(new YSlider()) is used ==
small_zoomOutControl.prototype.initialize = function(small_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.small_map = small_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="small_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="small_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
	small_map.getContainer().appendChild(container);

	return container;
}

// == Set the default position for the control ==
small_zoomOutControl.prototype.getDefaultPosition = function()
{
	if(mapSize == "small")
	{	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(8, 26));	}
	else if(mapSize == "large")
	{	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(8, 191));	}
	else
	{	return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(12, 226));	}
}

/**
 *
 * @access public
 * @return void
 **/
function small_clickZoomIn() {	small_map.zoomIn();	}

/**
 *
 * @access public
 * @return void
 **/
function small_clickZoomOut() {	small_map.zoomOut();	}
