/**
  * Script contains functions that return objects for GMaps API
  *
  * date: 30-10-2007
  *
  */

/**
  *
  * Function returns a dragZoomControl object that can be added as a map control
  *
  * map.addControl(DragZoom = getDragZoomControl(), 
  *        new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(80,45)));
  *
  *
  * @return new DragZoomControl, object
  *
  */
function getDragZoomControl(){
	//
	//for more information see: http://gmaps-utility-library.googlecode.com/svn/trunk/dragzoom/release/
	//
	
	// Set DragZoomControl optionions for the drag rectangle. (map overlay)
	var boxStyleOpts = {
		opacity:.2,
		border:"2px solid red"
	}
	
	// Set DragZoomControl options for the dragzoom icon
	var otherOpts = {
		buttonHTML:"<img src='./gfx/gmaps/zoom-button.gif' />",
		buttonZoomingHTML:"<img src='./gfx/gmaps/zoom-button-activated.gif' />",
		buttonStartingStyle:{width:'24px',height:'24px'}	
	};
	
	// Set DragZoomControl options for callbacks
	var callbacks = {
		//buttonclick:function(){display("Looks like you activated DragZoom!")},
		//dragstart:function(){display("Started to Drag . . .")},
		//dragging:function(x1,y1,x2,y2){display("Dragging, currently x="+x2+",y="+y2)},
		//dragend:function(nw,ne,se,sw,nwpx,nepx,sepx,swpx){display("Zoom! NE="+ne+";SW="+sw)}
	};

	//create dragZoomControl object with the above created variables
	return new DragZoomControl(boxStyleOpts, otherOpts, callbacks);
}//end function getDragZoomControl
