function button( menuID)
{
 document.getElementById("mb1").style.color = "#a44";
 document.getElementById("mb2").style.color = "#a44";
 document.getElementById("mb3").style.color = "#a44";
 document.getElementById("mb4").style.color = "#a44";
 if ( menuID > 0) {
  mi = document.getElementById("mb"+menuID);
  mi.style.color = "#f44";
 }
}
function menu( menuID)
{
 frm = document.subForm;
 switch ( menuID) {
  case 0:
   frm.action = "getdoc.php?"+Math.random();
	 frm.fName.value = "welkom.html";
	 frm.submit();
	 break;
  case 1:
   frm.action = "getdoc.php?"+Math.random();
	 frm.fName.value = "filosofie.html";
	 frm.submit();
	 break;
  case 2:
   frm.action = "getdoc.php?"+Math.random();
	 frm.fName.value = "applicaties.html";
	 frm.submit();
	 break;
  case 3:
   frm.action = "getdoc.php?"+Math.random();
	 frm.fName.value = "statistieken.html";
	 frm.submit();
	 break;
  case 4:
   frm.action = "getdoc.php?"+Math.random();
	 frm.fName.value = "contact.html";
	 frm.submit();
	 break;
 }
}

function doResize()
{
 bs = document.getElementById("bSize");
 db = document.getElementById("dataBody");
 pb = document.getElementById("portfolioBody");
 pt = document.getElementById("portfolioTitle");
 mn = document.getElementById("menu");
 lg = document.getElementById("logo");
 st = document.getElementById("statics");

 it = eval((bs.offsetHeight - 593)/2);
 il = eval((bs.offsetWidth - 1000)/2);

 mt = eval(it + 90);
 ml = eval(il + 35);
 db.style.top = mt+"px";
 db.style.left = ml+"px";
 db.style.visibility = "visible";

 mt = eval(it + 40);
 ml = eval(il + 23);
 mn.style.top = mt+"px";
 mn.style.left = ml+"px";
 mn.style.visibility = "visible";

 mt = eval(it + 60);
 ml = eval(il + 715);
 pb.style.top = mt+"px";
 pb.style.left = ml+"px";
 pb.style.visibility = "visible";

 mt = eval(it + 40);
 ml = eval(il + 710);
 pt.style.top = mt+"px";
 pt.style.left = ml+"px";
 pt.style.visibility = "visible";

 mt = eval(it + 510);
 ml = eval(il + 710);
 lg.style.top = mt+"px";
 lg.style.left = ml+"px";
 lg.style.visibility = "visible";

 mt = eval(it + 10);
 ml = eval(il + 10);
 st.style.top = mt+"px";
 st.style.left = ml+"px";
 st.style.visibility = "visible";
// st.style.border = "1px solid blue";
}

function showImage( imageName, imageComment)
{
 window.open("showimage.php?foto="+imageName+"&comment="+imageComment,"","status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=no,width=1000,height=700");
}

timer = 0;
function startPortfolio()
{
 pf1 = document.getElementById("PB1");
 pf2 = document.getElementById("PB2");

 pf1.style.top = 0+"px";
 pf2.style.top = eval( pf1.offsetHeight)+"px";

 scrollPortfolio();
}
function scrollPortfolio()
{
 pf1 = document.getElementById("PB1");
 pf2 = document.getElementById("PB2");

 pf1T = pf1.offsetTop - 1;
 pf1H = pf1.offsetHeight;
 if (  pf1T + pf1H <= 0) {
  pf1T = 0;
 }

 pf1.style.top = eval(pf1T)+"px";
 pf2.style.top = eval( pf1T + pf1H)+"px";

 timer = window.setTimeout( "scrollPortfolio()", 200);
}
function stopPortfolio()
{
 window.clearTimeout( timer);
 timer = 0;
}
function restartPortfolio()
{
 if ( timer == 0) {
  scrollPortfolio();
 }
}
