var chatObserver;
$ = function(id) {
  return document.getElementById(id);
}
window.onload = function() {
  chatObserver = setInterval(function(){ $('chatFrame').src = '/chat.php' }, 30000);
  
  $('chatForm').onsubmit = function() {
    setTimeout(function(){ $('subject').value = '' }, 100);
  }
}
window.unload = function() {
  stopInterval(chatObserver);
  chatObserver = null;
}


