function _setOpacity(_obj,_value) { _obj.style.opacity = _value/10;// CSS3 _obj.style.filter = 'alpha(opacity=' + _value*10 + ')';//ie5.5 _obj.style.MozOpacity = _value/10;// Gecko _obj.style.KhtmlOpacity = _value/10;// Konquerer and Safari } function shimObject(text){ this._shim = document.createElement("DIV"); //.appendChild(this._shim); this._shim.style.position="absolute"; this._shim.style.left="0"; this._shim.style.top="0"; this._shim.style.width="100%"; this._shim.style.height="100%"; this._shim.style.backgroundColor="white"; this._shim.style.zIndex=30; _setOpacity(this._shim,7); this._frameShim=document.createElement("IFRAME"); this._frameShim.style.position="absolute"; this._frameShim.style.left="0"; this._frameShim.style.top="0"; this._frameShim.style.width="100%"; this._frameShim.style.height="100%"; _setOpacity(this._frameShim,0); this._shim.appendChild(this._frameShim); this._layer=document.createElement('DIV'); this._layer.style.position="absolute"; this._layer.style.left="0"; this._layer.style.top="0"; this._layer.style.width="100%"; this._layer.style.height="100%"; this._layer.style.zIndex=31; this._table=document.createElement('TABLE'); this._table.className='causeTable'; this._table.style.width="100%"; this._table.style.height="100%"; this._layer.appendChild(this._table); this._tbody=document.createElement('TBODY'); this._table.appendChild(this._tbody); this._row=document.createElement('TR'); this._tbody.appendChild(this._row); this.cell=document.createElement('TD'); this._row.appendChild(this.cell); this.cell.align="center"; this.cell.vAlign="middle"; this.cell.style.fontSize="40pt"; this.cell.style.fontWeight = 'bolder'; if(text) this.cell.innerHTML=text; else this.cell.innerHTML="Loading"; //document.body.appendChild(this._layer); this._onScroll= function(){ var currentOffset = document.documentElement.scrollTop || document.body.scrollTop; // body for Safari var currentLeftOffset = document.documentElement.scrollLeft || document.body.scrollLeft; // body for Safari //self._shim.style.top=currentOffset+"px"; //self._shim.style.left=currentLeftOffset+"px"; self._layer.style.top=0;//currentOffset+"px"; self._layer.style.left=0;//currentLeftOffset+"px"; } this._onResize= function(){ width=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth; height=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight; docWidth=(document.documentElement.scrollWidth>document.body.scrollWidth)?document.documentElement.scrollWidth:document.body.scrollWidth; docHeight=(document.documentElement.scrollHeight>document.body.scrollHeight)?document.documentElement.scrollHeight:document.body.scrollHeight; self._layer.style.width=width +"px"; self._shim.style.width=(width>docWidth)?width:docWidth +"px"; self._layer.style.height=height +"px"; self._shim.style.height=(height>docHeight)?height:docHeight +"px"; } this.show = function(){ document.body.appendChild(self._shim); document.body.appendChild(self._layer); window.onscroll = document.documentElement.onscroll = self._onScroll; window.onresize = self._onResize; self._onScroll(); self._onResize(); } this.hide = function(){ //try { document.body.removeChild(self._shim); document.body.removeChild(self._layer); window.onscroll = document.documentElement.onscroll = null; window.onresize = null; //} catch (err) { //} } var self=this; }