Nu er set lykkedes at få fingre i det rette script. Jeg poster det her til hjælp for andre.
Tak til dig, Jakoba!
--
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<style type=\"text/css\">
#divSimpleScroller1Control{position:absolute; width:40; left:330; top:10; z-index:1; text-align: right}
#divSimpleScroller1Container{position:absolute; width:320; height:240; overflow:hidden; top:10; left:10; clip:rect(0,320,240,0); font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 11px}
</style>
<script language=\"JavaScript\">
//
// begin revised absolutely positioned simple scroller object scripts
// Extension developed by David G. Miles
// Dreamweaver Extensions available from:
http://www.z3roadster.net/dreamweaver/ // Original Simple Scroll code developed by Aaron Boodman
// dHTML Scripts available from:
http://www.youngpup.net/ //
ypSimpleScroll.prototype.scrollVerticallyUp = function() { this.startScroll(90) }
ypSimpleScroll.prototype.scrollVerticallyDown = function() { this.startScroll(270) }
ypSimpleScroll.prototype.scrollWest = function() { this.startScroll(180) }
ypSimpleScroll.prototype.scrollEast = function() { this.startScroll(0) }
ypSimpleScroll.prototype.startScroll = function(deg, speed) {
if (this.aniTimer) window.clearTimeout(this.aniTimer)
this.overrideScrollAngle(deg)
this.speed = speed ? speed : this.origSpeed
this.lastTime = (new Date()).getTime() - this.y.minRes
this.aniTimer = window.setTimeout(this.gRef + \".scroll()\", this.y.minRes)
}
ypSimpleScroll.prototype.endScroll = function() {
this.aniTimer = window.clearTimeout(this.aniTimer)
this.speed = this.origSpeed
}
ypSimpleScroll.prototype.overrideScrollAngle = function(deg) {
deg = deg % 360
if (deg % 90 == 0) {
var cos = deg == 0 ? 1 : deg == 180 ? -1 : 0
var sin = deg == 90 ? -1 : deg == 270 ? 1 : 0
} else {
var angle = deg * Math.PI / 180
var cos = Math.cos(angle)
var sin = Math.sin(angle)
sin = -sin
}
this.fx = cos / (Math.abs(cos) + Math.abs(sin))
this.fy = sin / (Math.abs(cos) + Math.abs(sin))
this.stopH = deg == 90 || deg == 270 ? this.scrollLeft : deg < 90 || deg > 270 ? this.scrollW : 0
this.stopV = deg == 0 || deg == 180 ? this.scrollTop : deg < 180 ? 0 : this.scrollH
}
ypSimpleScroll.prototype.overrideScrollSpeed = function(speed) {
this.speed = speed
}
ypSimpleScroll.prototype.scrollTo = function(stopH, stopV, aniLen) {
if (stopH != this.scrollLeft || stopV != this.scrollTop) {
if (this.aniTimer) window.clearTimeout(this.aniTimer)
this.lastTime = (new Date()).getTime()
var dx = Math.abs(stopH - this.scrollLeft)
var dy = Math.abs(stopV - this.scrollTop)
var d = Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2))
this.fx = (stopH - this.scrollLeft) / (dx + dy)
this.fy = (stopV - this.scrollTop) / (dx + dy)
this.stopH = stopH
this.stopV = stopV
this.speed = d / aniLen * 1000
window.setTimeout(this.gRef + \".scroll()\", this.y.minRes)
}
}
ypSimpleScroll.prototype.jumpTo = function(nx, ny) {
nx = Math.min(Math.max(nx, 0), this.scrollW)
ny = Math.min(Math.max(ny, 0), this.scrollH)
this.scrollLeft = nx
this.scrollTop = ny
if (this.y.ns4)this.content.moveTo(-nx, -ny)
else
{
this.content.style.left = -nx
this.content.style.top = -ny
}
}
ypSimpleScroll.minRes = 10
ypSimpleScroll.ie = document.all ? 1 : 0
ypSimpleScroll.ns4 = document.layers ? 1 : 0
ypSimpleScroll.dom = document.getElementById ? 1 : 0
ypSimpleScroll.mac = navigator.platform == \"MacPPC\"
ypSimpleScroll.mo5 = document.getElementById && !document.all ? 1 : 0
ypSimpleScroll.prototype.scroll = function() {
this.aniTimer = window.setTimeout(this.gRef + \".scroll()\", this.y.minRes)
var nt = (new Date()).getTime()
var d = Math.round((nt - this.lastTime) / 1000 * this.speed)
var nx = d * this.fx + this.scrollLeft
var ny = d * this.fy + this.scrollTop
var xOut = (nx >= this.scrollLeft && nx >= this.stopH) || (nx <= this.scrollLeft && nx <= this.stopH)
var yOut = (ny >= this.scrollTop && ny >= this.stopV) || (ny <= this.scrollTop && ny <= this.stopV)
if (nt - this.lastTime != 0 &&
((this.fx == 0 && this.fy == 0) ||
(this.fy == 0 && xOut) ||
(this.fx == 0 && yOut) ||
(this.fx != 0 && this.fy != 0 && xOut && yOut)))
{
this.jumpTo(this.stopH, this.stopV)
this.endScroll()
}
else {
this.jumpTo(nx, ny)
this.lastTime = nt
}
}
function ypSimpleScroll(id, left, top, width, height, speed, contentWidth, initLeft, initTop)
{
var y = this.y = ypSimpleScroll
if (!initLeft) initLeft = 0
if (!initTop) initTop = 0
if (!contentWidth) contentWidth = width
if (document.layers && !y.ns4) history.go(0)
if (y.ie || y.ns4 || y.dom) {
this.loaded = false
this.id = id
this.origSpeed = speed
this.aniTimer = false
this.op = \"\"
this.lastTime = 0
this.clipH = height
this.clipW = width
this.scrollTop = initTop
this.scrollLeft = initLeft
this.gRef = \"ypSimpleScroll_\"+id
eval(this.gRef+\"=this\")
var d = document
d.write(\'<style type=\"text/css\">\')
d.write(\'#\' + this.id + \'Container { left:\' + left + \'px; top:\' + top + \'px; width:\' + width + \'px; height:\' + height + \'px; clip:rect(0 \' + width + \' \' + height + \' 0); overflow:hidden; }\')
d.write(\'#\' + this.id + \'Container, #\' + this.id + \'Content { position:absolute; }\')
d.write(\'#\' + this.id + \'Content { left:\' + (-initLeft) + \'px; top:\' + (-initTop) + \'px; width:\' + contentWidth + \'px; }\')
d.write(\'</style>\')
}
}
ypSimpleScroll.prototype.load = function() {
var d, lyrId1, lyrId2
d = document
lyrId1 = this.id + \"Container\"
lyrId2 = this.id + \"Content\"
this.container = this.y.dom ? d.getElementById(lyrId1) : this.y.ie ? d.all[lyrId1] : d.layers[lyrId1]
this.content = obj2 = this.y.ns4 ? this.container.layers[lyrId2] : this.y.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
this.docH = Math.max(this.y.ns4 ? this.content.document.height : this.content.offsetHeight, this.clipH)
this.docW = Math.max(this.y.ns4 ? this.content.document.width : this.content.offsetWidth, this.clipW)
this.scrollH = this.docH - this.clipH
this.scrollW = this.docW - this.clipW
this.loaded = true
this.scrollLeft = Math.max(Math.min(this.scrollLeft, this.scrollW),0)
this.scrollTop = Math.max(Math.min(this.scrollTop, this.scrollH),0)
this.jumpTo(this.scrollLeft, this.scrollTop)
}
// end absolutely positioned simple scroller object scripts
var divSimpleScroller1YP = new ypSimpleScroll(\"divSimpleScroller1\", 10, 10, 320, 240, 200, 320)
</script>
</head>
<body bgcolor=\"#FFFFFF\" text=\"#000000\" onLoad=\"divSimpleScroller1YP.load()\">
<!-- begin absolutely positioned simple scroller object-->
<div id=\"divSimpleScroller1Control\">
<table width=\"50\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td height=\"240\" valign=\"bottom\" align=\"center\"> <a href=\"java script:;return false;\" onMouseOver=\"divSimpleScroller1YP.scrollEast();return false;\" onMouseOut=\"divSimpleScroller1YP.endScroll();return false;\">[east]</a><br>
<a href=\"java script:;return false;\" onMouseOver=\"divSimpleScroller1YP.scrollWest();return false;\" onMouseOut=\"divSimpleScroller1YP.endScroll();return false;\">[west]</a></td>
</tr>
</table>
</div>
<div id=\"divSimpleScroller1Container\">
<div id=\"divSimpleScroller1Content\"> <b>Scroll Area Content Start</b>
<p> Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod
tempor incidunt ut labore et dolore magna aliquam erat volupat.
<p></p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod
tempor incidunt ut labore et dolore magna aliquam erat volupat.
<p></p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</p>
<b>Scroll Area Content End</b> </div>
</div>
<!-- end absolutely positioned simple scroller object -->
</body>
</html>