function checkInhoudBericht() {
	var x = document.getElementById("bericht").value;
	
	if( x == "Bericht...") {
		document.ticks.bericht.style.color = "#000000";
		document.ticks.bericht.value = "";
	}
	else {
		document.ticks.bericht.value = x;
	}
}

function checkInhoudBron() {
	var x = document.getElementById("bron").value;
	
	if( x == "Bron...") {
		document.ticks.bron.style.color = "#000000";
		document.ticks.bron.value = "";
	}
	else {
		document.ticks.bron.value = x;
	}
}

function writeTag(code)
{
	var x = document.getElementById("bericht").value;
	
	if(x == "Bericht...") {
		document.ticks.bericht.value = "";
		document.ticks.bericht.style.color="#000000";
		
		this.code = code;
    	document.ticks.bericht.value = code ;
    	document.ticks.bericht.focus();
	}
	else {
		var cache = document.ticks.bericht.value;
    	this.code = code;
    	document.ticks.bericht.value = cache + code ;
    	document.ticks.bericht.focus();
	}
}

function clock() {
	thistime= new Date()
	hours=thistime.getHours()
	minutes=thistime.getMinutes()
	seconds=thistime.getSeconds()
	if (eval(hours) <10) {hours="0"+hours}
	if (eval(minutes) < 10) {minutes="0"+minutes}
	if (seconds < 10) {seconds="0"+seconds}
	thistime = hours+":"+minutes+":"+seconds
	
	if(document.getElementById('klok')) {
		document.getElementById('klok').innerHTML=thistime
		var timer=setTimeout("clock()",1000)
	}
}
window.onload=clock

/**
   * function move
   *
   * Scrollt de content van een div.
   *
   * @element: Id van het te laten scrollen div
   * @direction: up of down
   * @move: Scrollsnelheid / -hoeveelheid (20 is 1 regel)
   **/

   function move (element, direction, move)
   {
      var top = getScrollY(element);
      var objDiv = document.getElementById(element);

      if (!move)
      {
         var move = 20;
      }

      if (direction == "down")
      {
         move = top+move;
      }

      else if (direction == "up")
      {
         move = top-move;
      }

      //Netscape
      if (typeof(objDiv.pageYOffset) == 'number')
      {
         objDiv.pageYOffset = move;
      }

      //DOM en IE6
      else if (objDiv.scrollTop >= 0)
      {
         objDiv.scrollTop = move;
      }
   }


  /**
   * function getScrollY
   *
   * Haalt de positie op van de content van een div.
   *
   * @element: Id van het div
   **/

   function getScrollY (element)
   {
      var obj = document.getElementById(element);
      var scrOfY = 0;

      //Netscape
      if (typeof(obj.pageYOffset) == 'number')
      {
         scrOfY = obj.pageYOffset;
      }

      //DOM en IE6
      else if (obj.scrollTop >= 0)
      {
         scrOfY = obj.scrollTop;
      }

      return(scrOfY);
   }


  /**
   * function by_url
   *
   * Genereert een redirect inclusief de laatste positie van de content van een div.
   *
   * @element: Id van het div
   **/

   function by_url (element)
   {
      window.location = "?position=" + getScrollY(element);
   }


