<!--
/*
DHTML Vertical Scroller v1.4
© 2001-2002 Developed by Alain "Herten" Hertenstein
Web site : http://www.herten-music.com
You can use this script in your web site as long as you credit me in your page, thank you.

v1.4 Release Notes :
- Bug correction : the scroller speed went wrong if the user put his mouse pointer on the text field before the loading was complete
(Thanks Yann for this one ;-) )
- imgPath variable for setting the images path only once
v1.3 release Notes :
- Corrected scroller restart position, according to layer's height
- More optimized code
*/
// -----------------------------------------------------
// This part shouldn't need any customization or change
// -----------------------------------------------------
isStarted = false
IE4to6 = (document.all)?1:0
NS4 = (document.layers)?1:0
NS6 = (document.getElementById)?1:0
intervalValue = 0
scrNS6 = null
scrNSbObj = null
speed = scrStep
uAgent = navigator.userAgent.toLowerCase()
isWin9x = (uAgent.indexOf("win95")!=-1 || uAgent.indexOf("windows 95")!=-1 || uAgent.indexOf("win98")!=-1 || uAgent.indexOf("windows 98")!=-1)

function VS_scrUp() {
	if (IE4to6) { if ((scrIE.style.pixelTop-=speed) < -scrIE.offsetHeight) scrIE.style.pixelTop = layerHeight }
	else if (NS4) { if ((scrNSbObj.top-=speed) < -scrNSbObj.document.height) scrNSbObj.top = layerHeight }
	else if (NS6) { if (parseInt(scrNS6.style.top = (parseInt(scrNS6.style.top)-speed)+"px") < -scrNS6.offsetHeight) scrNS6.style.top = layerHeight+"px" }
}
function VS_scrDown() {
	if (IE4to6) { if ((scrIE.style.pixelTop+=speed) > layerHeight) scrIE.style.pixelTop = -scrIE.offsetHeight }
	else if (NS4) { if ((scrNSbObj.top+=speed) > layerHeight) scrNSbObj.top = -scrNSbObj.document.height }
	else if (NS6) {	if (parseInt(scrNS6.style.top = (parseInt(scrNS6.style.top)+speed)+"px") > layerHeight) scrNS6.style.top = -scrNS6.offsetHeight+"px" }
}
function VS_moveScr(scrVal) {
	if (!isStarted) return;
	clearInterval(intervalValue)
	VS_clrImgs()
	switch (scrVal) {
	case '-2':
		intervalValue = setInterval("VS_scrDown()", fastScrInterval)
		document.scrFrwd.src=imgPath+'scrFrwd_on.jpg'
		if (isWin9x) speed = scrStep+1
		break
	case '-1':
		intervalValue = setInterval("VS_scrDown()", scrInterval)
		document.scrRwd.src=imgPath+'scrRwd_on.jpg'		
		if (isWin9x) speed = scrStep
		break
	case '0':
		document.scrPause.src=imgPath+'scrPause_on.jpg'
		break
	case '1':
		intervalValue = setInterval("VS_scrUp()", scrInterval)
		document.scrFwd.src=imgPath+'scrFwd_on.jpg'
		if (isWin9x) speed = scrStep
		break
	case '2':
		intervalValue = setInterval("VS_scrUp()", fastScrInterval)
		document.scrFfwd.src=imgPath+'scrFfwd_on.jpg'
		if (isWin9x) speed = scrStep+1
	}
	if (scrVal != '0') scrChoice = scrVal
}
function VS_resumeScr() { VS_moveScr(scrChoice) }

function VS_clrImgs() {
	document.scrFrwd.src=imgPath+'scrFrwd.jpg'
	document.scrRwd.src=imgPath+'scrRwd.jpg'
	document.scrPause.src=imgPath+'scrPause.jpg'
	document.scrFwd.src=imgPath+'scrFwd.jpg'
	document.scrFfwd.src=imgPath+'scrFfwd.jpg'
}
function VS_startScr() {
	if (IE4to6 || NS6) {
		document.write("<div onMouseOver='VS_moveScr(\"0\")' onMouseOut='VS_resumeScr()' ")
		document.write("style='position:relative;width:"+layerWidth+"px;height:"+layerHeight+"px;overflow:hidden'>")
		document.write("<div id='scrIE' style='position:relative; width:"+(layerWidth-10)+"px; height:"+(layerHeight-10)+"px; ")
		document.write("visibility:visible;'></div></div>")
		scrNS6 = document.getElementById("scrIE")
	} else {
		document.write("<ilayer onMouseOver='VS_moveScr(\"0\")' onMouseOut='VS_resumeScr()' id='scrNSa' ")
		document.write("width="+layerWidth+"px height="+layerHeight+"px><layer id='scrNSb' width="+(layerWidth-10)+"px height="+(layerHeight-10)+"px ")
		document.write("z-index='0'></layer></ilayer>")
		scrNSbObj = document.scrNSa.document.scrNSb
	}
	
	if (IE4to6) {
		scrIE.style.pixelTop = layerHeight
		scrIE.innerHTML=scrTxt
	} else if (NS4) {
		scrNSbObj.top = layerHeight
		scrNSbObj.document.write(scrTxt)
		scrNSbObj.document.close()
	} else if (NS6) {
		scrNS6.innerHTML = scrTxt
		scrNS6.style.top = layerHeight+"px"
	}
	isStarted = true
	intervalValue = setInterval("VS_scrUp()", scrInterval)
}
function VS_dispCtrlBar() {
	document.write("<a href=\"javascript:VS_moveScr('-2')\" onMouseOver=\"VS_moveScr('-2')\"><img src=\""+imgPath+"scrFrwd.jpg\" width=16 height=11 border=0 alt=\"Fast Rewind\" name=\"scrFrwd\"></a>")
	document.write("<a href=\"javascript:VS_moveScr('-1')\" onMouseOver=\"VS_moveScr('-1')\"><img src=\""+imgPath+"scrRwd.jpg\" width=13 height=11 alt=\"Rewind\" border=0 name=\"scrRwd\"></a>")
	document.write("<img src=\""+imgPath+"scrBlank1.jpg\" width=11 height=11 border=0><a href=\"javascript:VS_moveScr('0')\" onMouseOver=\"VS_moveScr('0')\" onMouseOut=\"VS_resumeScr()\"><img src=\""+imgPath+"scrPause.jpg\" width=11 height=11 border=0 alt=\"Pause\" name=\"scrPause\"></a>")
	document.write("<img src=\""+imgPath+"scrBlank2.jpg\" width=11 height=11 border=0><a href=\"javascript:VS_moveScr('1')\" onMouseOver=\"VS_moveScr('1')\"><img src=\""+imgPath+"scrFwd_on.jpg\" width=10 height=11 border=0 alt=\"Forward\" name=\"scrFwd\"></a>")
	document.write("<a href=\"javascript:VS_moveScr('2')\" onMouseOver=\"VS_moveScr('2')\"><img src=\""+imgPath+"scrFfwd.jpg\" width=18 height=11 border=0 alt=\"Fast Forward\" name=\"scrFfwd\"></a>")
}
// ----------------
// End of Scroller
// ----------------
//-->
