// JavaScript Document
//funkce vrati objektu full view kontrol
//ktery nasledne instanucji
//diky tomu mohu nahrat skript jiz pred tim nez
//je vytvoren objekt google map
//je to yatim verze pro map api V# kde nepodporuji custom controls
  function FullViewControl(map,FullZoom,xOffset,yOffset,widht,height){
    _fullLatCenter=this.fullLatCenter=49.817492;
    _fullLngCenter=this.fullLngCenter=15.472962;
    _FullZoom=this.FullZoom=FullZoom
    this.xOffset=xOffset;
    this.yOffset=yOffset;
    this.widht=widht|30;
    this.height=height|30;;
    this._div=null //content holder for control img
    this._img="../obr/FullViewImg.jpeg ";
    this.map=map
    this.mapDiv=map.getDiv();
    this._initEvent=false;
    var div=document.createElement('div');
    div.style.position = "absolute";
    div.style.background="#E9E9E9";
    div.style.border="1px solid #97979A";
    div.style.left=this.xOffset +"px";
    div.style.top=this.yOffset +"px";
    div.style.width=this.widht +"px";
    div.style.height=this.height +"px";
    div.style.zIndex=3000;
    var img=document.createElement("img"); //image with graphic repre. of control
    img.src = this._img;
    img.style.width = "100%";
    img.style.height = "100%";
    img.title="Full view";
    div.appendChild(img);
    _map=this.map;
    div.onclick=function(){
        _map.setZoom(_FullZoom);
        _map.setCenter(new google.maps.LatLng(_fullLatCenter,_fullLngCenter));
        window.actZoomID=null;
        for(arg in window.Markers){
            window.Markers[arg].active=false;
            window.Markers[arg].setIcon(MarkersIcons.normal);
            window.infowindow.close()
          }
      }
    img.onmouseover=function(){
      this.style.cursor="pointer";
      }
    img.onmouseout=function(){
      this.style.cursor="auto";
      }
    this._div=div;  
    this.mapDiv.appendChild(this._div);  
  }
