/*
Copyright 2000-2006 SEMM
All rights reserved
Part of http://javalessons.com
Author : Paul Hamaker
*/
var tel=0;
var t=0;
var loc=1;
var wissie=false;
var ar=new Array(50);
for (ai=0;ai<ar.length;ai++){
 ar[ai]=new Array(2);
}

var sel;
function 
wissel(sl) //==============
{ 
 if (sel) {
// sel.style.background="#fff"; 
   sel.style.borderColor='#fff';}
 sel=sl;
//sel.style.background='#ddd';
sel.style.borderColor='#00f';wis2();
}

function 
mark(i) //==============
{
//alert("mark "+i+parent.s.document.getElementById(i).style.backgroundColor);
parent.s.document.getElementById(i).style.backgroundColor = '#ff0';
}


function 
mark2() //==============
{
//alert("mark2"+ar);
for (i=0;ar[i][0]!=-9 && i<ar.length;i++){
b=ar[i][0];
e=ar[i][1];

for (r=b;r<=e;r++){ mark("n"+r); }
}
wissie=true;
}


function 
wis(i) //==============
{
//toon("wis "+i);
parent.s.document.getElementById(i).style.backgroundColor = '#fff';

wissie=false;
}

function 
wis2() //==============
{
//alert("wis2");
t=0;
if (!wissie) return;
for (i=0;ar[i][0]!=-9 && i<ar.length;i++){
b=ar[i][0];
e=ar[i][1];
for (r=b;r<=e;r++){ wis("n"+r);}
tel=0;
}
}


function 
schuif2() //==============
{
//toon("schuif2");
loc=ar[tel][0];
loc-=4;
if (loc<1) loc=1;
//parent.s.location.href="java-source.html#"+loc;
parent.s.location.replace("java-source.html#"+loc);
tel++;
if (tel==ar.length || ar[tel][0]==-9 ) tel=0;
}

function 
schuif(i) //==============
{
//parent.s.location.href="java-source.html#"+i;
parent.s.location.replace("java-source.html#"+i);
}

function 
vul(ee,la) //==============
{
//alert("vul "+ee+" "+la);
ar[t][0]=ee;ar[t][1]=la;t++;ar[t][0]=-9;}

function 
toon(a) //==============
{
 parent.t.document.body.innerHTML=a;
}
