/*_________________________________________________________________________________________________

To the attention of all users:

This JavaScript is based on a script developed by www.Start4All.com
If you want to adapt this script for your own pages, please contact them!
_________________________________________________________________________________________________*/

var windowtype = "0";
if(getCookie("input") != '*')
	windowtype=getCookie('input');
if(getCookie("blokken") != '*')
	blokkenString = getCookie("blokken");
else blokkenString = ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;";
if (navigator.appName!="Microsoft Internet Explorer" || parseInt(navigator.appVersion) >= 4)
	var blokArray = blokkenString.split(";");
d=document;

var kolom = new Array();
var kolAant;
var bgKleur;
var beginletter;
var opmerkingen;
var statdir;

function n(naam){
	startDate= new Date();
    goStat(naam);
	if (windowtype==0){
		if (parseInt(navigator.appVersion)>=4){
			tmpWin2=window.open(naam,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width="+
			((screen.width/100)*80)+",height="+(((screen.height/100)*85)-200)+",left="+((screen.width/100)*9)+",top="+((screen.height/100)*14));}
		else {tmpWin2=window.open(naam,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=600,height=280");}}
	if (windowtype==1)top.location.href=naam;
	if (windowtype==2){ 
		if(parseInt(navigator.appVersion)>=4){
			tmpWin2=window.open(naam,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width="+
			((screen.width/100)*99)+",height="+(((screen.height/100)*107)-200)+",left=0,top=0");}
		else{tmpWin2=window.open(naam,startDate.getTime(),"toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=600,height=280");}}
}

function windowWidth(method)
{
	if (parseInt(navigator.appVersion) < 4) return (600);
	else
	{       if (windowtype==0) return(screen.width*0.8);
		if (windowtype==2) return(screen.width*0.99);
	}
}
function windowHeight(method)
{
	if (parseInt(navigator.appVersion) < 4) return (280);
	else
	{       if (windowtype==0) return((screen.height*0.85)-200);
		if (windowtype==2) return(screen.height*0.80);
	}
}
function c(naam)
{
	startDate= new Date();
	tmpWin = window.open(naam, startDate.getTime(),'toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,width=600,height=360');
}
function goStat(adres,yon)
{
	if (statdir!='geen')
	{
		words=(adres.substring(7,adres.length));
		link="";
		for(var t=1;t<=words.length;t++)
  		{
  			if(words.substring(t-1,t)=="."||words.substring(t-1,t)=="/")link+="-";
			else link+=words.substring(t-1,t);
		}
		if(yon==null)dir='dochters';
		else dir='banners';
		
	}
}
function go(kolnum,bloknum,linknum,site)
{
	scrText1="toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=";
	scrText2="toolbar=no,location=no,resizable=no,status=no,scrollbars=no,menubar=no,width="
	naamDate= new Date();
	naam= naamDate.getTime();
	with (kolom[kolnum].blok[bloknum].hlinks[linknum])
	{
	   if ((openMethod=='n' || openMethod=='s') && parseInt(navigator.appVersion) >= 4)
	   {
		fromTop=(screen.height/100)* 14;
		fromLeft=(screen.width/100)* 9;
	   }
	   else
	   {
		fromTop=0;
		fromLeft=0;
	   }
	   if (site!=null) adres=site;
           
       if (kolnum!=1||bloknum!=0)    
           goStat(adres);

	   if (openMethod=='n')
	   {    if (windowtype==0) parent.location.href=adres;
		else
			tmpWin2=window.open(adres,naam,scrText1 +
			(windowWidth('n')+",height="+windowHeight('n')+
			",left=" +fromLeft+",top="+fromTop));
	   }
	   else
		if (openMethod=='r')
			self.location.href=adres;
		else
			tmpWin2=window.open(adres,naam,scrText2 +
			(scrWidth + ",height="+scrHeight+",left="+fromLeft+",top="+fromTop));
	}

}


function r()
{
	window.alert('note: for this function you need to download REALPLAYER.')
}
function mo(a,b,c)
{
	window.status=kolom[a].blok[b].hlinks[c].adres;
}
function co()
{
	window.status="";
}
function doSearch(kolNum,blokNum)
{
   var words = document.searchforit.query.value;
   var searchitems=addplus(words);
   var index = document.searchforit.service.selectedIndex;
   var site = document.searchforit.service.options[index].value;
   site+=searchitems;
   if (notEmpty(searchitems))
	   go(kolNum,blokNum,index,site);
}
function notEmpty(word)
{
   if (word==""||word==null)
   {
      self.status="ENTER SEARCH	searchitems";
      alert("\n Please......enter a keyword !");
      document.searchforit.query.focus();
      return false;
   }
   else
   {
	self.status="SEARCHING FOR:  "+word;
	return true;
   }
}
function addplus(items)
{
   var plussed ="";
   for (var t =1 ; t <= items.length ;  t++)
      {
	if (items.substring(t-1,t)=="")
	  plussed+="+";
	else
	{
	     if (items.substring(t-1,t)=="+")
		plussed+="%2B";
	     else
		plussed+=items.substring(t-1,t);
	}
      }
   return plussed;
}
function hide(kolNum,blokNum)
{
	if (navigator.appName!="Microsoft Internet Explorer"||parseInt(navigator.appVersion) >= 4)
	{
	   kolom[kolNum].blok[blokNum].show=false;
	   hulpNum=kolom[kolNum].blok[blokNum].hideNum;
	   blokArray[hulpNum]="Y";
	   blokkenString=blokArray.join(";");
	   window.alert("This window will be closed and moved to the bottom of this page !");
	   setCookie('blokken', blokkenString);
	   location.reload();
	}
	else window.alert("For this function you need a browser version 4 or higher");
}
function unhide(kolNum,blokNum)
{
	if (navigator.appName!="Microsoft Internet Explorer"||parseInt(navigator.appVersion) >= 4)
	{
	   kolom[kolNum].blok[blokNum].show=true;
	   blokArray[kolom[kolNum].blok[blokNum].hideNum]="";
	   blokkenString=blokArray.join(";");
	   setCookie('blokken', blokkenString);
	   location.reload();
	}
	else window.alert("For this function you need a browser version 4 or higher");
}
function addLink(adres,oms,opties,special,scrW,scrH)
{
	this.hlinks[this.nextLink]=new hlink(adres,oms,opties,special,scrW,scrH);
	this.nextLink++;
}
function addBlok(bloknaam,hideNum,kopKleur,blokType)
{
	this.blok[this.nextBlok]= new bloktype(bloknaam,hideNum,kopKleur,blokType);
	this.nextBlok++;
}
function hlink(adres,oms,opties,special,scrW,scrH)
{
	this.adres=adres;
	this.oms=oms; this.meerRegel=false
	this.openMethod=opties.substring(0,1);
	if (this.openMethod=='s')
	   { this.scrWidth=scrW; this.scrHeight=scrH;}
	this.extra=''; optie3=opties.substring(1,2);
if (optie3=='0')
		this.extra='</A><BR>'
	if (optie3=='1')
		this.extra='</A><FONT SIZE="1" COLOR="'+colortip+'"> (tip)</FONT><BR>'
	else
	if (optie3=='2')
		this.extra='</A><FONT SIZE="1" COLOR="'+colortip+'"> (new)</FONT><BR>'
	else
	if (optie3=='3')
		this.extra='</A><FONT SIZE="1" COLOR="'+colortip+'"> (realplayer)</FONT><BR>'
	else
	if (optie3=='m')
		{this.meerRegel=true;this.linkCol=special;}
	else
	if (optie3=='8')
		this.extra='</A>, ';
	else
	if (optie3=='9')
		this.extra='</A><FONT SIZE="1" COLOR="'+colortip+'"> '+special+'</FONT><BR>'
}
function bloktype(kop,hideNum,color,btype)
{
	this.kop=kop;
	if (color=='0') this.color=headercolor
	else this.color=color;
	this.hlinks= new Array();
	this.hideNum=parseInt(hideNum);
	if (blokArray[this.hideNum]!='Y') this.show=true; else this.show=false;
	this.nextLink=0;
	this.addLink=addLink;
	if (btype=='S') this.btype='Search';
	else this.btype='Norm';
}
function kolomtype(num)
{
	this.kolomnum=num;
	this.blok= new Array();
	if (num==1) this.nextBlok=0
	else this.nextBlok=1;
	this.addBlok=addBlok;
}
function vulObjecten()
{

  kolAant = -1; kolNum=kolAant;
  for (i=0; i < lijst.length; i++)
  {
    record=lijst[i].split("¶");

    if (record[0]=='K')
      {
	// Het gaat om een nieuwe kolom
	kolAant++; kolNum=kolAant;
	kolom[kolNum] = new kolomtype(kolNum);
	if (kolNum==1) var blokNum = -1
	else var blokNum=0;

      }
      else
      {
	 if (record[0]=='B'||record[0]=='S'||record[0]=='D')
	 {
	    if (record[0] == 'D') //speciaalblok voor uitbreiding blok met dochterpagina's overslaan
	    {
	    	i++; record=lijst[i].split("¶");
	    	while (record[0].length != 1)
	    	{
	    	   i++; record=lijst[i].split("¶");
	    	}
	    	blokNum++;
	        kolom[kolNum].addBlok(record[1],record[2],record[3],record[0]);
	    }
	    else
	    {
	       // Het gaat dus om een kop
	       blokNum++;
	       kolom[kolNum].addBlok(record[1],record[2],record[3],record[0]);
	    }
	 }
	 else
	 {
	    // Het gaat om een hyperlink
	    with (kolom[kolNum])
	    {
		blok[blokNum].addLink(record[0],record[1],record[2],record[3],record[4],record[5]);
	    }
	 }
    }
    
  }
   

//vullen standaard startpaginablokken
   kolom[0].blok[0]=new bloktype('Indigo Kinder',999,0,'B');
   //adres,oms,opties,special,scrW,scrH
   if (beginletter=='groot')
   {
     kolom[0].blok[0].addLink("fragebogen_formular_kinder.htm","fragebogen indigo kinder",'r0');
      kolom[0].blok[0].addLink("das_indigo_kind_kapitel_7_indigo_selbsttest.htm","indigo selbsttest",'r0');
      kolom[0].blok[0].addLink("http://www.indigochild.net","indigochild website englisch",'n0');
   }
   else
   {
      kolom[0].blok[0].addLink("fragebogen_formular_kinder.htm","fragebogen indigo kinder",'r0');
      kolom[0].blok[0].addLink("das_indigo_kind_kapitel_7_indigo_selbsttest.htm","indigo selbsttest",'r0');
      kolom[0].blok[0].addLink("http://www.indigochild.net","indigochild website englisch",'n0');
   }

   //speciale actie om eventueel extra dochterpagina's op te vragen
   for (i=0; i < lijst.length; i++)
   {
      record=lijst[i].split("¶");
      if (record[0] == 'D') //speciaalblok voor uitbreiding blok met dochterpagina's
      {
    	i++; record=lijst[i].split("¶");
	while (record[0].length != 1)
	   {
	       //bigbrother controleert of de links wel pagina.nl bevatten
	       if (record[0].indexOf('.start4all.com') > 0)
	    	   kolom[0].blok[0].addLink(record[0],record[1],record[2],record[3],record[4],record[5]);
	       i++; record=lijst[i].split("¶");
	   }
	break;
      }

}

   kolom[2].blok[0]=new bloktype('Indigo Kinder Familie',01,0,'L');
   getPersLinks();
   for (p=0; p < UrlLijst.length;p++)
   {
        kolom[2].blok[0].addLink(UrlLijst[p].Url,UrlLijst[p].Bijschrift,'n0');
   }
   if (beginletter=='groot')
       kolom[2].blok[0].addLink("die_indigo_kinder_werbung.htm","indigo kinder therapeuten webring",'r1');
   else
       kolom[2].blok[0].addLink("die_indigo_kinder_werbung.htm","indigo kinder therapeuten webring",'r1');
}


function writeKop(kolNum,blokNum)
{
   with (kolom[kolNum].blok[blokNum])
   {
     document.writeln('<TABLE BGCOLOR="'+color+'" WIDTH=192 border=0 cellspacing=0><TR><TD ALIGN="LEFT">' +
     '<FONT SIZE="2" FACE="Arial" COLOR="#FFFFFF"><B>' + kop +
     '</B></FONT></TD><TD ALIGN=RIGHT>');
     if (show==true)
     {
	document.writeln('<A HREF=JavaScript:hide('+kolNum+','+ blokNum+');><img align=right border=0 height=15 width=18' +
	' src="x.gif"></a></td></TR><TR><TD bgcolor="'+tablecolor+'" colspan=2><font face="Arial" size="2">');
	if (btype=='Search')
	{
	   document.writeln('</font><FORM NAME=searchforit ACTION=javascript:doSearch('+kolNum+','+blokNum+');void(0)//method=GET>');
	   document.writeln('<SELECT NAME="service">');
	}
     }
     else
     {
	document.writeln('<A HREF=JavaScript:unhide('+kolNum+','+blokNum+');><img align=right border=0  height=15 width=18'     +
	' src="o.gif"></a></td></TR><TR><TD bgcolor="'+tablecolor+'" colspan=2><font face="Arial" size="2">');

     }
   }
}
function writeLinks(kolNum,blokNum)
{
     for (k=0; k<kolom[kolNum].blok[blokNum].nextLink; k++)
     {
	with (kolom[kolNum].blok[blokNum].hlinks[k])
	{
	   if (kolom[kolNum].blok[blokNum].btype=='Norm')
	   {
		goWord=i+','+j+','+k;
		if (meerRegel)
		{   document.writeln('<A HREF="javascript:go('+goWord+');"' +
		    ' onMouseOver="mo('+goWord+');return(true);" onMouseOut="co();">'+
		    '<font color="'+linkCol+'"><I>'+oms+'</A></I></FONT><BR>');
		}
		else
		{
		    document.writeln('<A HREF="javascript:go('+goWord+');"'+
		       ' onMouseOver="mo('+goWord+');return(true);" onMouseOut="co();">'+
		       oms + extra);
		}
	   }
	   else
	   {
		document.writeln('<option value="'+adres+'">'+oms);
	   }
	}
     }
}
function getCookie(cookieNaam) {
  var cname = cookieNaam + "=";
  var i = 0;
  while (i < document.cookie.length) {
    var j = i + cname.length;
    if (document.cookie.substring(i, j) == cname){
    var leng = document.cookie.indexOf (";", j);
    if (leng == -1) leng = document.cookie.length;
    return unescape(document.cookie.substring(j, leng));
    }
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return "*";
}
function delCookie(cookieNaam)
{
  document.cookie = cookieNaam + "=; expires= Thu, 01-Jan-70 00:00:01 GMT";
  document.cookie = cookieNaam + "=; expires= Thu, 01-Jan-70 00:00:01 GMT; path=/";
  return true;
}

function setCookie(cookieNaam, cookieInhoud)
{
  document.cookie = cookieNaam + "= " + escape (cookieInhoud) +
	"; expires=Mon, 01-Jan-2001 00:00:01 GMT; path=/"
}
var UrlLijst= new Array();
function persLink(Url,Bijschrift)
{
    this.Url=Url;
    this.Bijschrift=Bijschrift;
}
function getPersLinks()
{
   cookieWaarde= getCookie('PERSLINK');
    if (cookieWaarde=='*')
    {
       return false
    }
    else
    {
       UrlGegevens = cookieWaarde.split("¶¶");
       for (p=0; p < UrlGegevens.length; p++)
       {
	    kruimel = UrlGegevens[p].split("  ");
	    UrlLijst[p]= new persLink(kruimel[0], kruimel[1]);
       }
       return true;
    }
}
function writebody()
{
vulObjecten();
d.write('<CENTER><table width="600" border="0" cellspacing="0" cellpadding="0"><TR>');
d.write('<TD ALIGN="CENTER">');
d.write('<img src="img/wort3_spiritualitaet.jpg" width="445" height="67"><br><br>')
d.write('</td></tr></TABLE><table width="600" border="0" cellspacing="0" cellpadding="0"><tr>');

for (i=0; i <= kolAant; i++)
{
  with(kolom[i])
  {

	if (i!=0)
		document.writeln('<td width="12">&nbsp;</td><TD WIDTH=192 VALIGN="TOP">');
	else
		document.writeln('<TD WIDTH=192 VALIGN="TOP">');
	
	
	for (j=0; j < nextBlok; j++)
	{
	  with(blok[j])
	  {
	     if (show==true)
	     {
	     	if (btype=='Search')
	     	{
	     	   if (i==1 && j==0)
	     	   {
	     		writeKop(i,j);
	     	   }
	     	}	
	     	else
	     	{
			writeKop(i,j);
			writeLinks(i,j);
			document.writeln('</td></tr></TABLE><BR>');
		}
		if (btype=='Search' && j==0 && i==1)
		{
			writeLinks(i,j);
			document.writeln('</SELECT><BR>');
			document.writeln('<input name="query" VALUE="" size=16>');
			document.writeln('<INPUT TYPE="button" VALUE="Go" onClick="doSearch('+i+','+j+')">');
		}
		
		if (btype=='Search' && j==0 && i==1)
		{
			document.writeln('</td></tr></TABLE><BR></FORM>');
		}

	     }
	  }
	}
	for (j=0; j < nextBlok; j++)
	{
	  with(blok[j])
	  {
	     if (show!=true)
	     {
		writeKop(i,j);
		document.writeln('</font></td></tr></TABLE><BR>');
	     }
	  }
	}
	document.writeln('</TD>');
    }
  }
}

