| | |
| | | var opcode = 0; |
| | | e = e || window.event; |
| | | |
| | | if (bw.mac && e) { |
| | | if (bw.mac && e) |
| | | opcode += (e.metaKey && CONTROL_KEY) + (e.shiftKey && SHIFT_KEY); |
| | | return opcode; |
| | | } |
| | | if (e) { |
| | | else if (e) |
| | | opcode += (e.ctrlKey && CONTROL_KEY) + (e.shiftKey && SHIFT_KEY); |
| | | return opcode; |
| | | } |
| | | |
| | | return opcode; |
| | | }, |
| | | |
| | | /** |
| | |
| | | break; |
| | | } |
| | | } |
| | | if (ret && ret.event) { |
| | | try { |
| | | delete ret.event; |
| | | } catch (err) { |
| | | // IE6-7 doesn't support deleting HTMLFormElement attributes (#1488017) |
| | | $(ret).removeAttr('event'); |
| | | } |
| | | } |
| | | } |
| | | |
| | | this._event_exec = false; |
| | | if (e.event) { |
| | | try { |
| | | delete e.event; |
| | | } catch (err) { |
| | | // IE6-7 doesn't support deleting HTMLFormElement attributes (#1488017) |
| | | $(e).removeAttr('event'); |
| | | } |
| | | } |
| | | |
| | | return ret; |
| | | } |
| | | |
| | |
| | | parent = arg.parent, |
| | | obj = document.createElement('DIV'); |
| | | |
| | | with (obj) { |
| | | id = this.name; |
| | | with (style) { |
| | | position = 'absolute'; |
| | | visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden'; |
| | | left = l+'px'; |
| | | top = t+'px'; |
| | | if (w) |
| | | width = w.toString().match(/\%$/) ? w : w+'px'; |
| | | if (h) |
| | | height = h.toString().match(/\%$/) ? h : h+'px'; |
| | | if (z) |
| | | zIndex = z; |
| | | } |
| | | } |
| | | obj.id = this.name; |
| | | obj.style.position = 'absolute'; |
| | | obj.style.visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden'; |
| | | obj.style.left = l+'px'; |
| | | obj.style.top = t+'px'; |
| | | if (w) |
| | | obj.style.width = w.toString().match(/\%$/) ? w : w+'px'; |
| | | if (h) |
| | | obj.style.height = h.toString().match(/\%$/) ? h : h+'px'; |
| | | if (z) |
| | | obj.style.zIndex = z; |
| | | |
| | | if (parent) |
| | | parent.appendChild(obj); |
| | |
| | | return out; |
| | | }; |
| | | |
| | | // make a string URL safe |
| | | // make a string URL safe (and compatible with PHP's rawurlencode()) |
| | | function urlencode(str) |
| | | { |
| | | return window.encodeURIComponent ? encodeURIComponent(str) : escape(str); |
| | | if (window.encodeURIComponent) |
| | | return encodeURIComponent(str).replace('*', '%2A'); |
| | | |
| | | return escape(str) |
| | | .replace('+', '%2B') |
| | | .replace('*', '%2A') |
| | | .replace('/', '%2F') |
| | | .replace('@', '%40'); |
| | | }; |
| | | |
| | | |
| | |
| | | return null; |
| | | } |
| | | else { |
| | | begin += 2; |
| | | begin += 2; |
| | | } |
| | | |
| | | var end = document.cookie.indexOf(";", begin); |
| | | var end = dc.indexOf(";", begin); |
| | | if (end == -1) |
| | | end = dc.length; |
| | | |
| | |
| | | return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); |
| | | }; |
| | | |
| | | // Extend Date prototype to detect Standard timezone without DST |
| | | // from http://www.michaelapproved.com/articles/timezone-detect-and-ignore-daylight-saving-time-dst/ |
| | | Date.prototype.getStdTimezoneOffset = function() |
| | | { |
| | | var m = 12, |
| | | d = new Date(null, m, 1), |
| | | tzo = d.getTimezoneOffset(); |
| | | |
| | | while (--m) { |
| | | d.setUTCMonth(m); |
| | | if (tzo != d.getTimezoneOffset()) { |
| | | return Math.max(tzo, d.getTimezoneOffset()); |
| | | } |
| | | } |
| | | |
| | | return tzo; |
| | | } |
| | | |
| | | // Make getElementById() case-sensitive on IE |
| | | if (bw.ie) |