var hexagonGreen1 = document.createElement('img');
hexagonGreen1.setAttribute("src", "image/battlefield/hexagonGreen.png");
hexagonGreen1.HName = 'hexagonGreen1';
hexagonGreen1.HColor = 'Green';
document.body.appendChild(hexagonGreen1);
function proverka(a) {
alert(a.HName);
alert(a.HColor);
};
hexagonGreen1.onclick = function(){ proverka(this); }