function addsmile(smiley) {
 doc_content = document.form.bericht.value + smiley
 document.form.bericht.value = doc_content
 document.form.bericht.focus()
}

function hidepicture(pictureid) {
document.getElementById(pictureid).style.visibility = 'hidden';
}


function MM_openBrWindow(theURL,winName,features) {
 window.open(theURL,winName,features);
}

function setImageDimensions(gotImage)
{
  if(gotImage.width > 300) {
        gotImage.width = 300;
  }
}
function changeImageDimensions(gotImage, type)
{
  if(gotImage.width > 300 && type == 'out') {
        gotImage.width = 300;
    return;
  }
  if(type == 'over') {
        gotImage.removeAttribute('width');
  }
}

function onIFrameLoad() {
var inhoud;
inhoud = iFrame.document.body.innerHTML;
document.getElementById('content').innerHTML = inhoud;
document.getElementById('loading').style.visibility = 'hidden';
}

function haal(onderdeel,id)
{
  document.getElementById('loading').style.visibility = 'visible';
  document.getElementById('casecontent').innerHTML = '';
  if (id)
  {
    window.location.hash = onderdeel+'&page_id='+id;
    var url = 'xmlcase.php?p='+onderdeel+'&page_id='+id;
  }else{
    window.location.hash = onderdeel;
    var url = 'xmlcase.php?p='+onderdeel;
  }
  document.getElementById('iFrame').src=url;
  refresh('online','');
}




function refresh(onderdeel,afterphp)
{
  var http2;
  var browser2 = navigator.appName;
  if ( browser2 == 'Microsoft Internet Explorer' )
      http2 = new ActiveXObject("Microsoft.XMLHTTP");
  else
      http2 = new XMLHttpRequest();

  function data2()
  {
      if (http2.readyState == 4)
      {
          var response = http2.responseText;
          document.getElementById(onderdeel).innerHTML = response;
      }
  }

  var url = onderdeel+'.php'+afterphp;

  http2.open('get', url, true);
  http2.onreadystatechange = data2;
  http2.send("");

}


function plop(theURL,winName) {
  width = 550;
  height = 400;
  window.open(theURL,winName,'width='+width+' height='+height);
}

window.onload=function(){
  if(window.location.hash.length > 0)
    haal(window.location.hash.substring(1,window.location.hash.length));
}

function update_avatar(plaatje) {
var plaatje1 = document.getElementById("plaatje1");
plaatje1.src = plaatje;
}
