logo
  Banner
 

Makkelijk als je iets duidelijk wilt maken op je site

 
TUSSEN DE HEAD TAGS
<script language="JavaScript1.2">
//vertraging (4000=4 secs):
var delay=3000
//breedte
var scrollwidth=300
//hoogte
var scrollheight=20
var message=new Array()
//teksten
var openingtag='<font face="Arial" size=3>'
message[0]='<b>Dit is de eerste tekst</b>'
message[1]='<b>Hier komt de tweede</b>'
message[2]='<b>En hier alweer de derde</b>'
var closingtag='</font>'
var hoffset=-15
</script>

 
TUSSEN DE BODY TAGS
<script language="JavaScript1.2">
var inc=1
var ns4=document.layers
var ie5ns6=document.getElementById||document.all
if (ie5ns6)
document.write(openingtag+'<div id="flyin" style="position:relative;width:'+scrollwidth+';height:'+scrollheight+';">'+message[0]+'</div>'+closingtag)
function updatemsg(){
crossobj.style.left=-2000
crossobj.style.fontStyle="italic"
crossobj.innerHTML=message[inc]
crossobj.style.left=crossobj.offsetWidth*(-1)+hoffset
start=setInterval("animatein()",100)
inc=(inc<message.length-1)? inc+1 : 0
}
function animatein(){
if (parseInt(crossobj.style.left)<0)
crossobj.style.left=parseInt(crossobj.style.left)+20
else{
crossobj.style.left=0
crossobj.style.fontStyle="normal"
clearInterval(start)
}
}
function updatemsgns4(){
document.sslide.document.sslide2.document.write(openingtag+message[inc]+closingtag)
document.sslide.document.sslide2.document.close()
inc=(inc<message.length-1)? inc+1 : 0
}
function initialize(){
if (ie5ns6){
crossobj=document.getElementById? document.getElementById("flyin") : document.all.flyin
setInterval("updatemsg()",delay+1000)
}
else if (ns4){
document.sslide.document.sslide2.document.write(openingtag+message[0]+closingtag)
document.sslide.document.sslide2.document.close()
setInterval("updatemsgns4()",delay)
}
}
window.onload=initialize
</script>

 
eind