// Elements
function elements(){this.items = new Array();}
elements.prototype.addElement = function(newItem){
	this.items[this.items.length] = newItem;
}

// Element
function element(newId, newFiles, newAttributes){
	this.id = newId;
	this.files = newFiles;
	this.attributes = newAttributes;
}

element.prototype.drawColors = function(){
  var counter = 0;
  var content = "<table border='0' cellspacing='1' cellpadding='1'>";
  content = content + "<tr>";
  for (i=0; i < this.attributes.length; i++){
     if (counter == 10){
	   content = content + "</tr><tr>";
	   counter = 0;
	 }
     content = content + "<td><table border='1' bordercolor='#FFFFFF'><tr><td><img src='dataNew/colors/color_" + this.attributes[i] + ".jpg' width='50' height='50' border='0' onMouseOver='javascript:otherColor(\"" + this.attributes[i] + "\")'></td></tr></table></td>";
	 counter++;
  }
  content = content + "</tr>";
  content = content + "</table>";
  colors.innerHTML = content;
}
