function onAjaxRequestCompleted(response)
{
  PKPRequestParser.parse(response);
}


function popup_component(url)
{
 var popupComm = new PKPComm(url);
 popupComm.updatePlatform();
}


function toggleWhatsThis()
{
  $state = document.getElementById("whatsthis-text").style.display;
  document.getElementById("whatsthis-text").style.display = ($state == "block" ) ? "none" : "block";
}


function maxlength(element, maxchars) 
{
  if(element.value.length > maxchars)
  {
    element.value = element.value.substring(0,maxchars);
    return false;
  }
  else
  {
    return true;
  }
}
