// This scripts available from - http://www.viewsource.dk
// LOts of free Java Applets, DHTML and Javascript

// *****   This goes in the head section   *****

<script language="JavaScript1.2">
// CREDITS:
// GumScroller by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com.
// info@24fun.ch
// 6/13/2000

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a hyperlink to http://www.24fun.com on the webpage 
// where this script will be running.

// INSTALLATION:
// Visit www.24fun.com, open category 'text' and download the full-version of this script as
// ZIP-file with step-by-stepinstructions.

var message= new Array()

// Configure each message below like this:
// message[indexnumber]="text|URL of link"
// You may add as many messages as you like.
message[0]="Lots of free Java Applets, DHTML and JavaScripts, and many online programming tutorials at www.viewsource.dk|http://www.viewsource.dk"

message[1]="Thailand Travel tips, the place to get all the information you need about thailand, before you go there.|http://www.thailand.subnet.dk"

// width of the scrollerbox (pixels)
var scrollerwidth=300

// horizonal position: distance to the top border of the window (pixels)
var scrollertop=10

// vertical position: distance to the left border of the window (pixels)
var scrollerleft=10

// The target of your links
// possible values are '_blank', '_self', '_top', '_parent' or the name of
// the target window for instance 'main'
var targetlink="_blank"

// font attributes of the copytext
var font_face="Verdana"
var font_color="AA0000"
var font_size=15

// standstill between the messages (milliseconds)
var standstill=3000

// Do not edit below this line
var lineheightmax=12
var lineheight=lineheightmax
var linestep=0.2
var i_message=0
var mes_joined
var mes_split
var contenttext
var pause=20

function initiate() {
	if (document.all) {
		document.all.scrollertext.style.posTop=scrollertop
		document.all.scrollertext.style.posLeft=scrollerleft
		document.all.scrollertext.style.width=scrollerwidth
		lineup()
	}
	if (document.layers) {
		alert("This script works with Internet Explorer 4x or higher. Sorry Netscape-Folks!")
	}
}

function lineup(){
	mes_joined=message[i_message]
	mes_split=mes_joined.split("|")
	
	contenttext="<span style='position:relative;font-family:"+font_face+"; color:"+font_color+";font-size:"+font_size+"pt;line-height:"+lineheight+";width:"+scrollerwidth+"px'>"
	contenttext+=mes_split[0]
	contenttext+="</span>"
	
	if (lineheight>1.2) {
		scrollertext.innerHTML=contenttext
		var timer=setTimeout("lineup()",pause)
		lineheight-=linestep
	}
	else {
		mes_joined=message[i_message]
		mes_split=mes_joined.split("|")
		contenttext="<span style='position:relative;font-family:"+font_face+"; color:"+font_color+";font-size:"+font_size+"pt;line-height:"+lineheight+";width:"+scrollerwidth+"px'>"
		contenttext+=mes_split[0]
		contenttext+="<br><a href='"+mes_split[1]+"' target='"+targetlink+"'>more ...</a>"
		contenttext+="</span>"
		scrollertext.innerHTML=contenttext
		clearTimeout(timer)
		var timer=setTimeout("squeeze()",standstill)
	}
}

function squeeze(){
	mes_joined=message[i_message]
	mes_split=mes_joined.split("|")
	contenttext="<span style='position:relative;font-family:"+font_face+"; color:"+font_color+";font-size:"+font_size+"pt;line-height:"+lineheight+";width:"+scrollerwidth+"px'>"
	contenttext+=mes_split[0]
	contenttext+="</span>"

	if (lineheight>0) {
		scrollertext.innerHTML=contenttext
		var timer=setTimeout("squeeze()",pause)
		lineheight-=linestep/2
	}
	else {
		clearTimeout(timer)
		scrollertext.innerHTML=""
		changemessage()
	}
}

function changemessage() {
	i_message++
	if (i_message>message.length-1) {i_message=0}
	lineheight=lineheightmax
	var timer=setTimeout("lineup()",1000)
}

</script>

// *****   This goes in the body section   *****

<body bgcolor="#003399" onLoad="initiate()">

<div id="scrollertext" style="position:absolute"></div>
