function checkframe(topurl)
{
  if (top == self) {
    location.replace( topurl + "?" + location.href );
  }
}
function errorHandler()
{

  return true;
}
window.onerror = errorHandler;