// This Script is Downloaded from
// http://www.viewsource.dk
// Lots of free Java Applets, DHTML & JavaScripts



// ***** This Goes in the head section *****

<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -

// CREDITS:
// MagicScroller 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
// 8/7/2000

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

// CONFIGURATION:
// Go to www.24fun.com, open category 'text' and download 
// the full-version of this script as ZIP-file containing
// step-by-step instructions for non-programmers.

// Edit the variables below:

// Your messages. Add as many as you like
var message=new Array()
message[0]="FREE CLIPART FROM ABOUT.COM: CLICK HERE."
message[1]="JAVASCRIPT TRICKS FROM ABOUT.COM: CLICK HERE."
message[2]="SPEEDING UP LOAD-TIME FOR FREE. CLICK HERE."


// the URLs of your messages
var messageurl=new Array()
messageurl[0]="http://service.bfast.com/bfast/click?bfmid=7279965&siteid=30125004&bfpage=webclipart3"
messageurl[1]="http://service.bfast.com/bfast/click?bfmid=7279965&siteid=30125004&bfpage=javascript"
messageurl[2]="http://service.bfast.com/bfast/click?bfmid=599904&siteid=30259589&bfpage=gifbot"

// the targets of the links
// accepted values are '_blank' or '_top' or '_parent' or '_self'
// or the name of your target-window (for instance 'main')
var messagetarget=new Array()
messagetarget[0]="_blank"
messagetarget[1]="_blank"
messagetarget[2]="_blank"

// the images that create the magic effect of the letters.
// You can add an image for each message 
var messageimage=new Array()
messageimage[0]="bg77_1.jpg"
messageimage[1]="bg77_2.jpg"
messageimage[2]="bg77_3.jpg"

// font-color of messages (required for Netscape Navigator)
var messagecolor="blue"

// distance of the scroller to the left margin of the browser-window (pixels)
var scrollerleft=20

// distance of the scroller to the top margin of the browser-window (pixels)
var scrollertop=20

// speed 1: lower means faster
var pause=20

// speed 2: higher means faster
var step=4

// font-size
var fntsize=30

// font-family
var fntfamily="Arial"

// font-weight: 1 means bold, 0 means normal
var fntweight=1

// do not edit the variables below
var imgpreload=new Array()
for (i=0;i<=messageimage.length-1;i++) {
	imgpreload[i]=new Image()
	imgpreload[i].src=messageimage[i]
}
var scrollerwidth=368
var scrollerheight=60
var backgroundimagecontent
var clipleft,clipright,cliptop,clipbottom,clipleftbg, cliprightbg
var i_message=0
var timer
var textwidth
var textcontent=""
if (fntweight==1) {fntweight="700"}
else {fntweight="100"}

function init() {
	gettextcontent()
    if (document.all) {
        backgroundimagecontent="<img src='"+messageimage[0]+"' width='"+scrollerwidth+"'>"
		text.innerHTML=textcontent
        textwidth=text.offsetWidth
		backgroundimage.innerHTML=backgroundimagecontent
        document.all.text.style.height=scrollerheight
		document.all.text.style.posTop=scrollertop
        document.all.text.style.filter="chroma(color="+messagecolor+")"
        document.all.text.style.posLeft=scrollerleft+scrollerwidth
		document.all.backgroundimage.style.posTop=scrollertop
        document.all.backgroundimage.style.posLeft=scrollerleft
		clipleft=0
		clipright=0
		cliptop=0
		clipbottom=scrollerheight
        clipleftbg=scrollerwidth
        cliprightbg=scrollerwidth
		document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
        document.all.backgroundimage.style.clip="rect("+cliptop+" "+cliprightbg+" "+clipbottom+" "+clipleftbg+")"
        scrolltext()
    }
	if (document.layers) {
		document.textnetscape.document.write(textcontent)
		document.textnetscape.document.close()
		textwidth=document.textnetscape.document.width
		document.textnetscape.top=scrollertop
		document.textnetscape.left=scrollerleft+scrollerwidth
		document.textnetscape.clip.left=0
		document.textnetscape.clip.right=0
		document.textnetscape.clip.top=0
		document.textnetscape.clip.bottom=scrollerheight
        scrolltext()
    }
}

function scrolltext() {
    if (document.all) {
		if (document.all.text.style.posLeft>=scrollerleft-textwidth) {
			document.all.text.style.posLeft-=step
			clipright+=step
            clipleftbg-=step
			if (clipright>scrollerwidth) {
				clipleft+=step
			}
            if (document.all.text.style.posLeft<scrollerleft-textwidth+scrollerwidth) {
				cliprightbg-=step
			}
			document.all.text.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
             document.all.backgroundimage.style.clip="rect("+cliptop+" "+cliprightbg+" "+clipbottom+" "+clipleftbg+")"
			
			var timer=setTimeout("scrolltext()",pause)
		}
		else {
			changetext()
		}
	}
   if (document.layers) {
		if (document.textnetscape.left>=scrollerleft-textwidth) {
			document.textnetscape.left-=step
			document.textnetscape.clip.right+=step
			if (document.textnetscape.clip.right>scrollerwidth) {
				document.textnetscape.clip.left+=step
			}
			var timer=setTimeout("scrolltext()",pause)
		}
		else {
			changetext()
		}
	}
}

function changetext() {
    i_message++
	if (i_message>message.length-1) {i_message=0}
	gettextcontent()
	if (document.all) {
		text.innerHTML=textcontent
		textwidth=text.offsetWidth
        backgroundimagecontent="<img src='"+messageimage[i_message]+"' width='"+scrollerwidth+"'>"
        backgroundimage.innerHTML=backgroundimagecontent
        document.all.text.style.posLeft=scrollerleft+scrollerwidth
		clipleft=0
		clipright=0
        clipleftbg=scrollerwidth
        cliprightbg=scrollerwidth
		document.all.text.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
        document.all.backgroundimage.style.clip="rect("+cliptop+" "+cliprightbg+" "+clipbottom+" "+clipleftbg+")"
        scrolltext()
	}

	if (document.layers) {
   		document.textnetscape.document.write(textcontent)
		document.textnetscape.document.close()
		textwidth=document.textnetscape.document.width
		document.textnetscape.left=scrollerleft+scrollerwidth
		document.textnetscape.clip.left=0
		document.textnetscape.clip.right=0	
        scrolltext()
	}
}

function gettextcontent() {
	textcontent="<span style='position:relative;font-size:"+fntsize+"pt;font-family:"+fntfamily+";font-weight:"+fntweight+"'>"
	textcontent+="<a href="+messageurl[i_message]+" target="+messagetarget[i_message]+">"
	textcontent+="<nobr><font color="+messagecolor+">"+message[i_message]+"</font></nobr></a></span>"
}

window.onresize=init;

// - End of JavaScript - -->
</SCRIPT>

<STYLE>
A {
text-decoration:none;
}

A:Hover {
text-decoration:underline;
}

body{
overflow-x:hidden;
overflow-y:scroll;
}
</STYLE>

// ***** This Goes in the Bodysection *****

<BODY bgcolor=FFFFFF onLoad="init()"> 

<DIV ID="backgroundimage" style="position:absolute;left:-2000px;"></DIV>

<DIV ID="text" style="position:absolute;left:-2000px; background-color:white;filter:chroma(color=black;);"></DIV>

<DIV ID="textnetscape" style="position:absolute;left:-2000px;"></DIV>


