} else if(cmd=='fc') { // set focus
_focus = data;
} else if(cmd=='js') { // evaluate js code
- setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8
+ __isGecko ? eval(data) : setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8
} else if(cmd=='rd') { // client-side redirection
window.location = data;
} else if(cmd=='pu') { // pop-up
return t;
}
-var __isFireFox = navigator.userAgent.match(/gecko/i);
+var __isGecko = navigator.userAgent.match(/gecko/i); // i.e. Gecko or KHTML, like Gecko ;)
//returns the absolute position of some element within document
function element_pos(e) {
var res = new Object();
res.y -= offsetParent.scrollTop;
}
//next lines are necessary to support FireFox problem with offsetParent
- if (__isFireFox) {
+ if (__isGecko) {
while (offsetParent != parentNode && parentNode !== null) {
res.x -= parentNode.scrollLeft;
res.y -= parentNode.scrollTop;