function popUp(url, width, height) {
	day = new Date();
	id = day.getTime();
	self.open(url, id, 'scrollbars=no, status=0, menu=0, toolbar=0, resizable=no, copyhistory=0, width=' + width + ', height=' + height);
}

function insertSmiley(text) {
	
  var txtarea = document.gastenboek.bericht;
  
  if (txtarea.createTextRange && txtarea.caretPos) {
  
    var caretPos = txtarea.caretPos;
    caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
    txtarea.focus();
  
  } else {
  
    txtarea.value  += text;
    txtarea.focus();
  
  }
  
}

function getBrowserHeight(){
    if (window.innerHeight){
        return window.innerHeight;}  
    else if (document.documentElement && document.documentElement.clientHeight != 0){
        return document.documentElement.clientHeight;    }
    else if (document.body){return document.body.clientHeight;}      
        return 0;
}

function setBrowser() {

	var browserHeight = getBrowserHeight() - 61;
	
	elem = document.getElementById("bottom");
	elem.style.top = browserHeight + "px";
	
	
}
