/////////  Map Size Control for Google Maps, V2  (Javascript) ///////
/*
 July 29, 2007
 Jeff Hennick
 Copyright 2007 Jeffrey L. Hennick
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

 See http://www.gnu.org/copyleft/gpl.html
*/
var HSC=1.2
var HIP="";var HSP="";
HSizeControl.prototype = new GControl()
function HSizeControl(q,p){q=(typeof(q)==undefined||q==""||q==null)?'LARGE':q;HSP=(q=="LARGE")?new GSize(80,7):(q="SMALL")?new GSize(50,9):q;if(typeof(p)==undefined)p=HIP;HIP=p;if(HIP!=''&&HIP[HIP.length-1]!="/")HIP+="/"}
HSizeControl.prototype.initialize = function(m){
var c=document.createElement("div")
var a=document.createElement("div")
c.appendChild(a)
var b=document.createElement("img")
b.style.cursor='pointer'
b.src=HIP+'hscwidths.png'
b.alt='N'
b.title='Narower Map'
a.appendChild(b)
GEvent.addDomListener(a,"click",function(){var c=m.getCenter();m.getContainer().style.width=parseInt(m.getContainer().style.width)/HSC+'px';m.checkResize();m.setCenter(c);})
a=document.createElement("div")
c.appendChild(a)
b=document.createElement("img")
b.src=HIP+'hscwidthl.png'
b.alt='W'
b.style.position='absolute'
b.style.top='20px'
b.style.left='0px'
b.style.cursor='pointer'
b.title='Wider Map'
a.appendChild(b)
GEvent.addDomListener(b,"click",function(){var c=m.getCenter();m.getContainer().style.width=HSC*parseInt(m.getContainer().style.width)+'px';m.checkResize();m.setCenter(c);})
a=document.createElement("div")
c.appendChild(a)
b=document.createElement("img")
b.src=HIP+'hscheights.png'
b.alt='S'
b.style.position='absolute'
b.style.top='0px'
b.style.left='20px'
b.style.cursor='pointer'
b.title='Shorter Map'
a.appendChild(b)
GEvent.addDomListener(b,"click",function(){var c=m.getCenter();m.getContainer().style.height=parseInt(m.getContainer().style.height)/HSC+'px';m.checkResize();m.setCenter(c);})
a=document.createElement("div")
c.appendChild(a)
b=document.createElement("img")
b.src=HIP+'hscheightl.png'
b.alt='T'
b.style.position='absolute'
b.style.top='20px'
b.style.left='20px'
b.style.cursor='pointer'
b.title='Taller Map'
a.appendChild(b)
GEvent.addDomListener(a,"click",function(){var c=m.getCenter();m.getContainer().style.height=HSC*parseInt(m.getContainer().style.height)+'px';m.checkResize();m.setCenter(c);})
m.getContainer().appendChild(c)
return c
}
HSizeControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,HSP);}
function HSizeStep(n){var o=HSC;if(n>1)HSC=n;return o}
