// Juice - Javascript User Interface Common Elements
// Copyright (C) 2007 IP Labs GmbH <http://www.iplabs.de/>
// $Id: Workarounds.js 84766 2009-10-07 15:17:52Z a.peters $
function Workarounds(){}Workarounds.u=[];Workarounds.v=0;
Workarounds.areElementsMasked=function(){return Workarounds.v!=0;};
Workarounds.maskElements=function(){var _;var a,b;
if(Workarounds.v>0){Workarounds.v++;return;}Workarounds.v=1;
if(navigator.appVersion.toLowerCase().indexOf("msie 6")>0){_=document.getElementsByTagName("select");
for(a=0,b=_.length;a<b;a++){Workarounds.w(_[a]);
}}if(window.opera!==undefined){Workarounds.x();
}else if(navigator.appVersion.toLowerCase().indexOf("khtml")<0){_=document.getElementsByTagName("object");
for(a=0,b=_.length;a<b;a++){Workarounds.w(_[a]);
}_=document.getElementsByTagName("applet");for(a=0,b=_.length;a<b;
a++){Workarounds.w(_[a]);}}else{Workarounds.x();}};
Workarounds.maskElementIfNeeded=function(r){if(Workarounds.areElementsMasked())Workarounds.w(r);
};Workarounds.w=function(r){var c;var d,e,f,g;var h;f=r.offsetWidth;f+=2;
g=r.offsetHeight;h=HTMLUtils.getDocumentOffset(r);d=h.x;d-=1;e=h.y;
c=document.createElement("iframe");c.src="javascript:''";c.frameBorder=0;
c.style.background="#fff";c.style.left=d+"px";c.style.top=e+"px";
c.style.width=f+"px";c.style.height=g+"px";c.style.position="absolute";
c.style.opacity=".0";c.style.mozOpacity=".0";c.style.khtmlOpacity=".0";
c.style.filter="alpha(opacity=0)";Workarounds.u.push(c);
document.body.appendChild(c);};Workarounds.unmaskElements=function(){var a,c,k;
if(!Workarounds.v){return;}if(Workarounds.v>1){Workarounds.v--;return;
}Workarounds.v=0;k=document.body;for(a=Workarounds.u.length;a>0;
a--){c=Workarounds.u.pop();k.removeChild(c);
}if(window.opera!==undefined){Workarounds.y();
}else if(navigator.appVersion.toLowerCase().indexOf("khtml")>0){Workarounds.y();
}};Workarounds.x=function(r){var _,a,b;
_=document.getElementsByTagName("object");for(a=0,b=_.length;a<b;
a++){_[a].hiddenVisibilityByMaskElements=true;_[a].style.visibility="hidden";
}_=document.getElementsByTagName("applet");for(a=0,b=_.length;a<b;
a++){_[a].hiddenVisibilityByMaskElements=true;_[a].style.visibility="hidden";}};
Workarounds.y=function(){var _,a,b;_=document.getElementsByTagName("object");
for(a=0,b=_.length;a<b;
a++){if(_[a].hiddenVisibilityByMaskElements){_[a].style.visibility="visible";
_[a].hiddenVisibilityByMaskElements=false;
}}_=document.getElementsByTagName("applet");for(a=0,b=_.length;a<b;
a++){if(_[a].hiddenVisibilityByMaskElements){_[a].style.visibility="visible";
_[a].hiddenVisibilityByMaskElements=false;}}};