
// CREDITS:
// Simple DHTML-ticker with last-letter-animation 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
// 7/31/2000
// This script was submitted to www.a1javaccripts.com by the above mentioned authors

// IMPORTANT: 
// If you add this script to a script-library or a script-archive 
// you have to insert a link to http://www.24fun.com right into the webpage where the script
// will be displayed.

// CONFIGURATION:
// Go to http://www.24fun.com, open category 'text' and download the ZIP-file of this script 
// containing the the script-file with step-by-step instructions for easy configuration.

var message=new Array()
message[0]="DISC bvba, Deprez Informatica Systemen Consulting sedert 1982."
message[1]="Website en CD-ROM creaties."
message[2]="Facturatie - Stockbeheer - Boekhouding."
message[3]="Consulting - Automatisatie - ERP - MRP."

var leftposition=0
var topposition=0
var tickerwidth=770
//var tickerheight=10
var tickerpadding=5
var borderwidth=0
var fnt="Verdana"
var fntsize=9
var fntsizelastletter=9
var fntcolor="#000000"
var fntcolorlastletter="#000000"
var fntweight=4
var backgroundcolor="#D1D3D4"
var standstill=2000
var speed=40
var i_substring=0
var i_presubstring=0
var i_message=0
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100

function initiateticker() {
        //document.getElementById('ticker').style.posLeft=leftposition
        //document.getElementById('ticker').posTop=topposition //-30
        //showticker()
}



function getmessagecontent() {
                messagepresubstring=message[i_message].substring(0,i_presubstring)
                messageaftersubstring=message[i_message].substring(i_presubstring,i_substring)
               messagecontent="<table border=0 cellpadding='0' width='0'><tr><td valign='top' align='center'>"
               messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+";text-align: center;'>"     
               
               messagecontent+="<font color='"+fntcolor+"'>"
                messagecontent+=messagepresubstring
               messagecontent+="</font>"
              
                messagecontent+="</span>"
                messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900;text-align: center;'>"     
             
               messagecontent+="<font color='"+fntcolorlastletter+"'>"
                messagecontent+=messageaftersubstring
                messagecontent+="</font>"
         
                messagecontent+="</span>"
                messagecontent+="</td></tr></table>"
}

function showticker() {
        if (i_substring<=message[i_message].length-1) {
                        i_substring++
                        i_presubstring=i_substring-1
                        if (i_presubstring<0) {i_presubstring00}
                        getmessagecontent()
             document.getElementById('ticker').innerHTML=messagecontent
             var timer=setTimeout("showticker()", speed)
        }
        else {
                clearTimeout(timer)
                var timer=setTimeout("changemessage()", standstill)
        }
}

function changemessage() {
        i_substring=0
        i_presubstring=0
        i_message++
        if (i_message>message.length-1) {
                i_message=0
        }
        showticker()
}