var slidePanelButtonHeight = 23; var slidePanelLinkTop = slidePanelButtonHeight+2; //add one button to a panel function sp_addLink(img, label, action) { this.img[this.img.length]=img; this.lbl[this.lbl.length]=label; this.act[this.act.length]=action; this.sta[this.sta.length]=0; return this } //test if scroll buttons should be visible function sp_testScroll() { var i=parseInt(this.obj.style.height); var j=parseInt(this.objf.style.height); var k=parseInt(this.objf.style.top); if (k==slidePanelLinkTop) this.objm1.style.visibility='hidden'; else this.objm1.style.visibility='visible'; if ((j+k)0) setTimeout(this.v+'.up('+nr+');',10); else this.testScroll(); } //scroll the panel content down function sp_down(nr) { this.ftop = this.ftop + 5; if (this.ftop>=slidePanelLinkTop) { this.ftop=slidePanelLinkTop; nr=0; } this.objf.style.top=(this.ftop+'px'); nr--; if (nr>0) setTimeout(this.v+'.down('+nr+');',10); else this.testScroll(); } //create one panel function createPanel(name,caption) { this.name=name; // panel layer ID this.ftop=slidePanelLinkTop; // actual panel scroll position this.obj=null; // panel layer object this.objc=null; // caption layer object this.objf=null; // panel field layer object this.objm1=null; // scroll button up this.objm2=null; // scroll button down this.caption=caption; // panel caption this.img=new Array(); // button images this.lbl=new Array(); // button labels this.act=new Array(); // button actions this.sta=new Array(); // button status (internal) this.addLink=sp_addLink; // add one button to panel this.testScroll=sp_testScroll; // test if scroll buttons should be visible this.up=sp_up; // scroll panel buttons up this.down=sp_down; // scroll panel buttons down this.v = this.name + "var"; // global var of 'this' eval(this.v + "=this"); return this } //add one panel to the slider function sp_addPanel(panel) { panel.name=this.name+'_panel'+this.panels.length this.panels[this.panels.length] = panel; } // Draw the slider function sp_draw() { document.body.style.marginLeft = this.width+'px'; var i; var j; var t=0; var h; var c=3; //slide panel document.write('
'); document.write('
'); h=this.height-((this.panels.length-1)*slidePanelButtonHeight) //one layer for every panel... for (i=0;i'); t=t+slidePanelButtonHeight; //one layer to host the panel links document.write('
'); mtop=0 for (j=0;j'); document.write('

icon'); document.write(' '+this.panels[i].lbl[j]); document.write('

'); mtop=mtop+this.buttonspace; } document.write('
'); document.write('') // scroll-up document.write(''); // scroll-down document.write(''); document.write('
') } document.write('') for (i=0;inr) { this.panels[i].obj.style.top=this.height-((l-i)*slidePanelButtonHeight)+"px"; } else { this.panels[i].obj.style.top=i*slidePanelButtonHeight+"px"; } } } function createSlidePanelBar(name) { //Added to allow support for xhtml transitional var docElement = document.documentElement; if (document.compatMode && document.compatMode == "BackCompat") { docElement = document.body; } this.aktPanel=0; // last open panel this.name=name; // name this.xpos=0; // bar x-pos this.ypos=0; // bar y-pos this.width=160; // bar width //this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:document.body.offsetHeight)-10; // bar height this.height=((navigator.appVersion.indexOf("MSIE ") == -1)?innerHeight:docElement.offsetHeight)-10; // bar height this.buttonspace=slidePanelButtonHeight-1; // distance of panel buttons this.panels=new Array(); // panels this.addPanel=sp_addPanel; // add new panel to bar this.draw=sp_draw; // write HTML code of bar this.showPanel=sp_showPanel; // make a panel visible this.v = name + "var"; // global var of 'this' eval(this.v + "=this"); return this; } function sp_createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function sp_readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function sp_eraseCookie(name) { sp_createCookie(name,"",-1); }