var TagFactory = new function TagFactory(){
	var instance = this;
	TagFactory.getInstance = function(){
		return instance;
	};

	var containerCounter = 0;
	
	this.createDiv = function(rootContainer){
		var t = document.createElement("div");
		var nextId = "tagFactory" + containerCounter + "Div";
		containerCounter ++;
		t.setAttribute("id", nextId);
		//t.setAttribute("style", "position:absolute;left:0;top:0;border-style:none;border-color:black;");
		rootContainer.appendChild(t);
		return t;
	};
	this.createImg = function(rootContainer){
		var t = document.createElement("img");
		var nextId = "tagFactory" + containerCounter + "Img";
		containerCounter ++;
		t.setAttribute("id", nextId);
		//t.setAttribute("style", "position:absolute;left:0;top:0;");
		rootContainer.appendChild(t);
		return t;
	};
	return TagFactory;
};

var tagFactory = TagFactory.getInstance();
