function Eind()  {
LastDate();
document.write("<!-- main table om witruimte links en rechts te bepalen -->");
document.write("</TD><TD width=10%>&nbsp;</TD></TR></TBODY></<TABLE>");
document.write("<!-- einde main table -->");
}

function initArray() {  
   this.length = initArray.arguments.length
   for (var i = 0; i < this.length; i++)
   this[i+1] = initArray.arguments[i]
}

function LastDate() {
var DOWArray = new initArray("zondag","maandag","dinsdag","woensdag",
                             "donderdag","vrijdag","zaterdag");
var MOYArray = new initArray("januari","februari","maart","april",
                             "mei","juni","juli","augustus","september",
                             "oktober","november","december");
var LastModDate = new Date(document.lastModified);

window.status = "Over het verlicht bewustzijn, (c) 2009.";

document.write("<div id='eindecode'><br><br><hr width='90%' size=1 align=center color='#000080'>");
document.write("<br><center><font size='-1'>");

document.write("Deze pagina is voor het laatst gewijzigd op ");
document.write(DOWArray[(LastModDate.getDay()+1)]," ");
document.write(LastModDate.getDate()," ",MOYArray[(LastModDate.getMonth()+1)]);
document.write(" ",(LastModDate.getYear()),".");

document.write("<a href='#Top'>");
document.write("<img src='images/ster.gif' width=21 height=21 border=0 alt='Terug naar het begin van deze pagina'>");
document.write("</a>");

document.write("<br><br>&copy; 2005-2010: Stephen Boonzaaijer.</font></center><br></div>");
}

function VerbergDoor(){
	var obj_divnaam = document.getElementById('stuurdoor');
	obj_divnaam.style.display='none';
	var obj_divnaam = document.getElementById('linkdoor');
	obj_divnaam.style.display='block';
}

function LaatzienDoor(){
	document.emailform.dezepagina.value = window.location.pathname;
	var obj_divnaam = document.getElementById('stuurdoor');
	obj_divnaam.style.display='block';
	var obj_divnaam = document.getElementById('linkdoor');
	obj_divnaam.style.display='none';
}

function page_begin() {
var str_opstand1 = window.location.href ;


if (str_opstand1.indexOf('opstandeling') > 0) {

document.write('<div class=menuphp><iframe name="inframe" id="inframe" SRC="../indexnew.html" WIDTH=155 HEIGHT=570 SCROLLING=NO> ');
document.write('Als u dit kan lezen, begrijpt uw browser de IFRAMEs niet.<BR> ');
document.write('Niet getreurd, hier komt alsnog de link naar de menu ');
document.write('<A HREF="../indexnew.html">paginas</A>.</iframe></div> ');

document.write('<A name="#Top"></A><p>&nbsp; <table width="100%"><tr><td width="20%"><p>&nbsp;</p></td><td width="75%"> ');

        if (str_opstand1.indexOf('login') == -1) {
                document.write('<div id="linkdoor"><a href="join.php"> ');
                document.write('<img src="../images/im_new.gif" width="102" height="18" alt="Voeg een reactie toe" border="0"></a></div> ');
                document.write('<div id="linkwie"><a href="gebruikers.php"> ');
                document.write('<img src="../images/friends.gif" width="23" height="21" alt="Opstandelingen" border="0"></a><br /><br /></div> ');
		document.write('<div id="linkdruk"><a href="javascript:window.print();"> ');
		document.write('<img src="../images/print.gif" width="86" height="18" alt="Druk deze pagina af" border="0"></a></div>');
                document.write('<div id="linkuit"><a href="logout.php"> ');
                document.write('<img src="../images/logout.gif" width="86" height="16" alt="Uitloggen" border="0"></a></div> ');
        }
} else {
document.write('<div class=menu><iframe name="inframe" id="inframe" SRC="../indexnew.html" WIDTH=155 HEIGHT=570 SCROLLING=NO> ');
document.write('Als u dit kan lezen, begrijpt uw browser de IFRAMEs niet.<BR> ');
document.write('Niet getreurd, hier komt alsnog de link naar de menu ');
document.write('<A HREF="../indexnew.html">paginas</A>.</iframe></div> ');

document.write('<A name="#Top"></A><p>&nbsp; <table width="100%"><tr><td width="20%"><p>&nbsp;</p></td><td width="75%"> ');
document.write('<div id="linkdoor"><a href="javascript:LaatzienDoor();"> ');
document.write('<img src="../images/sendtopic.gif" width="97" height="18" alt="Stuur naar een vriend" border="0"></a></div> ');
document.write('<div id="linkdruk"><a href="javascript:window.print();"> ');
document.write('<img src="../images/print.gif" width="86" height="18" alt="Druk deze pagina af" border="0"></a></div>');
SetDoor();
}

document.write('<br><div class="mainBody"> ');

var str_search1 = window.location.search
if (str_search1.substr(1,3) == "?y=") {
var str_search2  = str_search1.substr(3);
var str_search3  = str_search2.replace(/%20/g, " ");
document.write( str_search3 );
}

}

function page_einde() {
document.write('</div></td><td width="5%"><p>&nbsp;</p></td></tr></table> ');
var DOWArray = new initArray("zondag","maandag","dinsdag","woensdag",
                             "donderdag","vrijdag","zaterdag");
var MOYArray = new initArray("januari","februari","maart","april",
                             "mei","juni","juli","augustus","september",
                             "oktober","november","december");
var LastModDate = new Date(document.lastModified);

window.status = "Over het verlicht bewustzijn, (c) 2009.";

document.write("<div id='eindecode'><br><br><hr width='90%' size=1 align=center color='#000080'>");
document.write("<br><center><font size='-1'>");
document.write("Deze pagina is voor het laatst gewijzigd op ");
document.write(DOWArray[(LastModDate.getDay()+1)]," ");
document.write(LastModDate.getDate()," ",MOYArray[(LastModDate.getMonth()+1)]);
document.write(" ",(LastModDate.getYear()),".");
document.write("<a href='#Top'>");
document.write("<img src='../images/ster.gif' width=21 height=21 border=0 alt='Terug naar het begin van deze pagina'>");
document.write("</a>");
document.write("<br><br>&copy; 2005-2010: Stephen Boonzaaijer.</font></center><br></div>");
document.write("<!-- main table om witruimte links en rechts te bepalen -->");
document.write("</TD><TD width=10%>&nbsp;</TD></TR></TBODY></<TABLE>");
document.write("<!-- einde main table -->");
document.write('<div id="eindecode"></div> ');
}

function Hallo() {
day = new Date()
hr = day.getHours()
document.write("<center><b>");
if (hr < 12) {
	if (hr > 6) {
document.write("Goedemorgen.")
	}
	else {
document.write("Goedenacht.")
	}
}
else {
	if (hr > 18) {
document.write("Goedenavond.")
	}
	else {
document.write("Goedemiddag.")
	}
}
document.write("</b></center>");
}

function SetDoor() {
        document.write('<div id="stuurdoor" > ');
        document.write('<a href="javascript:VerbergDoor();" class="sluitdoor"> ');
        document.write('<img src="../images/kruis.gif" border="0" alt="Sluit berichtvenster" ></a> ');
        document.write('<center><b>Stuur deze pagina door</b></center> ');
        document.write('<form name="emailform" action="../gast/verlichtstuur.php" method="post"> ');
        document.write('<label for="emailwie">Aan: (Emailadres = verplicht)</label> ');
        document.write('<input type="text" id="emailwie" name="emailwie" value="" class="inputdoor" > ');
        document.write('<label for="emailwat">Onderwerp:</label> ');
        document.write('<input type="text" id="emailwat" name="emailwat" value="Pagina aangeraden door een vriend" class="inputdoor" > ');
        document.write('<label for="emailhoe">Bericht:</label> ');
        document.write('<textarea id="emailhoe" name="emailhoe" cols="27" rows="5"></textarea> ');
        document.write('<label for="emailzend">Van: (Emailadres)</label> ');
        document.write('<input type="text" id="emailzend" name="emailzend" value="" class="inputdoor" > ');
        document.write('<input type="hidden" class="inputdoor" id="dezepagina" name="dezepagina" value="www.verlichtbewustzijn.nl"> ');
        document.write('<p align="center"> ');
        document.write('<input type="submit" id="senddoor" value=" " alt="Stuur door" title="Stuur door" class="senddoor" > ');
        document.write('</p></form></div> ');
}

function setFrameHide() {
var iframeElement = parent.document.getElementById('inframe'); 
iframeElement.style.height = 25; //100px or 100% 
}
function setFrameShow() {
var iframeElement = parent.document.getElementById('inframe'); 
iframeElement.style.height = 570; //100px or 100% 
}
