summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/common.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 69a2d579e..7ef183c93 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -598,13 +598,14 @@ if (bw.ie)
document._getElementById = document.getElementById;
document.getElementById = function(id)
{
- var i = 0;
- var o = document._getElementById(id);
+ var i = 0, obj = document._getElementById(id);
- if (!o || o.id != id)
- while ((o = document.all[i]) && o.id != id)
- i++;
+ if (!obj || obj.id == id)
+ return obj;
- return o;
+ while ((obj = document.all[i]) && obj.id != id)
+ i++;
+
+ return obj;
}
};