
function SetFirstHeader(strTekst, strURL) {
document.write('<div style=" text-align:center; vertical-align:top;">');
document.write('<table width="100%" style="border-collapse:collapse; border:1px; border-spacing:0px; border-padding:0px;">');

// rij 1  -  titelbalk
document.write('<tr><td rowspan="2" style="text-align:center; border:none;">');
document.write('<img src="../pics/rotarywiel.jpg" valign="top" width="50" align="center">');
document.write('</td>');
document.write('<td id="titel" style="text-align:center; padding:5px; font-size:26px; height:22; border:none;">');
document.write('<b>ROTARY CLUB ANTWERPEN WILRIJK-TERBEKE</b>');
document.write('</td>');
document.write('<td rowspan="2" style="text-align:center; border:none;">');
document.write('<img src="../pics/bokkekop.gif" valign="top" width="40" align="center">   ');
document.write('</td>');
document.write('<td rowspan="2" width="120" style="text-align:center; border:solid 2px red;">');
document.write(strMaand);
document.write('</td>');
document.write('</tr>');
// rij2 - scroll als er iets te scrollen is anders spaceholder
if (strTekst.length > 0 ) {  
document.write('<tr><td style="text-align:center; vertical-align:top; height:16px; font-size: 14px; border:none;">');
document.write('<MARQUEE behavior="scroll" loop="-1" scrollamount="3" scrolldelay="1" hspace="17" OnMouseOver="this.stop();" OnMouseOut="this.start();">');
if (strURL.length > 0 ) {
document.write('<a href="'+strURL+'" target="tekst">');
}
document.write('<b>'+strTekst+'</b>');
if (strURL.length > 0 ) {
document.write('</a>');
}
document.write('</MARQUEE></td></tr>');
} else {
document.write('<tr><td></td></tr>');
}
document.write('</table></div>');
}

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Headers van de andere bladzijden
//=============================
function SetPageHeader() {
SetFirstHeader("","");
}
//+++++++++++++++++++++++++++++++++++++++++++++++++
// Hoofding voor multiple-keuze - in rood de gekozen bladzijde (=j)
function Hoofding(strTitel,j,fig) {

var k = strTitel.length;
var strHfd = new Array(k);
var strUrl = new Array(k);

for( i=0; i< k; i++ ) {
// hoofding
var p=0
a=strTitel[i].indexOf("|",p);
strHfd[i]=strTitel[i].substring(a,p);
//Url
p=a+1;
a=strTitel[i].indexOf("|",p);
strUrl[i]=strTitel[i].substring(a,p);
}

//hoofding-figuur

document.write('<div id="masthead" align="center"><h1 id="carmina"><img src="pics/'+fig+'" width="800" height="100"></h1>');
document.write('<div id="globalNav"><b>');
//Titelbalk in twee lijnen

for( i=0; i< k; i++ ) {
if (i == Math.ceil(k/2)) {
document.write('|<br>');
}

if( i==j) {
document.write('| <u><font color="red">'+strHfd[i]+'</font></u> ');
} else {
document.write('| <a href="'+strUrl[i]+'">'+strHfd[i]+'</a> ');
}
}
//afsluiter
document.write('|</b></div></div>');
document.write('');

}

//Laadt een url in het eerste frame
function laadlist(strURL) {
	top.frames[0].location.href= strURL ;
}

//Laadt een url in het tweede frame 
function laadtekst(strURL) {
	top.frames[1].location.href= strURL ;
}
//====================================================

function Welkom()  {

var today = new Date();
var rDe = 0;
var hr = -1;
var nD = -1;
if ( hr != today.getHours())
{if ( nD != today.getDate())
{nFY = today.getFullYear();
			nM = today.getMonth();
			nD = today.getDate();
			todayA = new Date(nFY,nM,nD,4,0,0)
			endofyear = new Date(nFY-1, 11, 31,6,0,0);
			Tday = Math.ceil((todayA.getTime()-endofyear.getTime())/(1000*60*60*24));
			W1day = Tday;
			if( endofyear.getDay() <6) W1day += endofyear.getDay() + 1;
			Week = Math.ceil((W1day)/7);
			Mes2 = ".";
			for (ir = 1; ir <= rDe; ir++)
			{eval("Rm = rV" + ir + "[0] - 1; Rd = rV" + ir +"[1]"); if ( Rm == nM && Rd == nD) Mes2 = "" + eval("rV" + ir + "[2]");}
			Mese = (".<br> Wij zijn dag " + Tday + " in week " + Week + Mes2)}
		hr = today.getHours();
		gr = " nacht";
		if (hr >= 5) gr = " morgen";
		if (hr >= 12) gr = " middag";
		if (hr >= 14) gr = " namiddag";
		if (hr >= 18) gr = " avond";
		if (hr >= 22) gr = " nacht";
		Mesb = ("Goede" + gr +" op deze ")}
Message = Mesb + today.toLocaleString().slice(0,-3) + Mese;		
document.getElementById('tijdscript').innerHTML = Message;
//setTimeout('Welkom()',1000);
setTimeout('Welkom()',60000);
}

// KleurFader voor titel
//===================
function fminit(){
if (!document.getElementById) return;
fma1=221; fma2=0; fma3=0;
fma4=0; fma5=0; fma6=221;
if (!fmfg){
fmtemp=fma1; fma1=fma4; fma4=fmtemp; fmtemp=fma2; fma2=fma5; fma5=fmtemp; fmtemp=fma3; fma3=fma6; fma6=fmtemp;
}
fmfg = !fmfg;
fmFade();
}
function fmToHex(n){
var hexChars = "0123456789ABCDEF";
if (n == 0) return "00";
var j, n;
var temp = "";
while (n != 0){
j = n % 16;
n = (n - j)/16;
temp = hexChars.charAt(j) + temp;
}
if (temp.length < 2){
temp = "0" + temp;
}
return temp;
}

function fmFade(){
obj = document.getElementById('titel').style;
fmcolor = "#" + fmToHex(fma1) + fmToHex(fma2) + fmToHex(fma3);
obj.color = fmcolor;
if (fma1 != fma4){
if (fma4 > fma1){fma1++;}
else{fma1--;}}
if (fma2 != fma5){
if (fma5 > fma2){fma2++;}
else{fma2--;}}
if (fma3 != fma6){
if (fma6 > fma3){fma3++;}
else{fma3--;}}
if ((fma1 == fma4) && (fma2 == fma5) && (fma3 == fma6)){
window.clearTimeout(fmTimer);
fminit()}
else{
fmTimer = window.setTimeout("fmFade()",5);
}
}
/*************************************************************************
  ---------- iFRAME SCOLLER ----------------------------------------------
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

	var timer_id;
	
	function scroll_iframe(frm,inc,dir) 
	{
		if (timer_id) 
			clearTimeout(timer_id);
			
		if (window.frames[frm]) 
		{
			if (dir == "vert") 
				window.frames[frm].scrollBy(0, inc);
			else 
				window.frames[frm].scrollBy(inc, 0);
				
			timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20);
		}
	}

	function stopScroll() 
	{ 	
		if (timer_id) clearTimeout(timer_id); 
	}

function scroll(berichtjes) {

var k = berichtjes.length;
var i = 0;
title = new Array(k);
picture = new Array(k);
url= new Array(k);
text = new Array(k);

for( i=0; i< k; i++ ) {
//title
var p=0;
a=berichtjes[i].indexOf("|",p);
title[i]=berichtjes[i].substring(a,p);
//picture
p=a+1;
a=berichtjes[i].indexOf("|",p);
picture[i]=berichtjes[i].substring(a,p);
//url
p=a+1;
a=berichtjes[i].indexOf("|",p);
url[i]=berichtjes[i].substring(a,p);
//text
p=a+1;
a=berichtjes[i].indexOf("|",p);
text[i]=berichtjes[i].substring(a,p);
}

for( i=0; i< k; i++ ) {
document.write('<div style="font-size:12px;" align="center"><u><b>'+title[i]+'</b></u>');

if (picture[i] >"") {
if (url[i] >"") {
document.write('<a href="'+url[i]+'" target="tekst">');
}
document.write('<br><img src='+ picture[i]+' width="150">');
if (url[i]>"") {
document.write('</a>');
}
}
document.write('<br></div>'+text[i]+'</b><br><br><br>');
}

}	
	
	
/* -============== XXXXXXX ========================- */



//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// vertikale scroller voor vijf velden per infoscroll - zie aankondigingteksten "info"-array
function scroller(info, lengte, snelh, target)   {

var k = info.length;
var i = 0;
datum = new Array(k);
urlstr = new Array(k);
title = new Array(k);
ingress = new Array(k);
match = new Array(k);

for( i=0; i< k; i++ ) {
// datum
var p=0;
a=info[i].indexOf("|",p);
datum[i]=info[i].substring(a,p);
//urlstr
p=a+1;
a=info[i].indexOf("|",p);
urlstr[i]=info[i].substring(a,p);
//title
p=a+1;
a=info[i].indexOf("|",p);
title[i]=info[i].substring(a,p);
// ingress
p=a+1;
a=info[i].indexOf("|",p);
ingress[i]=info[i].substring(a,p);
//match
p=a+1;
a=info[i].indexOf("|",p);
match[i]=info[i].substring(a,p);
}
document.write('<marquee scrolldelay="'+snelh+'" scrollamount="1" direction="up" height="'+lengte+'" OnMouseOver="this.stop();" OnMouseOut="this.start();">');
for( i=0; i< k; i++ ) {
document.write('<div class="article" style="font-family: Verdana, Arial, Helvetica, sans-serif;">');
document.write('<div class="date">'+datum[i]+'</div>');
document.write('<div class="title">');
if (urlstr[i]!="") {
document.write('<a href="'+urlstr[i]+'" Target='+target+'>'+title[i]+'</a>');
} else {
document.write(title[i]);
}
document.write('</div>');
document.write('<div class="ingress">'+ingress[i]+'</div>');
document.write('<div class="match"><i>'+match[i]+'</i></div>');
document.write('</div>');
}
document.write('</marquee>');
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// vertikale scroller voor een veld per infoscroll 
function vertscroller(info, snelh, hoogte)   {   

var k = info.length;
var i = 0;
document.write('<marquee scrolldelay="'+snelh+'" behavior="scroll" scrollamount="1" direction="up" height="'+hoogte+'" OnMouseOver="this.stop();" OnMouseOut="this.start();">');
for( i=0; i< k; i++ ) {
var Tekst= 
document.write('<font face="Verdana" color="#000066" size="1"><div >'+info[i]+'</div></font><br>');

}
document.write('</marquee>');
}
//=============================================

//+++++++++++++++++++++++++++++++++++++++++++++++++++++
// Print een tekst in bladzijde - start is titel in <H1> - iedere zin begint met <p>

function Printtekst(strTitle, strTekst) {      // Print tekst met titel 

var k = strTekst.length;
document.write('<div style="text-align:center; vertical-align=top">')
document.write('<table class="speciaal" style="margin-left:auto; margin-right:auto;">')
//eerst de titel
if (strTitle != "")  {
document.write('<tr><td>');
document.write('<h1>'+strTitle+'</h1>');
document.write('</td></tr>');
}
// print tekst in tabel
document.write('<tr><td>');
for( i=0; i< k; i++ ) {
	if (strTekst[i] != "")  {
		document.write('<p class="links">'+strTekst[i]+'</p>');
		document.write('<br>');
	}
}
document.write('</td></tr></table></div>');
}	

// Inhoud van bladzijde als in tabelvorm nodig is - titel is in H1
//===================================================

function Printtabel(strTitle, nKolom, strTekst, nBorder) {      // Print tekst met titel en url

//eerst de titel
if (strTitle != "")  {
document.write('<table style="margin-left:auto; margin-right:auto;"><tr><td>');
document.write('<h1>'+strTitle+'</h1>');
document.write('</td></tr></table>');
}

// splits Teksten die in de verschillende colommen moeten komen en namen voor mededelingen - lengte regelt zich automatisch
var k = strTekst.length;
var n = Number(nKolom);
var b = Number(nBorder);

var strDeel = new Array(n);
for( j=0; j< n; j++ ) {
strDeel[j] = new Array(k);
}
for( i=0; i< k; i++ ) {
// genereer per lijn i de subteksten(i)  per kolom.
var p=0;
var a=-1;

for( j=0; j< n; j++ ) {
p=a+1;
a=strTekst[i].indexOf("|",p);
strDeel[j][i]=strTekst[i].substring(a,p);
}
}

// print j teksten in tabel
document.write('<table style="margin-left:auto; margin-right:auto;">');
for( i=0; i< k; i++ ) {
	if (strTekst[i] != "")  {
		document.write('<tr>');
		for( j=0; j< n; j++ ) {
			document.write('<td style="text-align: left; padding:3px; vertical-align: top; border:solid '+b+'px;">'+strDeel[j][i]+'</td>');
		}
	document.write('</tr>');
	}
}
document.write('</table>');
}		

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function PrintBestuur(strBestuur,strJaar) {        // print bestuur van jaar strJaar

var strFunc = new Array(strBestuur.length);
var strNaam = new Array(strBestuur.length);
for( i=0; i< strBestuur.length; i++ ) {
// Functie
p=0
a=strBestuur[i].indexOf("|",p);
strFunc[i]=strBestuur[i].substring(a,p);
// Naam
p=a+1;
a=strBestuur[i].indexOf("|",p);
strNaam[i]=strBestuur[i].substring(a,p);
}

document.write('<DIV align="center">');
document.write('<FIELDSET STYLE="width: 70%;">');
document.write('<LEGEND><H1>Bestuur en Commissies '+ strJaar +'</H1></LEGEND>');

document.write('<table width="80%" align="center"><b>');

for( i=0; i< strBestuur.length; i++ ) {
if(strNaam[i]) {
document.write('<tr><td class="functie" height="7" width="50%">'+strFunc[i]+'</td>');
document.write('<td class="functie" width="50%">'+strNaam[i]+'</td></tr>');
} else {
document.write('<tr><td align="center" class="functietitel" colspan="2"><br><u>'+strFunc[i]+'</u></td></tr>');
}
}
document.write('</b></table>');
document.write('<br></FIELDSET></DIV>');

}

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function PrintActiviteiten(strData, strJaar)  {        //Print de activiteiten van  strJaar

strDatum = new Array(strData.length);
strBetreft = new Array(strData.length);
strLink=new Array(strData.length);


for( i=0; i< strData.length; i++ ) {
// Datum
p=0
a=strData[i].indexOf("|",p);
strDatum[i]=strData[i].substring(a,p);
// Betreft
p=a+1;
a=strData[i].indexOf("|",p);
strBetreft[i]=strData[i].substring(a,p);
// Link
p=a+1;
a=strData[i].indexOf("|",p);
strLink[i]=strData[i].substring(a,p);
}

document.write('<H1>Activiteiten '+strJaar+'</H1>');
document.write('<table  border="1" Cellspacing="0">');
for( i=0; i< strData.length; i++ ) {
if (i==0){
document.write('<tr><td><P class="hoofd"><b><u>'+strDatum[i]+'</u></b></td>');
document.write('<td><P class="hoofd">&nbsp;&nbsp;&nbsp;<b><u>'+strBetreft[i]+'</u></b></td>');
document.write('</TR>');
}
if (i>0){
document.write('<tr><td><P class="gewoon">'+strDatum[i]+'</td>');
document.write('<td><P class="gewoon">'+strBetreft[i]);
if ( strLink[i].length > 0 ) {
document.write(' <A href="' + strLink[i] + '" target="tekst">klik hier</a> ');
}
document.write('</td></tr>');
}
}
document.write('</TABLE>');
}

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function MndtoNr(maand) {
switch(maand) {
case "Jan": return "01";
case "Feb": return "02";
case "Mar": return "03";
case "Apr": return "04";
case "May": return "05";  
case "Jun": return "06"; 
case "Jul": return "07"; 
case "Aug": return "08";
case "Sep": return "09";
case "Oct": return "10";  
case "Nov": return "11"; 
case "Dec": return "12"; 
default: return "";
}
}

function DagtoNr(dag)  {
if (dag.slice(-1) == " ") { 
return "0" + dag.slice(0,1);
}
return dag;
}

function GetNextThu() {
var i
var heden = new Date().getTime() ;
for (i=0 ; i<7; i++) {
datum = heden + i*24*60*60*1000 ;
var dat = new Date(datum);
var wdg = dat.toString().slice(0,3);
if (wdg=="Thu")   {
var fotodatum = dat.getFullYear().toString().slice(-2)
fotodatum = fotodatum + MndtoNr(dat.toString().slice(4,7)) ;
fotodatum = fotodatum + DagtoNr(dat.toString().slice(8,10)) ;
return fotodatum;
}
}
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function Gewijzigd(dateModified, plaats) {                 // geef datum gewijzigd
 
// var dateModified = document.lastModified;
var mydate = dateModified.slice(0,16);


if (navigator.appName == "Microsoft Internet Explorer") {
	var mydate1 = mydate.substr(3,2) +' '+ kiesmaand(mydate.substr(0,2)) +' '+ mydate.substr(6,4);
}
if (navigator.appName == "Opera") {
	
	var mydate1 = mydate.substr(5,2) +' '+ kiesmaand(mydate.substr(8,3)) +' '+ mydate.substr(12,4);
}
if (navigator.appName == "Netscape") {
	
	var mydate1 = mydate
}

if (plaats != "") {
	if (plaats == "rechts") {
	document.write('<p class="rechts"></b><font size="1">Laatst gewijzigd: ' + mydate1 + '</font></p>');
	} 
	if (plaats == "links") {
	document.write('<p class="links"></b><font size="1">Laatst gewijzigd: ' + mydate1 + '</font></p>');
	}
	} else {
	document.write('<p class="gewoon"></b><font size="1">gewijzigd: ' + mydate1 + '</font></p>');
	}
}

function kiesmaand(maand) {
var mnd;
switch(maand) {
case "Jan": return "januari";
case "Feb": return "februari";
case "Mar": return "maart";
case "Apr": return "april";
case "May": return "mei";  
case "Jun": return "juni"; 
case "Jul": return "juli"; 
case "Aug": return "augustus";
case "Sep": return "september";
case "Oct": return "oktober";  
case "Nov": return "november"; 
case "Dec": return "december"; 
case "01" : return "januari";
case "02" : return "februari";
case "03" : return "maart";
case "04" : return "april";    
case "05" : return "mei";      
case "06" : return "juni";     
case "07" : return "juli";     
case "08" : return "augustus"; 
case "09" : return "september";
case "10" : return "oktober";  
case "11" : return "november";
case "12" : return "december";

default: return "";
}
return mnd;
}

//=========================================

function noRightClick( mouse_event ) { 
var msg  = "Geen Toegang!"; 
 	if ( document.all ) { 
		// do nothing 
	} else if ( document.getElementById ) { 
		document.captureEvents( Event.MOUSEDOWN ) 
	} else if ( document.layers ) { 
		document.captureEvents( Event.MOUSEDOWN ) 
	} 
         // Probably Internet Explorer 4 and later 
     if( document.all ) { 
        if( event.button == 2 || event.button == 3 ) { 
            alert( msg ); 
            return false; 
        } 
    } 
         // Probably Netscape 6 and later 
     else if ( document.getElementById ) { 
         if( mouse_event.which == 3 ) { 
            alert( msg ); 
            return false; 
        } 
    } 
         // Probably Netscape 4 
     else if ( document.layers ) { 
         if( mouse_event.which == 3 ) { 
            alert( msg ); 
            return false; 
        } 
    } 
} 

//====================================================
function printform(frm) { 
formulier=window.open(frm);
formulier.print();
//formulier.close();
//window.close(frm);
}
// end hiding from old browsers -->