function Pan(nfo){

	this.nfo = nfo;

	this.create = function(x,y,id){	
		this.pho = document.createElement("img");
        this.setParam("globalx", x);
		this.setParam("globaly", y);
        this.updatesize();
		this.pho.id = "pa" + id;
		this.pho.className = "photo";
		this.pho.width = this.width;
		this.pho.height = this.height;
		this.id = id;
		this.pho.onmouseover = function(){allinfo.show("pan",map.pan[this.id.substr(2)].left, map.pan[this.id.substr(2)].top, map.pan[this.id.substr(2)].nfo)}
		this.pho.onmouseout = function(){allinfo.setInt(500);}
		this.pho.onclick = function(){map.info=0; allinfo.panBig()}
		map.layer7.appendChild(this.pho)
	}
	// марки закреплены глобально
	this.zooming = function(){
 	  	this.setParam("left", Math.round(this.globalx/(map.zoom/map.edge0)- this.width/2));
 		this.setParam("top", Math.round(this.globaly/(map.zoom/map.edge0)- this.height/2));
	}
    this.updatesize = function(){
        this.setSize();
		this.zooming();
	}
    this.setSize = function(){
    	if(map.level<=2){
            this.width = 32;
			this.height = 32;
			if(this.nfo.last==1){
				this.pho.src = constants['big_pan_icon_2'];
			}else{
				this.pho.src = constants['big_pan_icon'];
			}
		}
        if(map.level>=3){
	        this.width = 16;
			this.height = 16;
			if(this.nfo.last==1){
				this.pho.src = constants['small_pan_icon_2'];
			}else{
				this.pho.src = constants['small_pan_icon'];
			}
		}
	}
    this.setParam = function(attr, value){             					//параметры marka

          if (attr == "left") {
     	        this.left = value;
              	this.pho.style.left = value+"px";
          }
     	    if (attr == "top") {
     	        this.top = value;
              	this.pho.style.top = value+"px";
          }
          if (attr == "globalx") {
     	        this.globalx = value;
          }
     	  if (attr == "globaly") {
     	        this.globaly = value;
          }
        }
}
