function start(maillist) {
  getheight(maillist);
  setmeter(3500, 4000);
}

function setmeter(currentvalue, maxvalue) {
  for (var i=1; i < 5; ++i) {
     elem('val' + i).innerHTML = '&euro; ' + parseInt(maxvalue / 4) * i;
  }
  var fillrate = parseInt(currentvalue * 163 / maxvalue);
  elem('vulling').style.height = fillrate + 'px';
  elem('vulling').style.top = (182 - fillrate) + 'px';
}

function getheight(maillist) {
  if (!maillist) maillist = 'maillist';

  var topheight = elem('topcontainer').offsetHeight;
  topheight += elem('graphiclines').offsetHeight;
  topheight += 2;

  var totalheight = get_windowHeight();
  var padding = 30;
  var maillistheight = 75;
  if (maillist == 'nomaillist') {
     maillistheight = 0;
  }
  elem('leftpart').style.height = (totalheight - topheight) + 'px';
  elem('content').style.height = (totalheight - topheight - padding - maillistheight) + 'px';
  elem('contentcontainer').style.height = (totalheight - topheight - padding) + 'px';
  
  return true;
}
function initFotolijst() {
   var elmContent = document.body; // elem('content');
   var divs = elmContent.getElementsByTagName( 'div' );
   for (i=0; i < divs.length; ++i) {
      var elmCurrent = divs[i];
      if (elmCurrent.className == 'fotolijst') {
         elmButton = document.createElement('button');
         elmButton.innerHTML = "bekijk alle foto's";
         elmButton.onclick = new Function('setVisible(this.parentNode)');
         elmButton.className = 'setvisible';
         elmCurrent.appendChild(elmButton)
         
         elmButton = document.createElement('button');
         elmButton.innerHTML = "verbergen";
         elmButton.style.display = 'none';
         elmButton.onclick = new Function('setInvisible(this.parentNode)');
         elmButton.className = 'setinvisible';
         elmCurrent.appendChild(elmButton);
      }
   }
}
function setVisible(elmLijst) {
   for (i=0; i<elmLijst.childNodes.length;++i) {
      elmCurrent = elmLijst.childNodes[i];
      if (elmCurrent.tagName == 'A') {
         elmCurrent.style.display = 'block';
         elmCurrent.setAttribute('target', '_blank');
      }
      else if (elmCurrent.tagName == 'BUTTON') {
         if (elmCurrent.className == 'setvisible') {
            elmCurrent.style.display = 'none';
         }
         else if (elmCurrent.className == 'setinvisible') {
            elmCurrent.style.display = 'block';
         }
      }
   }
}
function setInvisible(elmLijst) {
   for (i=0; i<elmLijst.childNodes.length;++i) {
      elmCurrent = elmLijst.childNodes[i];
      if (elmCurrent.tagName == 'A') {
         elmCurrent.style.display = 'none';
      }
      else if (elmCurrent.tagName == 'BUTTON') {
         if (elmCurrent.className == 'setvisible') {
            elmCurrent.style.display = 'block';
         }
         else if (elmCurrent.className == 'setinvisible') {
            elmCurrent.style.display = 'none';
         }
      }
   }
}
function get_windowHeight()
{
   var myHeight = 0;
   if( typeof( window.innerWidth ) == 'number' )
   { //Non-IE
      myHeight = window.innerHeight;
   }
   else
   {
      if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
      { //IE 6+ in 'standards compliant mode'
      myHeight = document.documentElement.clientHeight;
      }
      else
      {
         if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
         { //IE 4 compatible
            myHeight = document.body.clientHeight;
         }
      }
   }
   return myHeight;
}
var elmA, elmImg, elmSpan;
function openpic(image, text) {
   strURLprefix = 'gfx/restauratie/';
   elmDiv = elem('picture');

   elmSpan = document.createElement('span');
   elmSpan.innerHTML = text;
   
   elmImg = document.createElement('img');
   elmImg.setAttribute('src',strURLprefix + image+'600.jpg');
   elmImg.setAttribute('alt','afbeelding: '+image+'.jpg');

   elmA = document.createElement('a');
   elmA.setAttribute('href', strURLprefix + image+'.jpg');
   elmA.setAttribute('target', '_blank');
   elmA.innerHTML = 'link naar het plaatje op hoge resolutie';

   elmDiv.appendChild(elmSpan);
   elmDiv.appendChild(elmImg);
   elmDiv.appendChild(elmA);
   elmDiv.style.display='block';
}
function closepic() {
   elmDiv = elem('picture');
   elmDiv.removeChild(elmA);
   elmDiv.removeChild(elmImg);
   elmDiv.removeChild(elmSpan);
   elmDiv.style.display='none';
}
function elem(strElemId) {
   return document.getElementById(strElemId);
}

//function for 
function clearonce(elem)
{
   if (elem.value == 'email')
      elem.value='';
}


/*
function rollon() {
  if (window.event.srcElement.className == "navblock") {
    window.event.srcElement.className = "navblock highlight"; // change class
  }
}

function rolloff() {
  if (window.event.srcElement.className == "navblock highlight") {
    window.event.srcElement.className = "navblock item"; // change class
  }
}

// assign rollon() to handle onMouseOver events
document.onMouseOver = rollon;

// assign rolloff() to handle onMouseOut events
document.onMouseOut = rolloff;
*/


