var serverCheck1 = "N";
var serverCheck2 = "N";
var srt_website = "NL";
var chk_domein = location.hostname.toString();
chk_domein = chk_domein.toUpperCase();
chk_domein = chk_domein.indexOf(".BE");
if (chk_domein != -1) {
  srt_website = "BE";
}

/*onderstaande functie is nodig omdat internet explorer niet alles snapt van css
  in het bijzonder dingen als hover worden door ie alleen maar bij links gebruikt
	deze functie hangt een klasse naam aan de elementen zodat het alsnog goedkomt
	zie ook de stylesheet menu_stijl.css
	
	deze functie wordt aangeroepen in de onload van iedere pagina*/
	
function menu_ie(){
  /* currentStyle restricts the Javascript to IE only */
  if (document.all && document.getElementById("nav").currentStyle) {  
  var navroot = document.getElementById("nav");
    /* Get all the list items within the menu */
    var lis=navroot.getElementsByTagName("LI");  
    for (i=0; i<lis.length; i++) {
      /* assign the function to the LI */
      lis[i].onmouseover=function() {		
        this.className+=" over";
	    }
      lis[i].onmouseout=function() {                       
        this.className=this.className.replace(" over", "");
      }
      /* If the LI has another menu level */
      if(lis[i].lastChild.tagName=="UL"){
        /* assign the function to the LI */
        lis[i].onmouseover=function() {		
          /* display the inner menu */
          this.className+=" over";
          this.lastChild.style.display="block";
  	    }
	      lis[i].onmouseout=function() { 
	        /* hide the inner menu */ 
          this.className=this.className.replace(" over", "");                     
          this.lastChild.style.display="none";
	      }
      }
    }
  } 
}

/* cursorHand:  Maak van de muisaanwijzer een handje (aanklik-indicatie)  */
function cursorHand(src)
{
      src.style.cursor = 'hand';
}

/* cursorDefault: Maak van de muisaanwijzer een pijl (default-indicatie)  */
function cursorDefault(src)
{
      src.style.cursor = 'default';
}

/* midtrixKlik: Er is geklikt op de "snelkoppelingen" in de header
*/
function midtrixKlik(celNr)
{
   if (celNr == 1)  // Rondreis 2006
      {
      top.location.href = '/reis/2008/rondreis2008.html';
      }
   if (celNr == 2)  // Contactinfo 
      {
      top.location.href = '/contact.html';
      }
}

/* dateNL: retourneert een ingegeven datum in een datum dd-mon-yyyy met "mon" in NL-code
*/
function dateNL(p_datum,p_break)
{
   var string = "";
   var monthArray = new Array("Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec");
   var invoerDate = new Date(p_datum);
   var jaar=invoerDate.getYear();
   var maand=invoerDate.getMonth();
   var dag=invoerDate.getDate();
   var uren=invoerDate.getHours();
   var minuten=invoerDate.getMinutes();
   if (jaar<1000)  jaar+=1900;
   if (dag<10) dag = " " + dag;
   if (uren<10) uren = "0" + uren;
   if (minuten<10) minuten = "0" + minuten;
   string = dag + '-' + monthArray[maand] + '-' + jaar + p_break + uren +':' + minuten ;
   return string;
}

function header(){
  document.write('<table width="100%" border="0"><tr><td width="25%">   <table border="0" cellspacing="1" width="100%">');
  document.write('      <tr>');
  document.write('                    <td height="40" align="center"');
  document.write('                         onMouseOver="cursorHand(this);window.status=\'Rondreis 2006\';return true" ');
  document.write('                         onMouseOut="cursorDefault(this);window.status=\' \';return true" ');
  document.write('                         onClick="midtrixKlik(1);">');
  document.write('                         <p><img src="/images/griek_wapper.gif" align="middle" ');
  document.write('                         width="35" height="25" border="0" alt="Rondreis 2006">');
  document.write('                    </td>');
  document.write('         <td height="40" align="center"');
  document.write('                         onMouseOver="cursorHand(this);window.status=\'Neem contact met mij op\';return true" ');
  document.write('                         onMouseOut="cursorDefault(this);window.status=\' \';return true" ');
  document.write('                         onClick="midtrixKlik(2);">');
  document.write('                         <p><img src="/images/contact.gif" align="middle" ');
  document.write('                         width="35" height="41" border="0" alt="Neem contact met mij op">');
  document.write('         </td> </tr> </table>');
  document.write('</td><td><a href="/index.html"><img src="/images/gs00.jpg" alt="GrasSoft" border="0" width="315" height="60"></a></td><td width="25%"><div class="update">Laatste update :<br><br>'+dateNL(document.lastModified,'<br>')+'</div></td></tr></table>');
	window.name="hoofdpagina";
}

function footer(){
  document.write('<div id="footer"><table width="100%" border="0"><tr><td><img src="/images/gs_logo.gif" alt="GrasSoft" border="0" width="45" height="36"></td><td>GrasSoft Website Services</td><td><img src="/images/gs_logo.gif" alt="GrasSoft" border="0" width="45" height="36"></td></tr></table></div>');
}


/*  aantal5HartJaren: Dynamische bepaling v/h aantal jaren sinds oprichting */
function aantal5HartJaren()
{
   var jaar;
   var atlJaren;
   Today = new Date();
   jaar = Today.getUTCFullYear();
   atlJaren = jaar - 1984;
   return atlJaren;
}

function copyrightJaren()
{
   var jaar;
   var Jaren;
   Today = new Date();
   jaar = Today.getUTCFullYear();
   Jaren = "&copy;2002-"+jaar;
   document.write(Jaren);
}

function webServerCheck()
{
   if (serverCheck1 == 'N')
      {
      document.all.chk1.src = 'images/signs01.gif';
      }
   else
      {
      document.all.chk1.src = 'images/signs04.gif';
      }
   if (serverCheck2 == 'N')
      {
      document.all.chk2.src = 'images/signs01.gif';
      }
   else
      {
      document.all.chk2.src = 'images/signs04.gif';
      }
   if (serverCheck1 == 'N' || serverCheck2 == 'N')
      {
      document.all.srvbalk.innerHTML = '<h2 style="color:white; background-color:blue; text-align=center;">&nbsp;<br>Mijn eigen foto-album-server<h1>Is buiten gebruik, probeer later weer.</h1>&nbsp;</h2>';
      }
   else
      {
      document.all.srvbalk.innerHTML = '<h2 style="color:white; background-color:blue; text-align=center;">&nbsp;<br>Mijn eigen foto-album-server<h1><a id="witlink" href="http://www.grassoft.no-ip.info/gallery" alt="Mijn foto albums" target="_blank">Klik hier</a></h1>&nbsp;</h2>';
      }
}

