// -- Configuration ------- //var fireFoxHeightAdd = 161 // Firefox drukcije gleda sirinu pa ce ova postavka ispraviti jump nakon prvog kruga skripte var clipTop = 0; var clipWidth = 181; var clipBottom = 350; //var clipBottom = 139; var lyrheight = 580; // ------------------------ var topper = 0; var startClipTop = clipTop; var startClipBottom = clipBottom; var startTopper = topper; var time, amount, theTime, theHeight, DHTML; function init(layername) { DHTML = (document.getElementById || document.all || document.layers) if (!DHTML) return; var x = new getObj(layername); if (document.layers) { x.style.clip.top = clipTop; x.style.clip.left = 0; x.style.clip.right = clipWidth; x.style.clip.bottom = clipBottom; } else if (document.getElementById || document.all) { x.style.clip = 'rect(' + clipTop + ' ' + clipWidth + ' ' + clipBottom + ' 0)' } } function scrollayer(layername, amt, tim) { if (!DHTML) return; thelayer = new getObj(layername); if (!thelayer) return; amount = amt; theTime = tim; realscroll(); } function realscroll() { if (!DHTML) return; clipTop += amount; clipBottom += amount; topper -= amount; var height = clipBottom - clipTop; if (clipTop <= 0 || clipBottom > (lyrheight / 2 + (clipBottom - clipTop) + 10)) { clipTop = startClipTop; clipBottom = startClipBottom; topper = startTopper; } if (document.getElementById || document.all) { clipstring = 'rect(' + clipTop + ' ' + clipWidth + ' ' + clipBottom + ' 0)' thelayer.style.clip = clipstring; thelayer.style.top = topper; } else if (document.layers) { thelayer.style.clip.top = clipTop; thelayer.style.clip.bottom = clipBottom; thelayer.style.top = topper; } time = setTimeout('realscroll()',theTime); } function stopScroll() { if (time) clearTimeout(time); } function vis(layername, val) { if (!DHTML) return; var f = new getObj(layername); f.style.visibility = val; } function getObj(name) { if (document.getElementById) { this.obj = document.getElementById(name); this.style = document.getElementById(name).style; } else if (document.all) { this.obj = document.all[name]; this.style = document.all[name].style; } else if (document.layers) { this.obj = document.layers[name]; this.style = document.layers[name]; } }