function erase_default_text(text, el)
{
  if (el.value == text)
  {
    el.value = '';
  }
}

function include_js(filename)
{
  document.write('<script type="text/javascript" src="' + filename + '"></scr' + 'ipt>'); 
}

function absolute_url_for(url)
{
  if (!window.location.hostname.match(/^.*\.werkspot\.nl$/))
  {
    return 'http://' + window.location.hostname + '/werkspot.nl/' + url;
  }
  else
  {
    return 'http://' + window.location.hostname + '/' + url;
  }
}

function url_for(url)
{
  if (!window.location.hostname.match(/^.*\.werkspot\.nl$/))
  {
    return '/werkspot.nl/' + url;
  }
  else
  {
    return '/' + url;
  }
}

function checkConversationMessage(default_value, el_id)
{
	  var el = document.getElementById(el_id);
	  element_value = el.value;
	  
	  var alert_message = 'Typ eerst uw bericht in het tekst veld.';
		
	  if (element_value.length > 0)
	  {
	    if (element_value != default_value)
	    {
	      return true;
	    }

	    window.alert(alert_message);
	    return false;
	  }

	  window.alert(alert_message);
	  return false;
}
