var a,b,c,d,e,f,g,h,i,j;
if (iens6){
document.write('</div></div>')
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight 
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function getcontent_height()
{
contentheight=crossobj.offsetHeight;


if (contentheight*1.0<=400) {a=10;b=10;c=10;d=10;e=10;f=10;g=10;h=10;i=10;j=10;}else
if (contentheight*0.9<=400) {a=9;b=9;c=9;d=9;e=9;f=9;g=9;h=9;i=9;j=10;}else
if (contentheight*0.8<=400) {a=8;b=8;c=8;d=8;e=8;f=8;g=8;h=8;i=9;j=10;}else
if (contentheight*0.7<=400) {a=7;b=7;c=7;d=7;e=7;f=7;g=7;h=8;i=9;j=10;}else
if (contentheight*0.6<=400) {a=6;b=6;c=6;d=6;e=6;f=6;g=7;h=8;i=9;j=10;}else
if (contentheight*0.5<=400) {a=5;b=5;c=5;d=5;e=5;f=6;g=7;h=8;i=9;j=10;}else
if (contentheight*0.4<=400) {a=4;b=4;c=4;d=4;e=5;f=6;g=7;h=8;i=9;j=10;}else
if (contentheight*0.3<=400) {a=3;b=3;c=3;d=4;e=5;f=6;g=7;h=8;i=9;j=10;}else
if (contentheight*0.2<=400) {a=2;b=2;c=3;d=4;e=5;f=6;g=7;h=8;i=9;j=10;}else
if (contentheight*0.1<=400) {a=1;b=2;c=3;d=4;e=5;f=6;g=7;h=8;i=9;j=10;} 

            bt1          = new Image();
            bt2          = new Image();
            bt3          = new Image();
            bt4          = new Image();
            bt5          = new Image();
            bt6          = new Image();
            bt7          = new Image();
            bt8          = new Image();
            bt9          = new Image();
	    bt10	 = new Image();
            bt1.src    = "mappen/plaatjes/but"+[a]+".jpg";
            bt2.src    = "mappen/plaatjes/but"+[b]+".jpg";
            bt3.src    = "mappen/plaatjes/but"+[c]+".jpg";
            bt4.src    = "mappen/plaatjes/but"+[d]+".jpg";
            bt5.src    = "mappen/plaatjes/but"+[e]+".jpg";
            bt6.src    = "mappen/plaatjes/but"+[f]+".jpg";
            bt7.src    = "mappen/plaatjes/but"+[g]+".jpg";
            bt8.src    = "mappen/plaatjes/but"+[h]+".jpg";
            bt9.src    = "mappen/plaatjes/but"+[i]+".jpg";
            bt10.src   = "mappen/plaatjes/but"+[j]+".jpg";
            window.document.images[16].src=bt1.src; 
            
}
window.onload=getcontent_height; 
function button1(){x=1; window.document.images[16].src=bt1.src; richting=-1; scrolldn();}
function button2(){x=2; window.document.images[16].src=bt2.src; richt();}
function button3(){x=3; window.document.images[16].src=bt3.src; richt();}
function button4(){x=4; window.document.images[16].src=bt4.src; richt();}
function button5(){x=5; window.document.images[16].src=bt5.src; richt();}
function button6(){x=6; window.document.images[16].src=bt6.src; richt();}
function button7(){x=7; window.document.images[16].src=bt7.src; richt();}
function button8(){x=8; window.document.images[16].src=bt8.src; richt();}
function button9(){x=9; window.document.images[16].src=bt9.src; richt();}
function button10(){x=10; window.document.images[16].src=bt10.src; richt();}

function richt(){hoogte=parseInt(contentheight/teller);
   if (positie>hoogte*x+400){ richting=1;scrollup();}
   else{richting=-1; scrolldn();}}

function scrollup(){
if (window.moveupvar) clearTimeout(moveupvar)

if (iens6
    &&parseInt(crossobj.style.top)>=(hoogte*x)+400 )
move()
else if (ns4&&crossobj.top<=(hoogte+400+speed))
crossobj.top-=speed
movedownvar=setTimeout("scrollup()",100)
}

function scrolldn(){
if (window.moveupvar) clearTimeout(moveupvar)

if (iens6&&parseInt(crossobj.style.top)<0
    &&parseInt(crossobj.style.top)<=(hoogte*x)+400) 
move()
else if (ns4&&crossobj.top>=(hoogte+400+speed))
crossobj.top-=speed
movedownvar=setTimeout("scrolldn()",100)
}

function move(){crossobj.style.top=parseInt(crossobj.style.top)-(speed*richting)}

function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)
positie=parseInt(crossobj.style.top)
}


