/*******
** vp **	
*******/


function setBlur() {
	entries = document.getElementsByTagName('a');
	for (var i=0; i < entries.length; i++) {
		entries[i].onfocus = function() {this.blur()}
	}
}

function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}  
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
				windowWidth = document.documentElement.clientWidth;
		} 
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	} 
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		} 
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

var DEFAULTCONTENTHEIGHT = 0;

function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			DEFAULTCONTENTHEIGHT = document.getElementById('con').offsetHeight;
			var footerElement = document.getElementById('con_footer');
			var footerHeight = footerElement.offsetHeight;
			if (windowHeight - (DEFAULTCONTENTHEIGHT + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.top = (windowHeight - footerHeight + 0) + 'px'; // het getal erbij is de padding van de 'con' container. 
			}
			else {
				//footerElement.style.position = 'static';
				footerElement.style.position = 'absolute';
				footerElement.style.top = (DEFAULTCONTENTHEIGHT + 0) + 'px'; // het getal erbij is de padding van de 'con' container.
			}
		}
	}
}

/******
** versie 1.0 date : 28092004
******/

// JavaScript Document
var SCREEN_WIDTH = 750;
var navPosition;

function activateMenu(ID) {
	if(document.getElementById(ID)) {
		navPosition = document.getElementById(ID).offsetLeft;
		items = document.getElementById(ID).getElementsByTagName('li');
		for (i=0; i<items.length; i++) {
			if(items[i].id) {
				items[i].menu = document.getElementById(items[i].id + '_over');
				items[i].menu.style.width = items[i].menu.offsetWidth + "px";
				items[i].menu.style.left = getXPos(items[i]) + "px";
				items[i].onmouseover = function (e) {
					if (top.opendropdown) closeOpen();
					this.className = 'over';
					this.menu.style.visibility = 'visible';
					top.opendropdown = this;
				};
				items[i].onmouseout = function (e) {closeNav(e) };
				items[i].menu.onmouseout = function (e) {closeNav(e)};
			}
		}
	}
}


function getXPos(navItem) {
	xCorrection = 0;
	firstPos = navItem.offsetLeft;
	subWidth = document.getElementById(navItem.id + '_over').offsetWidth;
	if ((firstPos + navPosition + subWidth) > SCREEN_WIDTH) {
		firstPos += (navItem.offsetWidth - subWidth);
		xCorrection = 0;
	}

	return firstPos + xCorrection;
}

function closeNav(e) {
	var to = (e) ? e.relatedTarget : event.toElement;
	if (top.opendropdown) {
		if (to) {//Do not close in response to events within the menu itself
			var tg = to.tagName.toLowerCase();
			if (tg == "ul") return false;
			if (tg == "li") return false;
			if (tg == "a") return false;
			if (to == top.opendropdown.menu) return false;
		}
		closeOpen();
		return true;
	}
}

function closeOpen () {
	top.opendropdown.className = '';
	top.opendropdown.menu.style.visibility = 'hidden';
}

function printPage(){
	window.print();
}

function blinkIt() {
 if (!document.all) return;
 else {
   for(i=0;i<document.all.tags('blink').length;i++){
      s=document.all.tags('blink')[i];
      s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
   }
 }
}

var textA='';
var delayA=50;
var currentCharA=1;
var destinationA="[not defined]";

function typeA()
{
  if (document.getElementById)
  {
    var destA=document.getElementById(destinationA);
    if (destA)
    {
      destA.innerHTML=textA.substr(0, currentCharA);
      currentCharA++
      if (currentCharA>textA.length)
      {
        currentCharA=1;
		typeB();
        setTimeout("typeA()", 90000);
      }
      else
      {
        setTimeout("typeA()", delayA);
      }
    }
  }
}

var textB='';
var delayB=50;
var currentCharB=1;
var destinationB="[not defined]";

function typeB()
{
  if (document.getElementById)
  {
    var destB=document.getElementById(destinationB);
    if (destB)
    {
      destB.innerHTML=textB.substr(0, currentCharB);
      currentCharB++
      if (currentCharB>textB.length)
      {
        currentCharB=1;
        setTimeout("typeB()", 90000);
      }
      else
      {
        setTimeout("typeB()", delayB);
      }
    }
  }
}

function startTypingA(textParamA, delayParamA, destinationParamA)
{
  textA=textParamA;
  delayA=delayParamA;
  currentCharA=1;
  destinationA=destinationParamA;
  typeA();
}

function startTypingB(textParamB, delayParamB, destinationParamB)
{
  textB=textParamB;
  delayB=delayParamB;
  currentCharB=1;
  destinationB=destinationParamB;
  typeB();
}

function TypingB(textParamB, delayParamB, destinationParamB)
{
  textB=textParamB;
  delayB=delayParamB;
  currentCharB=1;
  destinationB=destinationParamB;
}
