viewport = { getWinWidth: function () { this.width = 0; if (window.innerWidth) this.width = window.innerWidth - 18; else if (document.documentElement && document.documentElement.clientWidth) this.width = document.documentElement.clientWidth; else if (document.body && document.body.clientWidth) this.width = document.body.clientWidth; }, getWinHeight: function () { this.height = 0; if (window.innerHeight) this.height = window.innerHeight - 18; else if (document.documentElement && document.documentElement.clientHeight) this.height = document.documentElement.clientHeight; else if (document.body && document.body.clientHeight) this.height = document.body.clientHeight; }, getScrollX: function () { this.scrollX = 0; if (typeof window.pageXOffset == 'number') this.scrollX = window.pageXOffset; else if (document.documentElement && document.documentElement.scrollLeft) this.scrollX = document.documentElement.scrollLeft; else if (document.body && document.body.scrollLeft) this.scrollX = document.body.scrollLeft; else if (window.scrollX) this.scrollX = window.scrollX; }, getScrollY: function () { this.scrollY = 0; if (typeof window.pageYOffset == 'number') this.scrollY = window.pageYOffset; else if (document.documentElement && document.documentElement.scrollTop) this.scrollY = document.documentElement.scrollTop; else if (document.body && document.body.scrollTop) this.scrollY = document.body.scrollTop; else if (window.scrollY) this.scrollY = window.scrollY; }, getAll: function () { this.getWinWidth(); this.getWinHeight(); this.getScrollX(); this.getScrollY(); }} dw_Banner.restartDelay = 500; dw_Banners = {}; function dw_Banner(id, delay, bMouse) { this.id = id; this.delay = delay; this.items = []; this.ctr = 0; this.timer = null; dw_Banners[this.id] = this; this.animString = 'dw_Banners.' + this.id; if (bMouse) dw_Banner.setMouseEvents(this.id);}; dw_Banner.prototype.addItem = function(sHtml) { this.items[this.items.length] = sHtml;}; dw_Banner.prototype.rotate = function() { clearTimeout(this.timer); this.timer = null; var el = document.getElementById(this.id); if ( el && typeof el.innerHTML != 'undefined' ) { el.innerHTML = this.items[this.ctr]; if (this.ctr < this.items.length-1) this.ctr++; else this.ctr = 0; this.timer = setTimeout(this.animString + '.rotate()', this.delay); }}; dw_Banner.setMouseEvents = function(id) { var el = document.getElementById(id); if (el) { el.onmouseover = dw_Banner.pause; el.onmouseout = dw_Banner.resume; }}; dw_Banner.pause = function() { var curObj = dw_Banners[this.id]; if (curObj) { clearTimeout(curObj.timer); curObj.timer = null; }}; dw_Banner.resume = function(e) { e = e? e: window.event; var toEl = e.relatedTarget? e.relatedTarget: e.toElement; if ( this != toEl && !dw_contained(toEl, this) ) { var curObj = dw_Banners[this.id]; if (curObj) curObj.timer = setTimeout(curObj.animString + '.rotate()', dw_Banner.restartDelay); }}; function showad(ban1){ var curObj = ban1; if (curObj) curObj.timer = setTimeout(curObj.animString + '.rotate()', dw_Banner.restartDelay);} function dw_contained(oNode, oCont) { if (!oNode) return; while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true; return false;};function stopad(ban1,i){var curObj=ban1; var el = document.getElementById(ban1.id); if (el) { clearTimeout(curObj.timer); curObj.timer = null; ban1.ctr=i; el.innerHTML = ban1.items[i]; }}; var imageHandler = { path:'', imgs:[], preload:function() { for(var i=0;arguments[i];i++) { var img=new Image(); img.src=this.path+arguments[i]; this.imgs[this.imgs.length]=img;}}}; var menuLayers = { timer: null, activeMenuID: null, offX: 4, offY: 6, show: function(id, e) { var mnu = document.getElementById? document.getElementById(id): null; if (!mnu) return; this.activeMenuID = id; if ( mnu.onmouseout == null ) mnu.onmouseout = this.mouseoutCheck; if ( mnu.onmouseover == null ) mnu.onmouseover = this.clearTimer; viewport.getAll(); this.position(mnu,e); }, hide: function() { this.clearTimer(); if (this.activeMenuID && document.getElementById) this.timer = setTimeout("document.getElementById('"+menuLayers.activeMenuID+"').style.visibility = 'hidden'", 200); }, position: function(mnu, e) { var x = e.pageX? e.pageX: e.clientX + viewport.scrollX; var y = e.pageY? e.pageY: e.clientY + viewport.scrollY; if ( x + mnu.offsetWidth + this.offX > viewport.width + viewport.scrollX ) x = x - mnu.offsetWidth - this.offX; else x = x + this.offX; if ( y + mnu.offsetHeight + this.offY > viewport.height + viewport.scrollY ) y = ( y - mnu.offsetHeight - this.offY > viewport.scrollY )? y - mnu.offsetHeight - this.offY : viewport.height + viewport.scrollY - mnu.offsetHeight; else y = y + this.offY; mnu.style.left = x + 'px'; mnu.style.top = y + 'px'; this.timer = setTimeout("document.getElementById('" + menuLayers.activeMenuID + "').style.visibility = 'visible'", 200); }, mouseoutCheck: function(e) { e = e? e: window.event; var mnu = document.getElementById(menuLayers.activeMenuID); var toEl = e.relatedTarget? e.relatedTarget: e.toElement; if ( mnu != toEl && !menuLayers.contained(toEl, mnu) ) menuLayers.hide(); }, contained: function(oNode, oCont) { if (!oNode) return; while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true; return false; }, clearTimer: function() { if (menuLayers.timer) clearTimeout(menuLayers.timer); }} function showDivs(divid){var divobj=document.getElementById(divid); var tag=divobj.style.display; if(tag=='' || tag=='block' ) { divobj.style.display='none'; return false; } else { divobj.style.display='block'; return true; }}