function bereken(i,Lengte)
{
return (size*Math.abs( Math.sin(i/(Lengte/3.14))) );
}

function motor(p)
{
var output = "";
for(w = 0;w < tekst[s].length - klaar+1; w++)
{
q = bereken(w/2 + p,16);
if (q > size - 0.5)
{klaar++;}
if (q < 5)
{tel++;
if (tel > 1)
{
tel = 0;
if (veran == 1)
{
veran = 0;
s++;
if ( s == tekst.length)
{s = 0;}
p = 0;
if (window.loop)
{clearInterval(loop)}
loop = motor();
}
}
}
output += "<font style='color:#00008B;font-weight: bold; font-style: italic; font-size: "+ q +"pt'>" +tekst[s].substring(w,w+1)+ "</font>";	
}
for(k=w;k<klaar+w;k++)
{ 
output += "<font style='color:#00008B;font-weight: bold;  font-style: italic; font-size: " + size + "pt'>" +tekst[s].substring(k,k+1)+ "</font>";
}
idee.innerHTML = output;	
}

function startmotor(p){
if (!document.all)
return
var loop = motor(p); 
if (window.time)
{clearInterval(time)}
if (klaar == tekst[s].length)
{
klaar = 0;
veran = 1;
tel = 0;
var time = setTimeout("startmotor(" +(p+1) + ")", speed_between_messages);
}else
{	
var time =setTimeout("startmotor(" +(p+1) + ")", 50);
}

}


function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
else {
alert("Sorry! Your browser doesn't support this function. Please bookmark this page manually.");
}
}

function ZoomIn() {  
if(window.document.body.style.zoom!=0) window.document.body.style.zoom*=1.25;
else window.document.body.style.zoom=1.25; } 
function ZoomOut() { 
if(window.document.body.style.zoom!=0) window.document.body.style.zoom*=0.8;  
else window.document.body.style.zoom=0.8; } 
