Dodik,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<div style="width:230px;margin-top:10px;"></div>
<div style="width:19px;float:left; height:19px;margin-left:5px;margin-top:3px;cursorointer;background: url('/images/color/black.gif');" onClick="getcolor('/catalog/img_loader/im/123701_man_black',123701);"></div>
<div style="width:19px;float:left; height:19px;margin-left:5px;margin-top:3px;cursorointer;background: url('/images/color/blue.gif');" onClick="getcolor('/catalog/img_loader/im/123701_man_blue',123701);"></div>
<script>
var a = document.getElementsByTagName('div'),
s = [];
for (var i = 0; i < a.length; i++) {
if (a[i].style.background) {
if (a[i].style.background.split(/\/|\./))
s.push(a[i].style.background.split(/\/|\./).splice(-2, 1))
}
}
document.write(s)
</script>
</body>
</html>