From 6d89d65cd87e2bea02146a25265e017b7b85ef90 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 12 Sep 2008 18:06:05 +0000 Subject: -better getElementById wrapper for IE --- program/js/common.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'program/js') diff --git a/program/js/common.js b/program/js/common.js index 649779746..1a5c0519c 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -639,21 +639,13 @@ if (bw.ie) document._getElementById = document.getElementById; document.getElementById = function(id) { - var a = []; + var i = 0; var o = document._getElementById(id); - while (o.id != id) - { - a.push({i:o.id,e:o}); - o.id = ''; - o = document._getElementById(id); - if (!o) return o; - } - - for (j=0,jj=a.length; j