rem: if (form) { form.onsubmit = form_submit;  var drag = document.getElementById('drag'); 
add: if (form) form.onsubmit = form_submit; if (drag) { 
context: function onLoad() {    // var Log = new YAHOO.widget.LogReader();    var compass = document.getElementById('compass');    if (compass) {        var points = compass.getElementsByTagName('a');        points[1].onclick = function() { pan(0, tileheight); return false; };        points[3].onclick = function() { pan(tilewidth, 0); return false; };        points[4].onclick = function() { pan(-tilewidth, 0); return false; };        points[6].onclick = function() { pan(0, -tileheight); return false; };        points[0].onclick = function() { pan(tilewidth, tileheight); return false; };        points[2].onclick = function() { pan(-tilewidth, tileheight); return false; };        points[5].onclick = function() { pan(tilewidth, -tileheight); return false; };        points[7].onclick = function() { pan(-tilewidth, -tileheight); return false; };    }    var form = document.getElementById('mapForm');    if (form) {        form.onsubmit = form_submit;        var drag = document.getElementById('drag');        var inputs = drag.getElementsByTagName('input');        for (var i=0; i<inputs.length; i++) {                inputs[i].onclick = drag_check;        }                var url = '/tilma/tileserver/10k-full-london/' + x + '-' + (x+5) + ',' + y + '-' + (y+5) + '/JSON';        var req = mySociety.asyncRequest(url, urls_loaded);        var map = document.getElementById('map');        map.onmousedown = drag_start;        document.onmouseout = drag_end_out;    }}
meta: 9585	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9585/ba8c61f5ee2c9fe624a2e5d53f74835647c42c94/js2.js/buggy/web/js2.js