| | |
| | | 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)); |
| | |
| | | { |
| | | return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); |
| | | } |
| | | |
| | | |
| | | // Make getElementById() case-sensitive on IE |
| | | if (bw.ie) |
| | | { |
| | | document._getElementById = document.getElementById; |
| | | document.getElementById = function(id) |
| | | { |
| | | var i = 0; |
| | | var o = document._getElementById(id); |
| | | |
| | | if (!o || o.id != id) |
| | | while ((o = document.all[i]) && o.id != id) |
| | | i++; |
| | | |
| | | return o; |
| | | } |
| | | } |
| | | |
| | | |
| | | // Fire event on specified element |
| | | function exec_event(element,event) |
| | | { |
| | | if (document.createEventObject) { |
| | | // dispatch for IE |
| | | var evt = document.createEventObject(); |
| | | return element.fireEvent('on'+event,evt) |
| | | } |
| | | else { |
| | | // dispatch for firefox + others |
| | | var evt = document.createEvent("HTMLEvents"); |
| | | evt.initEvent(event, true, true); // event type,bubbling,cancelable |
| | | return !element.dispatchEvent(evt); |
| | | } |
| | | } |