add: img.onclick = drag_check; 
context: function urls_loaded(o) {    if (o.readyState != 4) return;    var tiles = eval(o.responseText);    var drag = document.getElementById('drag');    for (var i=0; i<6; i++) {        var ii = (i + tile_y) % 6;        for (var j=0; j<6; j++) {            var jj = (j + tile_x) % 6;            var id = 't'+ii+'.'+jj;            var xx = x+j;            var yy = y+5-i;            var img = document.getElementById(id);            if (img) {                if (!img.galleryimg) { img.galleryimg = false; }                img.src = 'http://tilma.mysociety.org/tileserver/10k-full-london/' + tiles[i][j];                img.name = 'tile_' + xx + '.' + yy;                continue;            }            img = document.createElement('input');            img.type = 'image';            img.src = 'http://tilma.mysociety.org/tileserver/10k-full-london/' + tiles[i][j];            img.name = 'tile_' + xx + '.' + yy;            img.id = id;            img.onclick = drag_check;            img.style.position = 'absolute';            img.style.width = tilewidth + 'px';            img.style.height = tileheight + 'px';            img.style.top = ((ii-2)*tileheight) + 'px';            img.style.left = ((jj-2)*tilewidth) + 'px';            img.galleryimg = false;            img.alt = 'Loading...';            drag.appendChild(img);        }    }}
meta: 9585	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9585/ba8c61f5ee2c9fe624a2e5d53f74835647c42c94/js2.js/buggy/web/js2.js