function Sticker(nfo){

	this.nfo = nfo;

	this.create = function(x,y,id){                         //создать марку

		this.stick = document.createElement("img");
		this.setSize();
		this.stick.id = "st" + id;
		this.stick.className = "sticker";
		this.stick.width = this.width;
		this.stick.height = this.height;
		this.setParam("top", y - this.height/2);
		this.setParam("left", x - this.width/2);
		this.id = id;
        this.setParam("globalx", Math.floor(x*map.zoom/map.edge));
		this.setParam("globaly", Math.floor(y*map.zoom/map.edge));
		this.stick.onmouseover = function(){allinfo.show("sticker",map.sticker[this.id.substr(2)].left, map.sticker[this.id.substr(2)].top, map.sticker[this.id.substr(2)].nfo,map.sticker[this.id.substr(2)].nfo["background"]);}
		this.stick.onmouseout = function(){allinfo.setInt(500);}
		this.stick.onclick = function(){map.info=0;}
		map.layer5.appendChild(this.stick);
		this.updatesize();
	}
	this.zooming = function(){
 	  	this.setParam("left", this.globalx/(map.zoom/map.edge));
 		this.setParam("top", this.globaly/(map.zoom/map.edge));
	}
    this.del = function(){
 	  	this.stick.parentNode.removeChild(this.pho);
	}
    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.stick.src = constants['big_sticker_icon_2'];
			}else{
				this.stick.src = constants['big_sticker_icon'];
			}
		}
        if(map.level>=3){
	        this.width = 16;
			this.height = 16;
			if(this.nfo.last==1){
				this.stick.src = constants['small_sticker_icon_2'];
			}else{
				this.stick.src = constants['small_sticker_icon'];
			}
		}
	}
    this.setParam = function(attr, value){             					//параметры marka
     	  if (attr == "width") {
      	        this.width = value;
              	this.stick.width = value;
          }
     	  if (attr == "height") {
     	        this.height = value;
              	this.stick.height = value;
          }
          if (attr == "left") {
     	        this.left = value;
              	this.stick.style.left = value+"px";
          }
     	  if (attr == "top") {
     	        this.top = value;
              	this.stick.style.top = value+"px";
          }
          if (attr == "globalx") {
     	        this.globalx = value;
          }
     	  if (attr == "globaly") {
     	        this.globaly = value;
          }
        }
}