/* CONFIG This code is from Dynamic Web Coding at http://www.dyn-web.com/ Copyright 2001-2 by Sharon Paine See Terms of Use at http://www.dyn-web.com/bus/terms.html Permission granted to use this code as long as this entire notice is included. */ var pgLoaded = false; var wndo = new Array(); // "window(s)" for scrollable content var wndin =new Array(); var origWidth, origHeight; if (document.layers) { origWidth = window.innerWidth; origHeight = window.innerHeight; window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); } } function initScrLyr() { pgLoaded=true; // creat scrollable content areas // arg: id of div containing scrollable div(s) wndo[0] = new dw_scrollObj('wn1');wndin[0]=73; wndo[1] = new dw_scrollObj('wn2');wndin[1]=333; wndo[2] = new dw_scrollObj('wn3');wndin[2]=593; // load scrolling content // arg's: array number of wndo, id of scroll div loadScrLyr(0,'w1c1'); loadScrLyr(1,'w2c1'); loadScrLyr(2,'w3c1'); if (navigator.userAgent.indexOf("Gecko")>-1) { for (var i=0; i-wndo[num].maxY) { wndo[num].cnt.shiftBy(0,-inc); scrTmId = setTimeout("inchDown("+num+","+inc+")",scrTimer); } } function inchUp(num,inc) { if (!pgLoaded||!wndo[num]) return; if (scrTmId) clearTimeout(scrTmId); var y = parseInt(wndo[num].cnt.css.top); if (y<0) { wndo[num].cnt.shiftBy(0,inc); scrTmId = setTimeout("inchUp("+num+","+inc+")",scrTimer); } } function inchRight(num,inc) { if (!pgLoaded||!wndo[num]) return; if (scrTmId) clearTimeout(scrTmId); var y = parseInt(wndo[num].cnt.css.left); if (y>-wndo[num].maxX) { wndo[num].cnt.shiftBy(-inc,0); scrTmId = setTimeout("inchRight("+num+","+inc+")",scrTimer); } } function inchLeft(num,inc) { if (!pgLoaded||!wndo[num]) return; if (scrTmId) clearTimeout(scrTmId); var y = parseInt(wndo[num].cnt.css.left); if (y<0) { wndo[num].cnt.shiftBy(inc,0); scrTmId = setTimeout("inchLeft("+num+","+inc+")",scrTimer); } } // These functions are for onclick scrolling function jumpDown(num,jump) { if (!pgLoaded||!wndo[num]) return; var y = parseInt(wndo[num].cnt.css.top); if (y>(-wndo[num].maxY)) { if ((y-jump)>(-wndo[num].maxY)) wndo[num].cnt.shiftBy(0,-jump); else wndo[num].cnt.shiftBy(0,-(wndo[num].maxY-Math.abs(y))); } } function jumpUp(num,jump) { if (!pgLoaded||!wndo[num]) return; var y = parseInt(wndo[num].cnt.css.top); if (y<0) { if ((y+jump)<=0) wndo[num].cnt.shiftBy(0,jump); else wndo[num].cnt.shiftBy(0,-y); } } function jumpRight(num,jump) { if (!pgLoaded||!wndo[num]) return; var x = parseInt(wndo[num].cnt.css.left); if (x>(-wndo[num].maxX)) { if ((x-jump)>(-wndo[num].maxX)) wndo[num].cnt.shiftBy(-jump,0); else wndo[num].cnt.shiftBy(-(wndo[num].maxX-Math.abs(x)),0); } } function jumpLeft(num,jump) { if (!pgLoaded||!wndo[num]) return; var x = parseInt(wndo[num].cnt.css.left); if (x<0) { if ((x+jump)<=0) wndo[num].cnt.shiftBy(jump,0); else wndo[num].cnt.shiftBy(-x,0); } } /* dw_scroll.js version date: July 2002 constructor and basic methods for scrollers This code is from Dynamic Web Coding at http://www.dyn-web.com/ Copyright 2001-2 by Sharon Paine See Terms of Use at http://www.dyn-web.com/bus/terms.html Permission granted to use this code as long as this entire notice is included. */ //////////////////////////////////////////////////////////////////// // Constructor function used for creating scrollable content areas. // Used to create both wndo and content objects. // Argument for creating wndo objects: id of wndo div. // Arguments for creating content (done in loadScrLyr function): // id of content div, id of html element that contains content. // NOTE: Netscape 6 needs that html container and its id // in order to get width for horizontal scrolling. // If only using vertical scrolling, that extra container // is not necessary. // You can set left/top in style sheet or pass it to constructor. // Width/height (and clip) need to be set in style sheet // (opera and ns4 can't reflow content) //////////////////////////////////////////////////////////////////// function dw_scrollObj(obj,id,x,y) { this.el = (document.getElementById)? document.getElementById(obj): (document.all)? document.all[obj]: (document.layers)? getLyrRef(obj,document): null; if (!this.el) return null; this.css = (this.el.style)? this.el.style: this.el; var px = (document.layers||window.opera)? "": "px"; this.x = x || 0; if (x) this.css.left = this.x+px; this.y = y || 0; if (y) this.css.top = this.y+px; this.width = (this.el.clientWidth)? this.el.clientWidth: (id && document.getElementById && document.getElementById(id).offsetWidth)? document.getElementById(id).offsetWidth: (this.el.offsetWidth)? this.el.offsetWidth: (this.css.clip.width)? this.css.clip.width: 0; this.height = (this.el.offsetHeight)? this.el.offsetHeight: (this.css.clip.height)? this.css.clip.height: 0; this.obj = obj + "Obj"; eval(this.obj+"=this"); } function dw_shiftTo(x,y) { if (x!=null) this.x=x; if (y!=null) this.y=y; if (this.css.moveTo) { this.css.moveTo(Math.round(this.x),Math.round(this.y)); } else { this.css.left=Math.round(this.x)+"px"; this.css.top=Math.round(this.y)+"px"; } } function dw_shiftBy(x,y) { this.shiftTo(this.x+x,this.y+y); } function dw_show() { this.css.visibility = "visible"; } function dw_hide() { this.css.visibility = "hidden"; } dw_scrollObj.prototype.shiftBy=dw_shiftBy; dw_scrollObj.prototype.shiftTo=dw_shiftTo; dw_scrollObj.prototype.show=dw_show; dw_scrollObj.prototype.hide=dw_hide; // get reference to nested layer for ns4 // from dhtmllib.js by Mike Hall of www.brainjar.com function getLyrRef(lyr,doc) { if (document.layers) { var theLyr; for (var i=0; i 0) if ((theLyr = getLyrRef(lyr,theLyr.document)) != null) return theLyr; } return null; } }