function Object(nfo){

	this.nfo = nfo;

	this.create = function(x,y,id){
		this.obj = document.createElement("img");
        this.setParam("globalx", x);
		this.setParam("globaly", y);
		this.updatesize();
		this.obj.id = "ob" + id;
		this.obj.className = "photo";
		this.obj.src = this.src;
		this.obj.width = this.width;
		this.obj.height = this.height;
  		this.setParam("top", y/map.zoom*map.edge0 - this.height/2);
		this.setParam("left", x/map.zoom*map.edge0 - this.width/2);

//  		this.setParam("top", y/map.zoom*map.edge0 - this.height/2+constants['min_coord_y']/map.zoom*map.edge0);
//		this.setParam("left", x/map.zoom*map.edge0 - this.width/2+constants['min_coord_x']/map.zoom*map.edge0);

		this.id = id;

   	 	this.obj.onmouseover = function(){allinfo.show("object",map.obj[this.id.substr(2)].left, map.obj[this.id.substr(2)].top, map.obj[this.id.substr(2)].nfo)}
		this.obj.onmouseout = function(){allinfo.setInt(500);}
		this.obj.onclick = function(){map.info=0; showObjectId(map.obj[this.id.substr(2)].nfo["id"]);}
		map.layer6.appendChild(this.obj)
	}
	// марки закреплены глобально
	this.zooming = function(){
 	  	this.setParam("left", Math.round(this.globalx/(map.zoom/map.edge)- this.width/2));
 		this.setParam("top", Math.round(this.globaly/(map.zoom/map.edge)- this.height/2));
	}
    this.updatesize = function(){
		this.setSize();
		this.zooming();

	}
	this.setSize = function(){
    	if(map.level<=2){
            this.width = 40;
			this.height = 40;
			this.src = icons[nfo.icon].big
			if(this.nfo["search"]==1 || this.nfo["plus"]==1)
				this.src = icons[nfo.icon].big_s
		}
        if(map.level>2 && map.level<5){
            this.width = 25;
			this.height = 25;
			this.src = icons[nfo.icon].small
            if(this.nfo["search"]==1 || this.nfo["plus"]==1)
				this.src = icons[nfo.icon].small_s
		}
		 if(map.level>4){
            this.width = 18;
			this.height = 18;
			this.src = icons[nfo.icon].small
            if(this.nfo["search"]==1 || this.nfo["plus"]==1)
				this.src = icons[nfo.icon].small_s
		}
	}
    this.setParam = function(attr, value){             					//параметры marka
          if (attr == "left") {
     	        this.left = value;
              	this.obj.style.left = value+"px";
          }
     	    if (attr == "top") {
     	        this.top = value;
              	this.obj.style.top = value+"px";
          }
          if (attr == "globalx") {
     	        this.globalx = value;
          }
     	  if (attr == "globaly") {
     	        this.globaly = value;
          }
        }
}