From ddd894dbe86c678076b51fc10a9ef8a655f29d68 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 19 Sep 2008 14:00:51 -0400
Subject: [PATCH] - small fix

---
 program/js/common.js |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/program/js/common.js b/program/js/common.js
index 6497797..5049061 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -49,6 +49,7 @@
   this.ie4 = (this.ie && !this.dom);
   this.ie5 = (this.dom && this.appver.indexOf('MSIE 5')>0);
   this.ie6 = (this.dom && this.appver.indexOf('MSIE 6')>0);
+  this.ie7 = (this.dom && this.appver.indexOf('MSIE 7')>0);
 
   this.mz = (this.dom && this.ver>=5);  // (this.dom && this.product=='Gecko')
   this.ns = ((this.ver<5 && this.name=='Netscape') || (this.ver>=5 && this.vendor.indexOf('Netscape')>=0));
@@ -639,21 +640,13 @@
   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;
-      }
+    if (!o || o.id != id)
+      while ((o = document.all[i]) && o.id != id)
+        i++;
 
-    for (j=0,jj=a.length; j<jj; j++)
-      a[j].e.id = a[j].i;
-
-    a = null;
     return o;
     }
   }

--
Gitblit v1.9.1