<!--

var gintScriptErrors = 0;
var gblnErrorHandlingActive = false;
var gblnErrorHandlingTestmode = false;
var gblnErrorHandlingSilentmode = false;

function blnJSErrorHandler(vstrErrorMessage, vstrErrorURL, vintErrorLine)
  {
  gblnErrorHandlingActive = true;
  if(gblnErrorHandlingTestmode)
    {
    gblnErrorHandlingTestmode = false;
    return true;
    }

  gintScriptErrors++;

  try
    {
    var objRequest = objAJAX_CreateRequest();
    if(objRequest)
      {
      var astrParameterNames = astrAJAX_GetParameterArray();
      var astrParameterValues = astrAJAX_GetParameterArray();

      astrParameterNames.push('txt');
      astrParameterValues.push(vstrErrorMessage);
      astrParameterNames.push('url');
      astrParameterValues.push(vstrErrorURL);
      astrParameterNames.push('line');
      astrParameterValues.push(vintErrorLine);
      astrParameterNames.push('agent');
      astrParameterValues.push(navigator.userAgent);

      AJAX_SendRequest_PostAsync(objRequest, 2, astrParameterNames, astrParameterValues, null);
      objRequest = null;
      }
    }
  catch(e) {}

  
      if(gblnErrorHandlingSilentmode)
      {
      gblnErrorHandlingSilentmode = false;
      return true;
      }
    else
      {
      return false;
      }
    }

function JSError_ThrowContentError(vstrSource, vobjError)
  {
  var strText = '<span class="text_error"><b>';
  strText += 'Dieser Inhalt kann momentan leider nicht angezeigt werden.';
  strText += '</b></span>';
  document.writeln(strText);

  var strDescription = '';
  if(typeof(vobjError.description) != 'undefined')
    {
    strDescription = vobjError.description;
    }
  else
    {
    strDescription = vobjError;
    }

  strText = vstrSource + '\n(' + strDescription + ')';
  gblnErrorHandlingSilentmode = true;
  throw new Error(strText);
  }

window.onerror = blnJSErrorHandler;

//-->