xAddEventListener(window, 'load', function () { var ha = xCreateElement('DIV'); ha.id = "HoveringAd"; // e.style.backgroundColor = "#FFFF00"; ha.style.padding = "0px"; ha.style.position = "absolute"; ha.style.visibility = "hidden"; ha.style.width = "160px"; ha.style.height = "300px"; xInnerHtml(ha, "
"); document.body.appendChild(ha); document.getElementById('theframe').style.height = "300px"; document.getElementById('theframe').style.width = "160px"; xVisibility('HoveringAd', true); winOnResize(); xAddEventListener(window, 'resize', winOnResize, false); xAddEventListener(window, 'scroll', winOnScroll, false); }, false ); function closeAd() { xVisibility('HoveringAd', false); } function winOnResize() { xMoveTo('HoveringAd', calculateXpos(), calculateYpos()); winOnScroll(); // initial slide } function winOnScroll() { xSlideTo('HoveringAd', calculateXpos(), calculateYpos(), 1000); } function calculateXpos() { return xClientWidth()-xWidth('HoveringAd') - 10; } function calculateYpos() { return xScrollTop() + xClientHeight()-xHeight('HoveringAd') - 10; } // XBrowser Functions below /* Compiled from X 4.17 by XC 1.06 on 17Nov07 */ xLibrary={version:'4.17',license:'GNU LGPL',url:'http://cross-browser.com/'}; // xAddEventListener r8, Copyright 2001-2007 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL function xAddEventListener(e,eT,eL,cap) { if(!(e=xGetElementById(e)))return; eT=eT.toLowerCase(); if(e.addEventListener)e.addEventListener(eT,eL,cap||false); else if(e.attachEvent)e.attachEvent('on'+eT,eL); else { var o=e['on'+eT]; e['on'+eT]=typeof o=='function' ? function(v){o(v);eL(v);} : eL; } } // xClientHeight r5, Copyright 2001-2007 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL function xClientHeight() { var v=0,d=document,w=window; if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientHeight) {v=d.documentElement.clientHeight;} else if(d.body && d.body.clientHeight) {v=d.body.clientHeight;} else if(xDef(w.innerWidth,w.innerHeight,d.width)) { v=w.innerHeight; if(d.width>w.innerWidth) v-=16; } return v; } // xClientWidth r5, Copyright 2001-2007 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL function xClientWidth() { var v=0,d=document,w=window; if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientWidth) {v=d.documentElement.clientWidth;} else if(d.body && d.body.clientWidth) {v=d.body.clientWidth;} else if(xDef(w.innerWidth,w.innerHeight,d.height)) { v=w.innerWidth; if(d.height>w.innerHeight) v-=16; } return v; } // xDef r1, Copyright 2001-2007 Michael Foster (Cross-Browser.com) // Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL function xDef() { for(var i=0; i