//----------------------------------------------------------------------------//
// AstroSERV API                                                              //
// -------------------------------                                            //
// asvAC = new asvAstroClass()                                                //
// -------------------------------                                            //
// Author: Günter Happel                                                      //
// Copyright © by AstroSERV.com                                               //
//----------------------------------------------------------------------------//
/*
asvAC.APIInit( vsToken , vbAAFInit , vbSymbolInfoInit , vbInterpretationInit , vbDebug )
asvAC.setXVID( vsXVID )
asvAC.getXVID()
asvAC.setGIFImage( vsDestId , viWidth , viHeight , vbShowSymbolInfo , vbShowLoader , vsScrollElementId , vbPositionFixed )
asvAC.getGIFImageURL( viImageWidth , viImageHeight )
asvAC.getGIFImageMAP( vsGIFImageURL )
asvAC.clockInit( vsDestination , vsAAFA , viImageWidth , viImageHeight , vsFixImageURL , vbShowImage , viClockInterval )
asvAC.clockLoad( vsDestId )
asvAC.clockShow( voElement )
asvAC.getVISIONPrm()
asvAC.checkAAF( vsAAFA )
asvAC.getCountryList()
asvAC.getVIPList()
asvAC.getSamplePDF( aafab1 , aafab2 )
asvAC.completeAAF( vsAAFA )
asvAC.setAAF1( vsAAF )
asvAC.setAAF2( vsAAF )
asvAC.getAAFA1()
asvAC.getAAFA2()
asvAC.getAAFB1()
asvAC.getAAFB2()
asvAC.getAAFAB1()
asvAC.getAAFAB2()
asvAC.clearAAF2()
asvAC.swapAAF()
asvAC.setParms( vsParms )
asvAC.getParms()
asvAC.setPDFParms( vsParms )
asvAC.getPDFParms()
asvAC.setOrbname( vsOrbname )
asvAC.getOrbname()
asvAC.setImageContent( viImageContent )
asvAC.getImageContent()
asvAC.setImageBackground( viBackground )
asvAC.getImageBackground()
asvAC.setLineWidth( viLineWidth )
asvAC.getLineWidth()
asvAC.setInterpretationByIndex( viInterpretationIndex )
asvAC.setInterpretationByShortname( vsInterpretationShortname )
asvAC.getInterpretation( vsDestination , vsReturnFunc , vsBeforeFunc , vsAfterFunc  )
asvAC.interpretationDisable()
asvAC.interpretationEnable()
asvAC.getInterpretationList()
asvAC.getInterpretationMode()
asvAC.getInterpretationIndex()
asvAC.getInterpretationShortName()
asvAC.getInterpretationLongName()
asvAC.getInterpretationColor()
asvAC.getInterpretationAmount()
asvAC.getInterpretationBigImageURL()
asvAC.getInterpretationSmallImageCURL()
asvAC.getInterpretationSmallImageSWURL()
asvAC.getXMLURL()
asvAC.setASVURL( vsURL )
asvAC.getASVURL()
asvAC.setToken( vsToken )
asvAC.getToken()
asvAC.askVision( vsQuestion )
asvAC.getSpirITTree()
asvAC.getSpirITText( vsElementId )
asvAC.getACMOSO()
asvAC.symbolInfoMouseOver()
asvAC.symbolInfoMouseOut()
asvAC.symbolInfo()
asvAC.symbolInfoSendRequest()
asvAC.symbolInfoChangeMouseFunc( vsMapContent , vsMouseOverFunc , vsMouseOutFunc )
asvAC.symbolInfoShowInfo()
asvAC.symbolInfoCreateLoader()
asvAC.symbolInfoCreateWindow()
asvAC.symbolInfoChangeWindowColors()
asvAC.symbolInfoInit()
asvAC.debugOn()
asvAC.debugOff()
asvAC.doDebug()
asvAC.showMessage( vsMessage )
//----------------------------------------------------------------------------//
// Session                                                                    //
//----------------------------------------------------------------------------//
asvAC.setSession( vsSession )
asvAC.getSession()
asvAC.setCurrency( vsCurrency )
asvAC.getCurrency()
asvAC.setShippingAddress( voShippingAddress )
asvAC.getShippingAddress()
asvAC.getSessionURL()
asvAC.enableBinding()
asvAC.disableBinding()
asvAC.bindingIsEnabled()
asvAC.updateRemoteInfo()
asvAC.putInterpretationToShoppingCart()
asvAC.putShippingInformationToTransaction()
asvAC.checkTransactions()
*/
//----------------------------------------------------------------------------//

var voAsvSymbolInfoRequest                = false;
var voAsvSymbolInfoElement                = false;

function asvAstroClass()
{
  // Eigenschaften
  this.vs_AC_ASVURL                       = "http://astroserv.com";
  this.vs_AC_XMLURL                       = "/api/xml/self/";
  this.vs_AC_SessionURL                   = "/api/xml/self/session/";
  this.vs_AC_XVID                         = "";
  this.vs_AC_Token                        = "";
  this.vs_AC_AAFAB1                       = "";
  this.vs_AC_AAFAB2                       = "";
  this.vs_AC_Parms                        = "ASTROSOFT";
  this.vs_AC_PDF_Parms                    = "ASTROSOFT";
  this.vi_AC_ImageContent                 = 36;
  this.vi_AC_ImageBackground              = 201;
  this.vi_AC_LineWidth                    = 0;
  this.vs_AC_Orbname                      = "";
  this.vb_AC_Debug                        = false;
  // Interpretation
  this.varr_AC_InterpretationList         = false;
  this.vi_AC_InterpretationRadix          = -1;
  this.vi_AC_InterpretationSynastry       = -1;
  // Variablen für SymbolInfo
  this.vo_AC_SymbolInfoInterval           = false;
  this.vs_AC_SymbolInfoCode               = "";
  // Liste mit VIP-Daten
  this.vo_AC_VIPList                      = false;
  // Länder-Liste
  this.vo_AC_CountryList                  = false;
  // VISION-Parms
  this.varr_AC_VISIONPrm                  = false;
  // Konstanten für VISION - ImageBackground
  this.ci_Q_WhiteBG                       = 201;
  this.ci_Q_TransBG_Light                 = 202;
  this.ci_Q_TransBG_Dark                  = 208;
  this.ci_Q_BlackBG                       = 209;
  // Konstanten für VISION - Parms
  this.cs_PN_ASTROSOFT                    = "ASTROSOFT";
  this.cs_PN_SKYVIEW                      = "!SKYVIEW";
  this.cs_PN_API                          = "!API";
  this.cs_PN_DETHLEFSEN                   = "!DETHLEFSEN";
  this.cs_PN_SFER                         = "!SFER";
  this.cs_PN_MOLS                         = "!MOLS";
  this.cs_PN_VISION                       = "!VISION";
  this.cs_PN_PLACIDUS                     = "!MM_PLACIDUS";
  // Konstanten für VISION - ImageContent
  this.ci_IC_Zeichnung                    = 36;
  this.ci_IC_Aspekte                      = 37;
  this.ci_IC_Daten                        = 38;
  this.ci_IC_AspekteUndDaten              = 16777254;
  this.ci_IC_NurKreis                     = 131108;
  this.ci_IC_Aspektkranz                  = 262180;
  this.ci_IC_NurKreisAspektkranz          = 393252;
  this.ci_IC_Horizont                     = 39;
  this.ci_IC_TransiteGrafisch             = 46;
  this.ci_IC_TransiteTabellarisch         = 47;
  this.ci_IC_ProgressionGrafisch          = 48;
  this.ci_IC_ProgressionTabellarisch      = 49;
  this.ci_IC_Haeuserrhythmen              = 50;
  this.ci_IC_Solarzyklus                  = 51;
  this.ci_IC_Lunationszyklus              = 52;
  this.ci_IC_ArabischePunkte              = 53;
  this.ci_IC_Alterspunkt                  = 72;
  this.ci_IC_Jahre                        = 56;
  this.ci_IC_AlterspunktBiografie         = 58;
  this.ci_IC_Altersprogression            = 57;
  this.ci_IC_DynAuszaehlung               = 54;
  this.ci_IC_DynA_und_F_und_S_Diagramme   = 60;
  this.ci_IC_DynQuadrant                  = 55;
  this.ci_IC_F_und_S_Diagramme            = 61;
  this.ci_IC_Sternhoroskop                = 59;
  this.ci_IC_IntegrationsHoroskop         = 1048638;
  this.ci_IC_SingleKlick                  = 2097215;
  this.ci_IC_Haeuserklick                 = 64;
  this.ci_IC_Mondknotenklick              = 65;
  this.ci_IC_Integral                     = 66;
  this.ci_IC_Tripel                       = 67;
  this.ci_IC_Quartel                      = 68;
  this.ci_IC_2_Brueckenklick              = 69;
  this.ci_IC_AlleKlicks                   = 70;
  this.ci_IC_KlickTripel                  = 71;
  this.ci_IC_MondknotenKlickTripel        = 72;
  this.ci_IC_Deutung                      = 444;
  // Session-Konstanten
  this.cs_SC_EUR                          = "EUR";
  this.cs_SC_CHF                          = "CHF";
  // Session-Variablen
  this.vb_SC_Binding                      = false;
  this.vs_SC_Session                      = "";
  this.vs_SC_Currency                     = "EUR";
  this.vb_SC_Binding                      = false;
  this.vo_SC_ShippingAddress              = new Object();
  this.vo_SC_ShippingAddress.email        = "";
  this.vo_SC_ShippingAddress.vorname      = "";
  this.vo_SC_ShippingAddress.nachname     = "";
  this.vo_SC_ShippingAddress.strasse      = "";
  this.vo_SC_ShippingAddress.hausnummer   = "";
  this.vo_SC_ShippingAddress.postleitzahl = "";
  this.vo_SC_ShippingAddress.ort          = "";
  this.vo_SC_ShippingAddress.land         = "";
  // API initialisieren
  this.APIInit = function( vsToken , vbAAFInit , vbSymbolInfoInit , vbInterpretationInit , vbDebug )
  {
    this.setToken( vsToken );
    if ( ( "boolean" !=  typeof( vbDebug ) )
    ||   ( true      === vbDebug           ) )
    this.debugOn();
    if ( ( "boolean" !=  typeof( vbAAFInit ) )
    ||   ( false     !== vbAAFInit           ) )
    this.setAAF1( ",*,m,=,=,Flumenthal,CH" );
    if ( ( "boolean" !=  typeof( vbInterpretationInit ) )
    ||   ( false     !== vbInterpretationInit           ) )
    this.getInterpretationList();
    if ( ( "boolean" !=  typeof( vbSymbolInfoInit ) )
    ||   ( false     !== vbSymbolInfoInit           ) )
    this.symbolInfoInit();
  }
  // XVID setzen
  this.setXVID = function( vsXVID )
  {
    this.vs_AC_XVID = vsXVID;
  }
  // XVID holen
  this.getXVID = function()
  {
    return this.vs_AC_XVID;
  }
  // Horoskopgrafik erzeugen und in Block-Element einfügen
  this.setGIFImage = function( vsDestId , viWidth , viHeight , vbShowSymbolInfo , vbShowLoader , vsScrollElementId , vbPositionFixed )
  {
    if ( ( "string" !=  typeof( vsDestId ) )
    ||   ( false    === asvStdC.el( vsDestId  ) ) )
    return false;
    var voDest = asvStdC.el( vsDestId );
    if ( null == viWidth )
    viWidth = voDest.offsetWidth;
    if ( null == viHeight )
    viHeight = voDest.offsetHeight;
    if ( ( "boolean" ==  typeof( vbShowLoader ) )
    &&   ( true      === vbShowLoader ) )
    {
      voDest.innerHTML             = "";
      var voLoaderDiv              = asvStdC.createEl( "div" );
      asvStdC.appendEl( voDest , voLoaderDiv );
      var voLoaderImage            = asvStdC.createEl( "img" );
      voLoaderImage.src            = asvStdC.getIMGLoaderImageURL();
      voLoaderImage.alt            = "";
      voLoaderImage.title          = "";
      voLoaderImage.style.display  = "block";
      asvStdC.appendEl( voLoaderDiv , voLoaderImage );
      voLoaderDiv.style.padding    = Math.floor( ( viHeight - voLoaderImage.offsetHeight ) / 2 ) + "px " + Math.floor( ( viWidth - voLoaderImage.offsetWidth ) / 2 ) + "px";
    }
    var vsGIFImageURL        = this.getGIFImageURL( viWidth , viHeight );
    voDest.innerHTML         = "";
    var voImageDiv           = asvStdC.createEl( "div" );
    var voImage              = asvStdC.createEl( "img" );
    voImage.src              = vsGIFImageURL;
    voImage.alt              = "";
    voImage.title            = "";
    voImage.style.display    = "block";
    voImage.style.border     = "0";
    asvStdC.appendEl( voImageDiv , voImage );
    asvStdC.appendEl( voDest , voImageDiv );
    if ( ( "boolean" ==  typeof( vbShowSymbolInfo ) )
    &&   ( true      === vbShowSymbolInfo ) )
    {
      var voMAPResult = this.getGIFImageMAP( vsGIFImageURL );
      if ( ( "object" == typeof( voMAPResult ) )
      &&   ( "string" == typeof( voMAPResult.vsMAPName ) )
      &&   ( "string" == typeof( voMAPResult.vsMAPId ) ) )
      {
        voImage.useMap         = "#" + voMAPResult.vsMAPName;
        var voMAPDiv           = asvStdC.createEl( "div" );
        voMAPDiv.style.display = "none";
        voMAPDiv.innerHTML     = voMAPResult.vsMAPContent;
        asvStdC.appendEl( voDest , voMAPDiv );
        if ( false !== asvStdC.el( voMAPResult.vsMAPId ) )
        {
          asvStdC.el( voMAPResult.vsMAPId ).voImage = voImage;
          if ( "boolean" ==  typeof( vbPositionFixed ) )
          asvStdC.el( voMAPResult.vsMAPId ).vbPositionFixed = vbPositionFixed;
          if ( ( "string" ==  typeof( vsScrollElementId ) )
          &&   ( false    !== asvStdC.el( vsScrollElementId  ) ) )
          asvStdC.el( voMAPResult.vsMAPId ).voScrollElement = asvStdC.el( vsScrollElementId );
        }
      }
    }
  }
  // Horoskopgrafik erzeugen
  this.getGIFImageURL = function( viImageWidth , viImageHeight )
  {
    // ImageWidth setzen
    if ( null == viImageWidth )
    viImageWidth  = 640;
    // ImageHeight setzen
    if ( null == viImageHeight )
    viImageHeight = 480;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getGIFImageURL.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="               + this.getToken()        +
                           "&session="            + this.getSession()      +
                           "&xvid="               + this.getXVID()         +
                           "&aafab1="             + this.getAAFAB1()       +
                           "&aafab2="             + this.getAAFAB2()       +
                           "&Parms="              + this.getParms()        +
                           "&OrbName="            + this.getOrbname()      +
                           "&ImageContent="       + this.getImageContent() +
                           "&ImageWidth="         + viImageWidth           +
                           "&ImageHeight="        + viImageHeight          +
                           "&LineWidth="          + this.getLineWidth()    +
                           "&ImageBackground="    + this.getImageBackground();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "gifimageurl" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "gifimageurl" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    return xmldoc.getElementsByTagName( "gifimageurl" )[0].firstChild.data;
  }
  // Image-MAP holen
  this.getGIFImageMAP = function( vsGIFImageURL )
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getGIFImageMAP.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="        + this.getToken()   +
                           "&session="     + this.getSession() +
                           "&xvid="        + this.getXVID()    +
                           "&GIFImageURL=" + vsGIFImageURL;
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "imagemap" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "imagemap" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var voMAP          = new Object();
    voMAP.vsMAPContent = xmldoc.getElementsByTagName( "imagemap" )[0].firstChild.data;
    var vDate          = new Date();
    voMAP.vsMAPName    = "sm" + vDate.getTime();
    voMAP.vsMAPId      = "idsm" + vDate.getTime();
    voMAP.vsMAPContent = voMAP.vsMAPContent.replace( "klickmap" , voMAP.vsMAPName );
    voMAP.vsMAPContent = voMAP.vsMAPContent.replace( "<map name=" , "<map id=\"id" + voMAP.vsMAPName + "\" name=" );
    return voMAP;
  }
  // Clock initialisieren
  this.clockInit = function( vsDestination , vsAAFA , viImageWidth , viImageHeight , vsFixImageURL , vbShowImage , viClockInterval )
  {
    if ( ( "string" !=  typeof( vsDestination ) )
    ||   ( false    === asvStdC.el( vsDestination  ) )
    ||   ( "string" !=  typeof( vsAAFA        ) ) )
    return false;
    var voDest              = asvStdC.el( vsDestination );
    voDest.vsAAFA           = vsAAFA;
    voDest.viImageWidth     = viImageWidth;
    voDest.viImageHeight    = viImageHeight;
    if ( "string" == typeof( vsFixImageURL ) )
      voDest.vsFixImageURL = vsFixImageURL;
    else
      voDest.vsFixImageURL = null;
    if ( "boolean" == typeof( vbShowImage ) )
      voDest.vbShowImage   = vbShowImage;
    else
      voDest.vbShowImage   = null;
    if ( ( "number" == typeof( viClockInterval ) )
    &&   ( 5000     <  viClockInterval ) )
      voDest.viClockInterval = viClockInterval;
    else
      voDest.viClockInterval = 60000;
    voDest.vsParms           = this.getParms();
    voDest.vsOrbname         = this.getOrbname();
    voDest.viImageContent    = this.getImageContent();
    voDest.viLineWidth       = this.getLineWidth();
    voDest.viImageBackground = this.getImageBackground();
    if ( "number" == typeof( voDest.voInterval ) )
    {
      clearInterval( voDest.voInterval );
      voDest.voInterval = null;
    }
    else voDest.voInterval  = null;
    this.clockLoad( vsDestination );
  }
  // Clock laden
  this.clockLoad = function( vsDestId )
  {
    if ( ( "string" !=  typeof( vsDestId ) )
    ||   ( false    === asvStdC.el( vsDestId  ) ) )
    return false;
    var voDest            = asvStdC.el( vsDestId );
    var vsAAFAB           = this.completeAAF( voDest.vsAAFA );
    if ( false === vsAAFAB )
    {
      voDest.innerHTML = "<span style=\"color:red\">AAF-Fehler: " + voDest.vsAAFA + "</span>";
      return false;
    }
    voDest.vsAAFAB        = vsAAFAB;
    var arrSplit          = vsAAFAB.split( "#B93:" );
    var vsAAFA            = arrSplit[0];
    var vsAAFB            = arrSplit[1];
    var viImageWidth      = voDest.viImageWidth;
    var viImageHeight     = voDest.viImageHeight;
    var vsFixImageURL     = voDest.vsFixImageURL;
    var vbShowImage       = voDest.vbShowImage;
    var viClockInterval   = voDest.viClockInterval;
    var vsParms           = voDest.vsParms;
    var vsOrbname         = voDest.vsOrbname;
    var viImageContent    = voDest.viImageContent;
    var viLineWidth       = voDest.viLineWidth;
    var viImageBackground = voDest.viImageBackground;
    // Breite prüfen
    if ( "number" != typeof( viImageWidth ) )
    viImageWidth = voDest.offsetWidth;
    // Höhe prüfen
    if ( "number" != typeof( viImageHeight ) )
    viImageHeight = voDest.offsetHeight;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getClockImageURL.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="            + this.getToken()   +
                           "&session="         + this.getSession() +
                           "&xvid="            + this.getXVID()    +
                           "&aafab="           + vsAAFAB           +
                           "&Parms="           + vsParms           +
                           "&OrbName="         + vsOrbname         +
                           "&ImageContent="    + viImageContent    +
                           "&ImageWidth="      + viImageWidth      +
                           "&ImageHeight="     + viImageHeight     +
                           "&LineWidth="       + viLineWidth       +
                           "&ImageBackground=" + viImageBackground;
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // Wenn Fehler aufgetreten sind
    if ( null != xmldoc.getElementsByTagName( "error" )[0] )
    if ( false === vsAAFAB )
    {
      voDest.innerHTML = "<span style=\"color:red\">" + xmldoc.getElementsByTagName( "error" )[0].firstChild.data + "</span>";
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "gifimageurl" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "gifimageurl" )[0].firstChild.data ) )
    return false;
    var vsGIFImageURL = xmldoc.getElementsByTagName( "gifimageurl" )[0].firstChild.data;
    // Zeichnung in Ziel-Element per DOM einfügen
    var voImage                = asvStdC.createEl( "img" );
    voImage.src                = vsGIFImageURL;
    voImage.style.border       = "0";
    voImage.style.display      = "block";
    voImage.alt                = "";
    voImage.title              = "";
    voImage.style.width        = viImageWidth  + "px";
    voImage.style.height       = viImageHeight + "px";
    if ( ( "boolean" == typeof( vbShowImage ) )
    &&   ( true === vbShowImage ) )
    {
      voImage.title            = "Für Vollbild bitte klicken!";
      voImage.style.cursor     = "pointer";
      voImage.onclick          = function() { asvAC.clockShow( voDest ); };
    }
    voDest.innerHTML = "";
    asvStdC.appendEl( voDest , voImage );
    voDest.voImage       = voImage;
    voDest.vsGIFImageURL = vsGIFImageURL;
    // Grafik auf fixe Datei kopieren, falls angegeben
    if ( ( "string" == typeof( vsFixImageURL ) )
    &&   ( 0        <  vsFixImageURL.length ) )
    {
      var vsRequestMethod  = "POST";
      var vsRequestFileURL = this.getXMLURL() + "copyImageFile.php";
      var vbAsynchron      = false;
      var vsParameter      = "token="        + this.getToken()   +
                             "&session="     + this.getSession() +
                             "&xvid="        + this.getXVID()    +
                             "&GIFImageURL=" + vsGIFImageURL     +
                             "&FixImageURL=" + vsFixImageURL;
      var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    }
    if ( "number" != typeof( voDest.voInterval ) )
    voDest.voInterval = setInterval( "asvAC.clockLoad( \"" + vsDestId + "\" )" , viClockInterval );
  }
  // Clock anzeigen
  this.clockShow = function( voElement )
  {
    var arrSplit = voElement.vsAAFAB.split( "#B93:" );
    var vsURL    = this.getASVURL() + "/Widgets/Image.php?AAF1=" + arrSplit[0] + "&PN=" + voElement.vsParms + "&IC=" + voElement.viImageContent + "&SI=1";
    var vsXVID   = this.getXVID();
    if ( 0 < vsXVID.length )
    vsURL += "&xvid=" + vsXVID;
    window.open( vsURL );
  }
  // Produkte laden
  this.getInterpretationList = function()
  {
    if ( false !== this.varr_AC_InterpretationList )
    return this.varr_AC_InterpretationList;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getInterpretationList.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="    + this.getToken()   +
                           "&session=" + this.getSession() +
                           "&xvid="    + this.getXVID();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "interpretationitem" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "interpretationitem" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var varrInterpretation = new Array();
    var viIntListLength    = xmldoc.getElementsByTagName( "interpretationitem" ).length;
    for ( var i = 0 ; i < viIntListLength ; i++ )
    {
      var varrNewInt       = new Array();
      var vParmNodeList    = xmldoc.getElementsByTagName( "interpretationitem" )[i].childNodes;
      var viParmListLength = vParmNodeList.length;
      for ( var j = 0 ; j < viParmListLength ; j++ )
      {
        if ( 1 == vParmNodeList[j].nodeType )
        {
          if ( "description" == vParmNodeList[j].nodeName )
          {
            var varrNewDescription = new Array();
            for ( var z = 0 ; z < vParmNodeList[j].childNodes.length ; z++ )
            {
              if ( 1 == vParmNodeList[j].childNodes[z].nodeType )
              varrNewDescription[vParmNodeList[j].childNodes[z].nodeName] = vParmNodeList[j].childNodes[z].firstChild.data;
            }
            if ( "undefined" == typeof( varrNewInt["description"] ) )
            varrNewInt["description"] = new Array();
            varrNewInt["description"].push( varrNewDescription );
          }
          else
            varrNewInt[vParmNodeList[j].nodeName] = vParmNodeList[j].firstChild.data;
        }
      }
      varrInterpretation.push( varrNewInt );
    }
    this.varr_AC_InterpretationList   = varrInterpretation;
    this.vi_AC_InterpretationRadix    = -1;
    this.vi_AC_InterpretationSynastry = -1;
    for ( var i = 0 ; i < this.varr_AC_InterpretationList.length ; i++ )
    {
      if ( ( -1    == this.vi_AC_InterpretationRadix )
      &&   ( "PHD" == this.varr_AC_InterpretationList[i]["shortname"] ) )
      this.vi_AC_InterpretationRadix = i;
      if ( ( -1    == this.vi_AC_InterpretationSynastry )
      &&   ( "PVD" == this.varr_AC_InterpretationList[i]["shortname"] ) )
      this.vi_AC_InterpretationSynastry = i;
    }
    return this.varr_AC_Interpretation;
  }
  // ProduktTyp ermitteln
  this.getInterpretationMode = function()
  {
    if ( ( "" != this.getAAFAB1() )
    &&   ( "" == this.getAAFAB2() ) )
    return "Radix";
    if ( ( "" != this.getAAFAB1() )
    &&   ( "" != this.getAAFAB2() ) )
    return "Synastry";
    return false;
  }
  // ProduktIndex ermitteln
  this.getInterpretationIndex = function()
  {
    var voInterpretationIndex      = new Object();
    voInterpretationIndex.radix    = this.vi_AC_InterpretationRadix;
    voInterpretationIndex.synastry = this.vi_AC_InterpretationSynastry;
    return voInterpretationIndex;
  }
  // Kurzname der Interpretation ermitteln
  this.getInterpretationShortName = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["shortname"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["shortname"];
    return false;
  }
  // Langname der Interpretation ermitteln
  this.getInterpretationLongName = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["longname"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["longname"];
    return false;
  }
  // Farbe der Interpretation ermitteln
  this.getInterpretationColor = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["color"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["color"];
    return false;
  }
  // Preis der Interpretation ermitteln
  this.getInterpretationAmount = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["amounteur"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["amounteur"];
    return false;
  }
  // GrafikURL der großen Interpretationsgrafik ermitteln
  this.getInterpretationBigImageURL = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["imageurl"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["imageurl"];
    return false;
  }
  // GrafikURL der kleinen Interpretationsgrafik (Farbe) ermitteln
  this.getInterpretationSmallImageCURL = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["imageurlsmallc"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["imageurlsmallc"];
    return false;
  }
  // GrafikURL der kleinen SW-Interpretationsgrafik (Scharz/Weiß) ermitteln
  this.getInterpretationSmallImageSWURL = function()
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    if ( "Radix" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationRadix]["imageurlsmallbw"];
    if ( "Synastry" == vsInterpretationMode )
    return this.varr_AC_InterpretationList[this.vi_AC_InterpretationSynastry]["imageurlsmallbw"];
    return false;
  }
  // VISION-Parameter laden
  this.getVISIONPrm = function()
  {
    if ( false !== this.varr_AC_VISIONPrm )
    return this.varr_AC_VISIONPrm;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getVisionParms.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="    + this.getToken()   +
                           "&session=" + this.getSession() +
                           "&xvid="    + this.getXVID();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "parmname" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "parmname" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var varrParms = new Array();
    var viLength  = xmldoc.getElementsByTagName( "parmname" ).length;
    for ( var i = 0 ; i < viLength ; i++ )
    varrParms.push( xmldoc.getElementsByTagName( "parmname" )[i].firstChild.data );
    this.varr_AC_VISIONPrm = varrParms;
    return this.varr_AC_VISIONPrm;
  }
  // AAF-String prüfen
  this.checkAAF = function( vsAAFA )
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "checkAAF.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="    + this.getToken()   +
                           "&session=" + this.getSession() +
                           "&xvid="    + this.getXVID()    +
                           "&aafa="    + vsAAFA;
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false !== voResponse )
    {
      var xmldoc = voResponse["XML"];
      // Rückgabe-Array initialisieren
      var voErgebnis = new Object();
      // Nachname
      if (( null != xmldoc.getElementsByTagName( "lastname" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "lastname" )[0].firstChild ))
        voErgebnis["lastname"] = xmldoc.getElementsByTagName( "lastname" )[0].firstChild.data;
      else
        voErgebnis["lastname"] = "";
      // Vorname
      if (( null != xmldoc.getElementsByTagName( "firstname" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "firstname" )[0].firstChild ))
        voErgebnis["firstname"] = xmldoc.getElementsByTagName( "firstname" )[0].firstChild.data;
      else
        voErgebnis["firstname"] = "";
      // FrauMann
      if (( null != xmldoc.getElementsByTagName( "gender" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "gender" )[0].firstChild ))
        voErgebnis["gender"] = xmldoc.getElementsByTagName( "gender" )[0].firstChild.data;
      else
        voErgebnis["gender"] = "";
      // Datum
      if (( null != xmldoc.getElementsByTagName( "date" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "date" )[0].firstChild ))
        voErgebnis["date"] = xmldoc.getElementsByTagName( "date" )[0].firstChild.data;
      else
        voErgebnis["date"] = "";
      // Zeit
      if (( null != xmldoc.getElementsByTagName( "time" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "time" )[0].firstChild ))
        voErgebnis["time"] = xmldoc.getElementsByTagName( "time" )[0].firstChild.data;
      else
        voErgebnis["time"] = "";
      // Ort
      if (( null != xmldoc.getElementsByTagName( "placename" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "placename" )[0].firstChild ))
        voErgebnis["placename"] = xmldoc.getElementsByTagName( "placename" )[0].firstChild.data;
      else
        voErgebnis["placename"] = "";
      // Land
      if (( null != xmldoc.getElementsByTagName( "countryshort" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "countryshort" )[0].firstChild ))
        voErgebnis["countryshort"] = xmldoc.getElementsByTagName( "countryshort" )[0].firstChild.data;
      else
        voErgebnis["countryshort"] = "";
      // Land lang
      if (( null != xmldoc.getElementsByTagName( "countrylong" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "countrylong" )[0].firstChild ))
        voErgebnis["countrylong"] = xmldoc.getElementsByTagName( "countrylong" )[0].firstChild.data;
      else
        voErgebnis["countrylong"] = "";
      // CSV26
      if (( null != xmldoc.getElementsByTagName( "csv26" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "csv26" )[0].firstChild ))
      voErgebnis["csv26"] = xmldoc.getElementsByTagName( "csv26" )[0].firstChild.data;
      // AAFAB
      if (( null != xmldoc.getElementsByTagName( "aafab" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "aafab" )[0].firstChild ))
      voErgebnis["aafab"] = xmldoc.getElementsByTagName( "aafab" )[0].firstChild.data;
      // AAFA
      if (( null != xmldoc.getElementsByTagName( "aafa" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "aafa" )[0].firstChild ))
        voErgebnis["aafa"] = xmldoc.getElementsByTagName( "aafa" )[0].firstChild.data;
      else
        voErgebnis["aafa"] = "";
      // AAFB
      if (( null != xmldoc.getElementsByTagName( "aafb" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "aafb" )[0].firstChild ))
        voErgebnis["aafb"] = xmldoc.getElementsByTagName( "aafb" )[0].firstChild.data;
      else
        voErgebnis["aafb"] = "";
      // AGZ-Return
      if (( null != xmldoc.getElementsByTagName( "agzreturn" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "agzreturn" )[0].firstChild ))
        voErgebnis["agzreturn"] = xmldoc.getElementsByTagName( "agzreturn" )[0].firstChild.data;
      else
        voErgebnis["agzreturn"] = "";
      // Message
      if (( null != xmldoc.getElementsByTagName( "message" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "message" )[0].firstChild ))
        voErgebnis["message"] = xmldoc.getElementsByTagName( "message" )[0].firstChild.data;
      // MessageNumber
      if (( null != xmldoc.getElementsByTagName( "messagenumber" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "messagenumber" )[0].firstChild ))
        voErgebnis["messagenumber"] = xmldoc.getElementsByTagName( "messagenumber" )[0].firstChild.data;
      // SetFocusTo
      if (( null != xmldoc.getElementsByTagName( "setfocusto" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "setfocusto" )[0].firstChild ))
        voErgebnis["setfocusto"] = xmldoc.getElementsByTagName( "setfocusto" )[0].firstChild.data;
      // aafok?
      if ( null != xmldoc.getElementsByTagName( "aafok" )[0] )
        voErgebnis["aafok"] = true;
      else
        voErgebnis["aafok"] = false;
      // FrauMann unklar?
      if ( null != xmldoc.getElementsByTagName( "getuserfm" )[0] )
        voErgebnis["getuserfm"] = true;
      else
        voErgebnis["getuserfm"] = false;
      // Ähnliche Ortsnamen gefunden?
      if ( null != xmldoc.getElementsByTagName( "agzrelated" )[0] )
      {
        voErgebnis["agzrelated"] = new Array();
        var vRelated             = xmldoc.getElementsByTagName( "agzrelated" );
        var viRelLength          = vRelated.length;
        for ( var i = 0 ; i < viRelLength ; i++ )
        {
          var vNodes       = vRelated[i].childNodes;
          var viNodeLength = vNodes.length;
          for ( var j = 0 ; j < viNodeLength ; j++ )
          {
            if ( 1 == vNodes[j].nodeType )
            voErgebnis["agzrelated"].push( vNodes[j].firstChild.data );
          }
        }
      }
      // Passende Orte gefunden?
      if ( null != xmldoc.getElementsByTagName( "agzaccurate" )[0] )
      {
        voErgebnis["agzaccurate"] = new Array();
        var vAccurate             = xmldoc.getElementsByTagName( "agzaccurate" );
        var viAccLength           = vAccurate.length;
        for ( var i = 0 ; i < viAccLength ; i++ )
        {
          var varrNew      = new Array();
          var vNodes       = vAccurate[i].childNodes;
          var viNodeLength = vNodes.length;
          for ( var j = 0 ; j < viNodeLength ; j++ )
          {
            if ( 1 == vNodes[j].nodeType )
            voErgebnis["agzaccurate"].push( vNodes[j].firstChild.data );
          }
        }
      }
      // Passende Länder gefunden?
      if ( null != xmldoc.getElementsByTagName( "agzcountries" )[0] )
      {
        voErgebnis["agzcountries"] = new Array();
        var vCountries             = xmldoc.getElementsByTagName( "agzcountries" )[0].childNodes;
        var viCountLength          = vCountries.length;
        for ( var i = 0 ; i < viCountLength ; i++ )
        {
          var varrNew      = new Array();
          var vNodes       = vCountries[i].childNodes;
          var viNodeLength = vNodes.length;
          for ( var j = 0 ; j < viNodeLength ; j++ )
          {
            if ( 1 == vNodes[j].nodeType )
            varrNew[vNodes[j].nodeName] = vNodes[j].firstChild.data;
          }
          if ( ( "string" == typeof( varrNew["countryshort"] ) )
          &&   ( "string" == typeof( varrNew["countrylong"] ) ) )
          voErgebnis["agzcountries"].push( varrNew );
        }
      }
      return voErgebnis;
    }
    return false;
  }
  // Länderliste abrufen
  this.getCountryList = function()
  {
    if ( ( false       !== this.vo_AC_CountryList                         )
    &&   ( "undefined" !=  typeof( this.vo_AC_CountryList.varrCountries ) ) )
    return this.vo_AC_CountryList.varrCountries;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getCountryList.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="    + this.getToken()   +
                           "&session=" + this.getSession() +
                           "&xvid="    + this.getXVID();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "country" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "country" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var voActualCountry  = xmldoc.getElementsByTagName( "country" )[0];
    var varrCountryList  = new Array();
    while ( null != voActualCountry )
    {
      if ( 1 == voActualCountry.nodeType )
      {
        var voAktuellerWert = voActualCountry.childNodes.item( 0 );
        var voTemp          = new Object();
        while ( null != voAktuellerWert )
        {
          if ( 1 == voAktuellerWert.nodeType )
          voTemp[voAktuellerWert.nodeName] = voAktuellerWert.firstChild.data;
          voAktuellerWert = voAktuellerWert.nextSibling;
        }
        varrCountryList.push( voTemp );
      }
      voActualCountry = voActualCountry.nextSibling;
    }
    this.vo_AC_CountryList               = new Object();
    this.vo_AC_CountryList.varrCountries = varrCountryList;
    return this.vo_AC_CountryList.varrCountries;
  }
  // VIPs laden
  this.getVIPList = function()
  {

    if ( false !== this.vo_AC_VIPList )
    return this.vo_AC_VIPList;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getVIPList.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="    + this.getToken()   +
                           "&session=" + this.getSession() +
                           "&xvid="    + this.getXVID();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "vip" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "vip" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var voActualVIP  = xmldoc.getElementsByTagName( "vip" )[0];
    var varrVIPList    = new Array();
    var viVIPIndex   = 0;
    while ( null != voActualVIP )
    {
      if ( 1 == voActualVIP.nodeType )
      {
        var voAktuellerWert = voActualVIP.childNodes.item( 0 );
        var voTemp          = new Object();
        while ( null != voAktuellerWert )
        {
          if ( 1 == voAktuellerWert.nodeType )
          voTemp[voAktuellerWert.nodeName] = voAktuellerWert.firstChild.data;
          voAktuellerWert = voAktuellerWert.nextSibling;
        }
        varrVIPList[viVIPIndex] = voTemp;
        viVIPIndex++;
      }
      voActualVIP = voActualVIP.nextSibling;
    }
    this.vo_AC_VIPList = varrVIPList;
    return this.vo_AC_VIPList;
  }
  // Sample PDF holen
  this.getSamplePDF = function( aafab1 , aafab2 )
  {
    if ( "string" != typeof( aafab1 ) )
    aafab1 = "";
    if ( "string" != typeof( aafab2 ) )
    aafab2 = "";
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL()   + "getSamplePDF.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()    +
                           "&session="                 + this.getSession()  +
                           "&xvid="                    + this.getXVID()     +
                           "&aaf1="                    + aafab1             +
                           "&aaf2="                    + aafab2             +
                           "&Parms="                   + this.getPDFParms() +
                           "&InterpretationShortName=" + this.getInterpretationShortName();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false !== voResponse )
    {
      var xmldoc = voResponse["XML"];
      // XML-Document prüfen
      if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
      &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
      {
        this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "interpretationurl" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "interpretationurl" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      // Daten extrahieren
      return xmldoc.getElementsByTagName( "interpretationurl" )[0].firstChild.data;
    }
  }
  // AAFA-String vervollständigen
  this.completeAAF = function( vsAAFA )
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "completeAAF.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="    + this.getToken()   +
                           "&session=" + this.getSession() +
                           "&xvid="    + this.getXVID()    +
                           "&aafa="    + vsAAFA;
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "aafab" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "aafab" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    return xmldoc.getElementsByTagName( "aafab" )[0].firstChild.data;
  }
  // AAF1 setzen
  this.setAAF1 = function( vsAAF )
  {
    if ( "string" == typeof( vsAAF ) )
    {
      if ( -1 != vsAAF.search( /#B93:/ ) )
      {
        this.vs_AC_AAFAB1 = vsAAF;
        return true;
      }
      else
      {
        vsAAF = this.completeAAF( vsAAF );
        if ( false !== vsAAF )
        {
          this.vs_AC_AAFAB1 = vsAAF;
          return true;
        }
      }
    }
    return false;
  }
  // AAF2 setzen
  this.setAAF2 = function( vsAAF )
  {
    if ( "string" == typeof( vsAAF ) )
    {
      if ( -1 != vsAAF.search( /#B93:/ ) )
      {
        this.vs_AC_AAFAB2 = vsAAF;
        return true;
      }
      else
      {
        vsAAF = this.completeAAF( vsAAF );
        if ( false !== vsAAF )
        {
          this.vs_AC_AAFAB2 = vsAAF;
          return true;
        }
      }
    }
    return false;
  }
  // AAFA1 holen
  this.getAAFA1 = function()
  {
    var varrTemp  = this.vs_AC_AAFAB1.split( "#B93:" );
    return varrTemp[0];
  }
  // AAFA2 holen
  this.getAAFA2 = function()
  {
    var varrTemp  = this.vs_AC_AAFAB2.split( "#B93:" );
    return varrTemp[0];
  }
  // AAFB1 holen
  this.getAAFB1 = function()
  {
    var varrTemp  = this.vs_AC_AAFAB1.split( "#B93:" );
    return varrTemp[1];
  }
  // AAFB2 holen
  this.getAAFB2 = function()
  {
    var varrTemp  = this.vs_AC_AAFAB2.split( "#B93:" );
    return varrTemp[1];
  }
  // AAFAB1 holen
  this.getAAFAB1 = function()
  {
    return this.vs_AC_AAFAB1;
  }
  // AAFAB2 holen
  this.getAAFAB2 = function()
  {
    return this.vs_AC_AAFAB2;
  }
  // AAF2 leeren
  this.clearAAF2 = function()
  {
    this.vs_AC_AAFAB2 = "";
  }
  // AAF tauschen
  this.swapAAF = function()
  {
    if ( 0 == this.vs_AC_AAFAB2.length )
    return false;
    var vsAAFAB1Temp  = this.vs_AC_AAFAB1;
    this.vs_AC_AAFAB1 = this.vs_AC_AAFAB2;
    this.vs_AC_AAFAB2 = vsAAFAB1Temp;
  }
  // Parms setzen
  this.setParms = function( vsParms )
  {
    this.vs_AC_Parms = vsParms;
  }
  // Parms holen
  this.getParms = function()
  {
    return this.vs_AC_Parms;
  }
  // PDF-Parms setzen
  this.setPDFParms = function( vsParms )
  {
    this.vs_AC_PDF_Parms = vsParms;
  }
  // PDF-Parms holen
  this.getPDFParms = function()
  {
    return this.vs_AC_PDF_Parms;
  }
  // Orbname setzen
  this.setOrbname = function( vsOrbname )
  {
    this.vs_AC_Orbname = vsOrbname;
  }
  // Orbname holen
  this.getOrbname = function()
  {
    return this.vs_AC_Orbname;
  }
  // ImageContent setzen
  this.setImageContent = function( viImageContent )
  {
    this.vi_AC_ImageContent = viImageContent;
  }
  // ImageContent holen
  this.getImageContent = function()
  {
    return this.vi_AC_ImageContent;
  }
  // ImageBackground setzen
  this.setImageBackground = function( viBackground )
  {
    this.vi_AC_ImageBackground = viBackground;
  }
  // ImageBackground holen
  this.getImageBackground = function()
  {
    return this.vi_AC_ImageBackground;
  }
  // LineWidth setzen
  this.setLineWidth = function( viLineWidth )
  {
    this.vi_AC_LineWidth = viLineWidth;
  }
  // LineWidth holen
  this.getLineWidth = function()
  {
    return this.vi_AC_LineWidth;
  }
  // Interpretation wechseln per Index-Nr
  this.setInterpretationByIndex = function( viInterpretationIndex )
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    if ( ( "" == this.getAAFAB1() )
    &&   ( "" == this.getAAFAB2() ) )
    return false;
    if ( "" != this.getAAFAB2() )
    {
      if ( "Synastry" == this.varr_AC_InterpretationList[viInterpretationIndex]["type"] )
      {
        this.vi_AC_InterpretationSynastry = viInterpretationIndex;
        return true;
      }
    }
    else
    {
      if ( "Radix" == this.varr_AC_InterpretationList[viInterpretationIndex]["type"] )
      {
        this.vi_AC_InterpretationRadix = viInterpretationIndex;
        return true;
      }
    }
    return false;
  }
  // Interpretation wechseln per Kurzname
  this.setInterpretationByShortname = function( vsInterpretationShortname )
  {
    if ( ( null     == this.varr_AC_InterpretationList           )
    ||   ( "object" != typeof( this.varr_AC_InterpretationList ) )
    ||   ( 0        == this.varr_AC_InterpretationList.length    ) )
    return false;
    var viInterpretationIndex = -1;
    for ( var i = 0 ; i < this.varr_AC_InterpretationList.length ; i++ )
    {
      if ( vsInterpretationShortname == this.varr_AC_InterpretationList[i]["shortname"] )
      {
        viInterpretationIndex = i;
        break;
      }
    }
    if ( -1 == viInterpretationIndex )
    return false;
    if ( ( "" != this.getAAFAB1() )
    &&   ( "" == this.getAAFAB2() ) )
    {
      if ( "Radix" == this.varr_AC_InterpretationList[viInterpretationIndex]["type"] )
      {
        this.vi_AC_InterpretationRadix = viInterpretationIndex;
        return true;
      }
    }
    else
    if ( ( "" != this.getAAFAB1() )
    &&   ( "" != this.getAAFAB2() ) )
    {
      if ( "Synastry" == this.varr_AC_InterpretationList[viInterpretationIndex]["type"] )
      {
        this.vi_AC_InterpretationSynastry = viInterpretationIndex;
        return true;
      }
    }
    return false;
  }
  // Interpretation anzeigen
  this.getInterpretation = function( vsDestination , vsReturnFunc , vsBeforeFunc , vsAfterFunc  )
  {
    // id des Ziel-Elementes angegeben?
    if ( ( "string" !=  typeof( vsDestination ) )
    ||   ( false    === asvStdC.el( vsDestination  ) ) )
    return false;
    // Ziel-Element holen
    var voDest = asvStdC.el( vsDestination );
    if ( null == voDest )
    return false;
    // Radix oder Synastry?
    var viInterpretation = 0;
    if ( ( ( "" != this.getAAFAB1() )
    &&     ( "" == this.getAAFAB2() ) )
    ||   ( ( "" == this.getAAFAB1() )
    &&     ( "" != this.getAAFAB2() ) ) )
    viInterpretation = this.vi_AC_InterpretationRadix;
    if ( ( "" != this.getAAFAB1() )
    &&   ( "" != this.getAAFAB2() ) )
    viInterpretation = this.vi_AC_InterpretationSynastry;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getInterpretation.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()   +
                           "&session="                 + this.getSession() +
                           "&xvid="                    + this.getXVID()    +
                           "&aafab1="                  + this.getAAFAB1()  +
                           "&aafab2="                  + this.getAAFAB2()  +
                           "&Parms="                   + this.getParms()   +
                           "&InterpretationShortName=" + this.varr_AC_InterpretationList[viInterpretation]["shortname"];
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "interpretationtextformatted" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "interpretationtextformatted" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var vsInterpretationText = xmldoc.getElementsByTagName( "interpretationtextformatted" )[0].firstChild.data;
    // DeutungText updaten
    voDest.innerHTML = vsInterpretationText;
    // Produktbild anpassen
    var voImage      = asvStdC.el( "idAsvIntProductSymbol" );
    if ( null != voImage ) {
      if ( ( "function" ==  typeof( asvInterpretationDialogCreate ) )
      &&   ( "string"   ==  typeof( vsReturnFunc ) ) )
      {
        voImage.onclick        = function() { asvInterpretationDialogCreate( vsReturnFunc , vsBeforeFunc , vsAfterFunc ); };
        voImage.style.cursor   = "pointer";
        voImage.title          = "Interpretation wählen";
        voImage.onclickBackup  = function() { asvInterpretationDialogCreate( vsReturnFunc , vsBeforeFunc , vsAfterFunc ); };
      }
      else voImage.title = this.varr_AC_InterpretationList[viInterpretation]["longname"];
    }
    // Buttons einfügen
    var voButton = null;
    if ( false !== asvStdC.el( "idAsvIntButtonSCCon" ) )
      voButton = asvStdC.el( "idAsvIntButtonSCCon" );
    else
      voButton = asvStdC.el( "idAsvIntButtonPDFCon" );
    if ( false !== voButton )
    {
      var voInput       = asvStdC.createEl( "input" );
      voInput.type      = "button";
      voInput.className = "clAsvIntBtnDrucken";
      voInput.onclick   = function() { asvAC.getSamplePDF( asvAC.getAAFAB1() , asvAC.getAAFAB2() ); };
      voInput.title     = "Deutungsauszug drucken (Hardcopy)";
      asvStdC.appendEl( voButton , voInput );
      if ( "idAsvIntButtonSCCon" == voButton.id )
      {
        var voText        = document.createTextNode( " " );
        asvStdC.appendEl( voButton , voText );
        var voInput       = asvStdC.createEl( "input" );
        voInput.type      = "button";
        voInput.className = "clAsvIntBtnShoppingCart";
        voInput.onclick   = function() { asvAC.getSamplePDF( asvAC.getAAFAB1() , asvAC.getAAFAB2() ); };
        voInput.title     = "PDF-Muster anzeigen";
        asvStdC.appendEl( voButton , voInput );
      }
      if ( "idAsvIntButtonPDFCon" == voButton.id )
      {
        var voText        = document.createTextNode( " " );
        asvStdC.appendEl( voButton , voText );
        var voInput       = asvStdC.createEl( "input" );
        voInput.type      = "button";
        voInput.className = "clAsvIntBtnPDFMuster";
        voInput.onclick   = function() { asvAC.getSamplePDF( asvAC.getAAFAB1() , asvAC.getAAFAB2() ); };
        voInput.title     = "PDF-Muster anzeigen";
        asvStdC.appendEl( voButton , voInput );
      }
    }
    // SampleLink anpassen
    if ( false !== asvStdC.el( "idAsvIntSampleLink" ) )
    asvStdC.el( "idAsvIntSampleLink" ).onclick = function() { asvAC.getSamplePDF( null , null ); };
  }
  // Interpretation deaktivieren
  this.interpretationDisable = function()
  {
    var voImage = asvStdC.el( "idAsvIntProductSymbol" );
    if ( false !== voImage )
    {
      voImage.onclick        = "";
      voImage.style.cursor   = "default";
      voImage.title          = voImage.alt;
    }
  }
  // Interpretation aktivieren
  this.interpretationEnable = function()
  {
    var voImage = asvStdC.el( "idAsvIntProductSymbol" );
    if ( false !== voImage )
    {
      voImage.onclick        = voImage.onclickBackup;
      voImage.style.cursor   = "pointer";
      voImage.title          = "Interpretation wählen";
    }
  }
  // XML-Pfad holen
  this.getXMLURL = function()
  {
    return this.getASVURL() + this.vs_AC_XMLURL;
  }
  // AstroSERV-URL setzen
  this.setASVURL = function( vsURL )
  {
    if ( ( null     != vsURL           )
    &&   ( "string" == typeof( vsURL ) ) )
    this.vs_AC_ASVURL = vsURL;
  }
  // AstroSERV-URL holen
  this.getASVURL = function()
  {
    return this.vs_AC_ASVURL;
  }
  // Token setzen
  this.setToken = function( vsToken )
  {
    if ( ( null     != vsToken           )
    &&   ( "string" == typeof( vsToken ) ) )
    this.vs_AC_Token = vsToken;
  }
  // Token holen
  this.getToken = function()
  {
    return this.vs_AC_Token;
  }
  // TextInfo holen
  this.askVision = function( vsQuestion )
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "askVision.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="       + this.getToken()   +
                           "&session="    + this.getSession() +
                           "&xvid="       + this.getXVID()    +
                           "&aafab1="     + this.getAAFAB1()  +
                           "&aafab2="     + this.getAAFAB2()  +
                           "&Parms="      + this.getParms()   +
                           "&SearchText=" + vsQuestion;
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false !== voResponse )
    {
      var xmldoc = voResponse["XML"];
      // XML-Document prüfen
      if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
      &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
      {
        this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "answer" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "answer" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      // Daten extrahieren
      var viAnswerCount = xmldoc.getElementsByTagName( "answer" ).length;
      var varrAnswers   = new Array();
      for ( var i = 0 ; i < viAnswerCount ; i++ )
      varrAnswers.push( xmldoc.getElementsByTagName( "answer" )[i].firstChild.data );
      return varrAnswers;
    }
  }
  // SpirITTree holen
  this.getSpirITTree = function()
  {
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getSpirITTree.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()   +
                           "&session="                 + this.getSession() +
                           "&xvid="                    + this.getXVID()    +
                           "&aafab1="                  + this.getAAFAB1()  +
                           "&aafab2="                  + this.getAAFAB2()  +
                           "&Parms="                   + this.getParms()   +
                           "&InterpretationShortName=" + this.getInterpretationShortName();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "treeitem" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "treeitem" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var voActualTI  = xmldoc.getElementsByTagName( "treeitem" )[0];
    var varrTIList  = new Array();
    var viTIIndex   = 0;
    while ( null != voActualTI )
    {
      if ( 1 == voActualTI.nodeType )
      {
        var voAktuellerWert = voActualTI.childNodes.item( 0 );
        var arrTemp         = new Object();
        while ( null != voAktuellerWert )
        {
          if (voAktuellerWert.nodeType == 1)
          {
            arrTemp[voAktuellerWert.nodeName] = voAktuellerWert.firstChild.data;
          }
          voAktuellerWert = voAktuellerWert.nextSibling;
        }
        varrTIList[viTIIndex] = arrTemp;
        viTIIndex++;
      }
      voActualTI = voActualTI.nextSibling;
    }
    return varrTIList;
  }
  // SpirIT-Text holen
  this.getSpirITText = function( vsElementId )
  {
    var vsInterpretationMode = this.getInterpretationMode();
    if ( false === vsInterpretationMode )
    return false;
    var vsInterpretationContext = "R";
    if ( "Radix" == vsInterpretationMode )
    vsInterpretationContext = "R";
    if ( "Synastry" == vsInterpretationMode )
    vsInterpretationContext = "Y";
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "getSpirITText.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()         +
                           "&session="                 + this.getSession()       +
                           "&xvid="                    + this.getXVID()          +
                           "&ElementId="               + vsElementId             +
                           "&InterpretationContext="   + vsInterpretationContext +
                           "&InterpretationShortName=" + this.getInterpretationShortName();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false !== voResponse )
    {
      var xmldoc = voResponse["XML"];
      // XML-Document prüfen
      if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
      &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
      {
        this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "spirittext" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "spirittext" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      // Daten extrahieren
      return xmldoc.getElementsByTagName( "spirittext" )[0].firstChild.data;
    }
  }
  // ACMOSO-Texte holen
  this.getACMOSO = function()
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getXMLURL() + "ACMOSO.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()   +
                           "&session="                 + this.getSession() +
                           "&xvid="                    + this.getXVID()    +
                           "&aafab="                   + this.getAAFAB1()  +
                           "&Parms="                   + this.getParms()   +
                           "&InterpretationShortName=" + this.getInterpretationShortName();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false !== voResponse )
    {
      var xmldoc = voResponse["XML"];
      // XML-Document prüfen
      if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
      &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
      {
        this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "interpretation" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "interpretation" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      // Daten extrahieren
      var voActualACMOSO  = xmldoc.getElementsByTagName( "interpretation" )[0];
      var varrACMOSOList  = new Array();
      while ( null != voActualACMOSO )
      {
        if ( 1 == voActualACMOSO.nodeType )
        {
          var voAktuellerWert = voActualACMOSO.childNodes.item( 0 );
          var arrTemp         = new Array();
          while ( null != voAktuellerWert )
          {
            if (voAktuellerWert.nodeType == 1)
            {
              arrTemp[voAktuellerWert.nodeName] = voAktuellerWert.firstChild.data;
            }
            voAktuellerWert = voAktuellerWert.nextSibling;
          }
          varrACMOSOList.push( arrTemp );
        }
        voActualACMOSO = voActualACMOSO.nextSibling;
      }
      return varrACMOSOList;
    }
  }
  // SymbolInfo anzeigen - Interval starten (mouseover)
  this.symbolInfoMouseOver = function( vsSymbolCode , voElement )
  {
    if ( false === this.vo_AC_SymbolInfoInterval )
    {
      var viSymbolInfoIntervalTime  = 300;
      this.vo_AC_SymbolInfoInterval = window.setInterval( "asvAC.symbolInfoSendRequest()" , viSymbolInfoIntervalTime );
      this.vs_AC_SymbolInfoCode     = vsSymbolCode;
      voAsvSymbolInfoElement        = voElement;
    }
  }
  // Symbol-Info verbergen - Interval beenden (mouseout)
  this.symbolInfoMouseOut = function()
  {
    asvStdC.hideElement( "idAsvSymbolInfoLoader" );
    asvStdC.dispElementNone( "idAsvSymbolInfoWindow" );
    if ( false != this.vo_AC_SymbolInfoInterval )
    {
      window.clearInterval( this.vo_AC_SymbolInfoInterval );
      this.vo_AC_SymbolInfoInterval = false;
    }
    voAsvSymbolInfoElement = false;
    voAsvSymbolInfoRequest = false;
  }
  // Dummy-Funktion für SymbolInfo (href)
  this.symbolInfo = function(){}
  // Symbol-Info starten - Ajax-Request starten (nach Ablauf des Intervall)
  this.symbolInfoSendRequest = function()
  {
    if ( ( false       === voAsvSymbolInfoElement                              )
    ||   ( "undefined" ==  typeof( voAsvSymbolInfoElement.parentNode         ) )
    ||   ( "undefined" ==  typeof( voAsvSymbolInfoElement.parentNode.voImage ) ) )
    return false;
    if (( false === voAsvSymbolInfoRequest )
    ||  (( 4 == voAsvSymbolInfoRequest.readyState ) && ( 200 == voAsvSymbolInfoRequest.status )))
    {
      if ( false != this.vo_AC_SymbolInfoInterval )
      window.clearInterval( this.vo_AC_SymbolInfoInterval );
      this.vo_AC_SymbolInfoInterval = false;
      var voImage               = voAsvSymbolInfoElement.parentNode.voImage;
      var voScrollElement       = asvStdC.el( "body" )[0];
      if ( "undefined" != typeof( voAsvSymbolInfoElement.parentNode.voScrollElement ) )
      voScrollElement = voAsvSymbolInfoElement.parentNode.voScrollElement;
      var vbPositionFixed       = false;
      if ( "boolean" == typeof( voAsvSymbolInfoElement.parentNode.vbPositionFixed ) )
      vbPositionFixed = voAsvSymbolInfoElement.parentNode.vbPositionFixed;
      var innerDim              = asvStdC.getBrowserDim();
      var posImage              = asvStdC.getElementPos( voImage );
      var ImageWidth            = voImage.offsetWidth;
      var ImageHeight           = voImage.offsetHeight;
      var sCoords               = voAsvSymbolInfoElement.coords;
      var coords_arr            = sCoords.split( "," );
      var AreaLeft              = parseInt( coords_arr[0] );
      var AreaTop               = parseInt( coords_arr[1] );
      var AreaRight             = parseInt( coords_arr[2] );
      var AreaBottom            = parseInt( coords_arr[3] );
      var AreaWidth             = AreaRight  - AreaLeft;
      var AreaHeight            = AreaBottom - AreaTop;
      var voSymbolInfoLoader    = asvStdC.el( "idAsvSymbolInfoLoader" );
      if ( true === vbPositionFixed )
      {
        if (( AreaLeft + ( AreaWidth / 2 )) <= ( ImageWidth / 2 ))
          voSymbolInfoLoader.style.left = ( posImage.left + AreaRight ) + "px";
        else
          voSymbolInfoLoader.style.left = ( posImage.left + AreaLeft - voSymbolInfoLoader.offsetWidth ) + "px";
        if (( AreaTop + ( AreaHeight / 2 )) <= ( ImageHeight / 2 ))
          voSymbolInfoLoader.style.top  = ( posImage.top  + AreaBottom ) + "px";
        else
          voSymbolInfoLoader.style.top  = ( posImage.top + AreaTop - voSymbolInfoLoader.offsetHeight ) + "px";
        voSymbolInfoLoader.style.position  = "fixed";
      }
      else
      {
        var viHorizontalScrollPos = voScrollElement.scrollLeft;
        var viVerticalScrollPos   = voScrollElement.scrollTop;
        var posScrollElement      = asvStdC.getElementPos( voScrollElement );
        var viScrollElementRight  = posScrollElement.left + voScrollElement.offsetWidth;
        var viScrollElementBottom = posScrollElement.top  + voScrollElement.offsetHeight;
        if (((( AreaLeft + ( AreaWidth / 2 )) <= ( ImageWidth / 2 )) &&  ( viScrollElementRight >= ( posImage.left + AreaRight + voSymbolInfoLoader.offsetWidth - viHorizontalScrollPos )))
        ||  ( posScrollElement.left > ( posImage.left + AreaLeft - voSymbolInfoLoader.offsetWidth - viHorizontalScrollPos )))
          voSymbolInfoLoader.style.left = ( posImage.left + AreaRight - viHorizontalScrollPos ) + "px";
        else
          voSymbolInfoLoader.style.left = ( posImage.left + AreaLeft - voSymbolInfoLoader.offsetWidth - viHorizontalScrollPos ) + "px";
        if (((( AreaTop + ( AreaHeight / 2 )) <= ( ImageHeight / 2 )) &&  ( viScrollElementBottom >= ( posImage.top + AreaBottom + voSymbolInfoLoader.offsetHeight - viVerticalScrollPos )))
        ||  ( posScrollElement.top > ( posImage.top + AreaTop - voSymbolInfoLoader.offsetHeight - viVerticalScrollPos )))
          voSymbolInfoLoader.style.top  = ( posImage.top  + AreaBottom - viVerticalScrollPos ) + "px";
        else
          voSymbolInfoLoader.style.top  = ( posImage.top + AreaTop - voSymbolInfoLoader.offsetHeight - viVerticalScrollPos ) + "px";

        voSymbolInfoLoader.style.position  = "absolute";
      }
      asvStdC.viewElement( "idAsvSymbolInfoLoader" );
      voAsvSymbolInfoRequest = asvStdC.requestInit();
      if ( false === voAsvSymbolInfoRequest )
      return false;
      voAsvSymbolInfoRequest.onreadystatechange = asvAC.symbolInfoShowInfo;
      voAsvSymbolInfoRequest.open( "POST" , this.getXMLURL() + "getSymbolInfo.php" , true );
      voAsvSymbolInfoRequest.setRequestHeader( "Content-Type" , "application/x-www-form-urlencoded; charset=utf-8" );
      voAsvSymbolInfoRequest.send( "token=" + this.getToken() + "&sip=" + this.vs_AC_SymbolInfoCode + "&xvid=" + this.getXVID() );
    }
  }
  // mouseover- und mouseout-Funktionen für SymbolInfo ersetzen
  this.symbolInfoChangeMouseFunc = function( vsMapContent , vsMouseOverFunc , vsMouseOutFunc )
  {
    if ( ( "string" != typeof( vsMapContent    ) )
    ||   ( "string" != typeof( vsMouseOverFunc ) )
    ||   ( "string" != typeof( vsMouseOutFunc  ) ) )
    return false;
    var varrSplit   = vsMouseOverFunc.split( "(" );
    vsMouseOverFunc = varrSplit[0];
    var varrSplit   = vsMouseOutFunc.split( "(" );
    vsMouseOutFunc  = varrSplit[0];
    vsMapContent    = vsMapContent.replace( /asvAC.symbolInfoMouseOver/g , vsMouseOverFunc );
    vsMapContent    = vsMapContent.replace( /asvAC.symbolInfoMouseOut/g  , vsMouseOutFunc  );
    return vsMapContent;
  }
  // Symbol-Info anzeigen
  this.symbolInfoShowInfo = function()
  {
    if ( ( false       === voAsvSymbolInfoElement                              )
    ||   ( "undefined" ==  typeof( voAsvSymbolInfoElement.parentNode         ) )
    ||   ( "undefined" ==  typeof( voAsvSymbolInfoElement.parentNode.voImage ) ) )
    return false;
    if (( "hidden" != asvStdC.el( "idAsvSymbolInfoLoader" ).style.visibility )
    &&  ( 4        == voAsvSymbolInfoRequest.readyState )
    &&  ( 200      == voAsvSymbolInfoRequest.status ))
    {
      var xmldoc = voAsvSymbolInfoRequest.responseXML;
      // XML-Document prüfen
      if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
      &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
      {
        this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
        return false;
      }
      if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
      ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild ) )
      {
        this.showMessage( "Fehler im XML-Dokument!" );
        return false;
      }
      // Daten extrahieren
      asvStdC.dispElementBlock( "idAsvSymbolInfoWindow" );
      var voSymbolInfoWindow = asvStdC.el( "idAsvSymbolInfoWindow" );
      if (( null != xmldoc.getElementsByTagName( "title" )[0] )
      &&  ( null != xmldoc.getElementsByTagName( "title" )[0].firstChild ))
      {
        voSymbolInfoWindow.voHeadline.innerHTML         = xmldoc.getElementsByTagName( "title" )[0].firstChild.data;
        voSymbolInfoWindow.voHeadlineMain.style.display = "block";
        voSymbolInfoWindow.voBody.className             = "clAsvSIWindowBody";
      }
      else
      {
        voSymbolInfoWindow.voHeadlineMain.style.display = "none";
        voSymbolInfoWindow.voBody.className             = "clAsvSIWindowBodyNoHeadline";
        voSymbolInfoWindow.voHeadline.innerHTML         = "";
      }
      if (( null != xmldoc.getElementsByTagName("text")[0] )
      &&  ( null != xmldoc.getElementsByTagName("text")[0].firstChild ))
      voSymbolInfoWindow.voBody.innerHTML = xmldoc.getElementsByTagName( "text" )[0].firstChild.data;
      var voImage               = voAsvSymbolInfoElement.parentNode.voImage;
      var voScrollElement       = asvStdC.el( "body" )[0];
      if ( "undefined" != typeof( voAsvSymbolInfoElement.parentNode.voScrollElement ) )
      voScrollElement = voAsvSymbolInfoElement.parentNode.voScrollElement;
      var vbPositionFixed       = false;
      if ( "boolean" == typeof( voAsvSymbolInfoElement.parentNode.vbPositionFixed ) )
      vbPositionFixed = voAsvSymbolInfoElement.parentNode.vbPositionFixed;
      var innerDim              = asvStdC.getBrowserDim();
      var posImage              = asvStdC.getElementPos( voImage );
      var ImageWidth            = voImage.offsetWidth;
      var ImageHeight           = voImage.offsetHeight;
      var sCoords               = voAsvSymbolInfoElement.coords;
      var coords_arr            = sCoords.split( "," );
      var AreaLeft              = parseInt( coords_arr[0] );
      var AreaTop               = parseInt( coords_arr[1] );
      var AreaRight             = parseInt( coords_arr[2] );
      var AreaBottom            = parseInt( coords_arr[3] );
      var AreaWidth             = AreaRight  - AreaLeft;
      var AreaHeight            = AreaBottom - AreaTop;
      asvStdC.hideElement( "idAsvSymbolInfoLoader" );
      if ( true  === vbPositionFixed )
      {
        if (( AreaLeft + ( AreaWidth / 2 )) <= ( ImageWidth / 2 ))
          voSymbolInfoWindow.style.left = ( posImage.left + AreaRight ) + "px";
        else
          voSymbolInfoWindow.style.left = ( posImage.left + AreaLeft - voSymbolInfoWindow.offsetWidth ) + "px";
        if (( AreaTop + ( AreaHeight / 2 )) <= ( ImageHeight / 2 ))
          voSymbolInfoWindow.style.top  = ( posImage.top  + AreaBottom ) + "px";
        else
          voSymbolInfoWindow.style.top  = ( posImage.top + AreaTop - voSymbolInfoWindow.offsetHeight ) + "px";
        voSymbolInfoWindow.style.position  = "fixed";
      }
      else
      {
        var viHorizontalScrollPos = voScrollElement.scrollLeft;
        var viVerticalScrollPos   = voScrollElement.scrollTop;
        var posScrollElement      = asvStdC.getElementPos( voScrollElement );
        var viScrollElementRight  = posScrollElement.left + voScrollElement.offsetWidth;
        var viScrollElementBottom = posScrollElement.top  + voScrollElement.offsetHeight;
        if (((( AreaLeft + ( AreaWidth / 2 )) <= ( ImageWidth / 2 )) &&  ( viScrollElementRight >= ( posImage.left + AreaRight + voSymbolInfoWindow.offsetWidth - viHorizontalScrollPos )))
        ||  ( posScrollElement.left > ( posImage.left + AreaLeft - voSymbolInfoWindow.offsetWidth - viHorizontalScrollPos )))
          voSymbolInfoWindow.style.left = ( posImage.left + AreaRight - viHorizontalScrollPos ) + "px";
        else
          voSymbolInfoWindow.style.left = ( posImage.left + AreaLeft - voSymbolInfoWindow.offsetWidth - viHorizontalScrollPos ) + "px";

        if (((( AreaTop + ( AreaHeight / 2 )) <= ( ImageHeight / 2 )) &&  ( viScrollElementBottom >= ( posImage.top + AreaBottom + voSymbolInfoWindow.offsetHeight - viVerticalScrollPos )))
        ||  ( posScrollElement.top > ( posImage.top + AreaTop - voSymbolInfoWindow.offsetHeight - viVerticalScrollPos )))
          voSymbolInfoWindow.style.top  = ( posImage.top  + AreaBottom - viVerticalScrollPos ) + "px";
        else
          voSymbolInfoWindow.style.top  = ( posImage.top + AreaTop - voSymbolInfoWindow.offsetHeight - viVerticalScrollPos ) + "px";
        voSymbolInfoWindow.style.position  = "absolute";
      }
      asvAC.symbolInfoChangeWindowColors();
    }
  }
  // SymbolInfo-Loader erzeugen
  this.symbolInfoCreateLoader = function()
  {
    if ( false !== asvStdC.el( "idAsvSymbolInfoLoader" ) )
    return false;
    var voBody                     = asvStdC.el( "body" )[0];
    var voDiv                      = asvStdC.createEl( "div" );
    voDiv.style.visibility         = "hidden";
    voDiv.style.position           = "absolute";
    voDiv.style.left               = "0";
    voDiv.style.top                = "0";
    voDiv.id                       = "idAsvSymbolInfoLoader";
    voDiv.zIndex                   = 29;
    var voImage                    = asvStdC.createEl( "img" );
    voImage.src                    = asvStdC.getSILoaderImageURL();
    voImage.style.border           = "0";
    voImage.style.display          = "block";
    voImage.alt                    = "";
    asvStdC.appendEl( voDiv  , voImage );
    asvStdC.appendEl( voBody , voDiv   );
  }
  // SymbolInfo-Fenster erzeugen
  this.symbolInfoCreateWindow = function()
  {
    if ( false !== asvStdC.el( "idAsvSymbolInfoWindow" ) )
    return false;
    var voMain             = asvStdC.createEl( "div" );
    var voToplineMain      = asvStdC.createEl( "div" );
    var voToplineLeft      = asvStdC.createEl( "div" );
    var voToplineRight     = asvStdC.createEl( "div" );
    var voTopline          = asvStdC.createEl( "div" );
    var voHeadlineMain     = asvStdC.createEl( "div" );
    var voHeadlineLeft     = asvStdC.createEl( "div" );
    var voHeadlineRight    = asvStdC.createEl( "div" );
    var voHeadline         = asvStdC.createEl( "div" );
    var voBodyMain         = asvStdC.createEl( "div" );
    var voBodyLeft         = asvStdC.createEl( "div" );
    var voBodyRight        = asvStdC.createEl( "div" );
    var voBody             = asvStdC.createEl( "div" );
    var voBottomlineMain   = asvStdC.createEl( "div" );
    var voBottomlineLeft   = asvStdC.createEl( "div" );
    var voBottomlineRight  = asvStdC.createEl( "div" );
    var voBottomline       = asvStdC.createEl( "div" );
    voMain.voToplineMain   = voToplineMain;
    voMain.voToplineLeft   = voToplineLeft;
    voMain.voToplineRight  = voToplineRight;
    voMain.voTopline       = voTopline;
    voMain.voHeadlineMain  = voHeadlineMain;
    voMain.voHeadlineLeft  = voHeadlineLeft;
    voMain.voHeadlineRight = voHeadlineRight;
    voMain.voHeadline      = voHeadline;
    voMain.voBody          = voBody;
    asvStdC.appendEl( asvStdC.el( "body" )[0] , voMain );
    asvStdC.appendEl( voMain , voToplineMain );
    asvStdC.appendEl( voToplineMain , voToplineLeft );
    asvStdC.appendEl( voToplineLeft , voToplineRight );
    asvStdC.appendEl( voToplineRight , voTopline );
    asvStdC.appendEl( voMain , voHeadlineMain );
    asvStdC.appendEl( voHeadlineMain , voHeadlineLeft );
    asvStdC.appendEl( voHeadlineLeft , voHeadlineRight );
    asvStdC.appendEl( voHeadlineRight , voHeadline );
    asvStdC.appendEl( voMain , voBodyMain );
    asvStdC.appendEl( voBodyMain , voBodyLeft );
    asvStdC.appendEl( voBodyLeft , voBodyRight );
    asvStdC.appendEl( voBodyRight , voBody );
    asvStdC.appendEl( voMain , voBottomlineMain );
    asvStdC.appendEl( voBottomlineMain , voBottomlineLeft );
    asvStdC.appendEl( voBottomlineLeft , voBottomlineRight );
    asvStdC.appendEl( voBottomlineRight , voBottomline );
    voMain.id                    = "idAsvSymbolInfoWindow";
    voMain.className             = "clAsvSIWindowMain";
    voToplineMain.className      = "clAsvSIWindowToplineMain";
    voToplineLeft.className      = "clAsvSIWindowToplineLeft";
    voToplineRight.className     = "clAsvSIWindowToplineRight";
    voTopline.className          = "clAsvSIWindowTopline";
    voHeadlineMain.className     = "clAsvSIWindowHeadlineMain";
    voHeadlineLeft.className     = "clAsvSIWindowHeadlineLeft";
    voHeadlineRight.className    = "clAsvSIWindowHeadlineRight";
    voHeadline.className         = "clAsvSIWindowHeadline";
    voBodyMain.className         = "clAsvSIWindowBodyMain";
    voBodyLeft.className         = "clAsvSIWindowBodyLeft";
    voBodyRight.className        = "clAsvSIWindowBodyRight";
    voBody.className             = "clAsvSIWindowBody";
    voBottomlineMain.className   = "clAsvSIWindowBottomlineMain";
    voBottomlineLeft.className   = "clAsvSIWindowBottomlineLeft";
    voBottomlineRight.className  = "clAsvSIWindowBottomlineRight";
    voBottomline.className       = "clAsvSIWindowBottomline";
    voMain.style.position        = "absolute";
    voMain.style.width           = "260px";
    voMain.zIndex                = 30;
    voMain.style.left            = "0";
    voMain.style.top             = "0";
  }
  // SymbolInfo-Fenster erzeugen
  this.symbolInfoChangeWindowColors = function()
  {
    if ( false === asvStdC.el( "idAsvSymbolInfoWindow" ) )
    return false;
    if ( ( -1 == this.vi_AC_InterpretationRadix )
    ||   ( -1 == this.vi_AC_InterpretationRadix ) )
    return false;
    var voMain = asvStdC.el( "idAsvSymbolInfoWindow" );
    voMain.voTopline.style.background       = "url(" + this.getASVURL() + "/images/css/tc_" + this.getInterpretationShortName() + "_flat.png) repeat-x bottom";
    voMain.voToplineLeft.style.background   = "url(" + this.getASVURL() + "/images/css/tl_" + this.getInterpretationShortName() + "_flat.png) repeat-y bottom left";
    voMain.voToplineRight.style.background  = "url(" + this.getASVURL() + "/images/css/tr_" + this.getInterpretationShortName() + "_flat.png) repeat-y bottom right";
    voMain.voHeadline.style.background      = "url(" + this.getASVURL() + "/images/css/cc_" + this.getInterpretationShortName() + "_flat.png)";
    voMain.voHeadlineLeft.style.background  = "url(" + this.getASVURL() + "/images/css/cl_" + this.getInterpretationShortName() + "_flat.png) repeat-y bottom left";
    voMain.voHeadlineRight.style.background = "url(" + this.getASVURL() + "/images/css/cr_" + this.getInterpretationShortName() + "_flat.png) repeat-y bottom right";
    voMain.voHeadline.style.color           = "#000000";
    voMain.voHeadline.style.fontWeight      = "normal";
  }
  // Symbolinfo initialisieren
  this.symbolInfoInit = function()
  {
    this.symbolInfoCreateLoader();
    this.symbolInfoCreateWindow();
  }
  // Debugging anschalten
  this.debugOn = function()
  {
    this.vb_AC_Debug = true;
  }
  // Debugging ausschalten
  this.debugOff = function()
  {
    this.vb_AC_Debug = false;
  }
  // Debuggen on?
  this.doDebug = function()
  {
    return this.vb_AC_Debug;
  }
  // Meldung ausgeben
  this.showMessage = function( vsMessage )
  {
    if ( true === this.doDebug )
    alert( vsMessage );
  }

  //----------------------------------------------------------------------------//
  // Session                                                                    //
  //----------------------------------------------------------------------------//

  this.setSession = function( vsSession )
  {
    this.vs_SC_Session = vsSession;
  }
  // SID holen
  this.getSession = function()
  {
    return this.vs_SC_Session;
  }
  // Währung setzen
  this.setCurrency = function( vsCurrency )
  {
    this.vs_SC_Currency = vsCurrency;
  }
  // Währung holen
  this.getCurrency = function()
  {
    return this.vs_SC_Currency;
  }
  // Shipping-Information setzen
  this.setShippingAddress = function( voShippingAddress )
  {
    this.vo_SC_ShippingAddress = voShippingAddress;
  }
  // Shipping-Information holen
  this.getShippingAdress = function()
  {
    return this.vo_SC_ShippingAddress;
  }
  // Session-Pfad holen
  this.getSessionURL = function()
  {
    return this.getASVURL() + this.vs_AC_SessionURL;
  }
  // Buchbindung enabeln
  this.enableBinding = function()
  {
    this.vb_SC_Binding = true;
  }
  // Buchbindung disabeln
  this.disableBinding = function()
  {
    this.vb_SC_Binding = false;
  }
  // Buchbindung Ja? Nein?
  this.bindingIsEnabled = function()
  {
    return this.vb_SC_Binding;
  }
  // RemoteInfo updaten
  this.updateRemoteInfo = function()
  {
    var innerDim         = asvStdC.getBrowserDim();
    var vsJavaScript     = "-1";
    var vsJavaEnabled    = "0";
    var vsCookieEnabled  = "0";
    if ( true === navigator.javaEnabled() )
    vsJavaEnabled = "-1";
    if ( true === navigator.cookieEnabled )
    vsCookieEnabled = "-1";
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getSessionURL()  + "updateRemoteInfo.php";
    var vbAsynchron      = true;
    var vsParameter      = "token="          + this.getToken()   +
                           "&session="       + this.getSession() +
                           "&xvid="          + this.getXVID()    +
                           "&colorDepth="    + screen.colorDepth +
                           "&sX="            + screen.width      +
                           "&sY="            + screen.height     +
                           "&bX="            + innerDim.width    +
                           "&bY="            + innerDim.height   +
                           "&javaEnabled="   + vsJavaEnabled     +
                           "&javaScript="    + vsJavaScript      +
                           "&cookieEnabled=" + vsCookieEnabled;
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
  }
  // Aktuelles Produkt in den Warenkorb legen
  this.putInterpretationToShoppingCart = function()
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getSessionURL() + "putInterpretationToShoppingCart.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()    +
                           "&session="                 + this.getSession()  +
                           "&xvid="                    + this.getXVID()     +
                           "&Currency="                + this.getCurrency() +
                           "&aafab1="                  + this.getAAFAB1()   +
                           "&aafab2="                  + this.getAAFAB2()   +
                           "&InterpretationShortName=" + this.getInterpretationShortName();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "pagecounta4" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "pagecounta4" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "pagecounta5" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "pagecounta5" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingstdeur" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingstdeur" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingperpageeur" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingperpageeur" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingallpageseur" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingallpageseur" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingtotaleur" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingtotaleur" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountproductstdeur" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountproductstdeur" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amounttotaleur" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amounttotaleur" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingstdchf" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingstdchf" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingperpagechf" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingperpagechf" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingallpageschf" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingallpageschf" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingtotalchf" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountbindingtotalchf" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amountproductstdchf" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amountproductstdchf" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "amounttotalchf" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "amounttotalchf" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    var voShoppingCartResult                           = new Object();
    voShoppingCartResult.a4                            = xmldoc.getElementsByTagName( "pagecounta4" )[0].firstChild.data;
    voShoppingCartResult.a5                            = xmldoc.getElementsByTagName( "pagecounta5" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingStdEur           = xmldoc.getElementsByTagName( "amountbindingstdeur" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingPerPageEur       = xmldoc.getElementsByTagName( "amountbindingperpageeur" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingAllPagesEur      = xmldoc.getElementsByTagName( "amountbindingallpageseur" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingTotalEur         = xmldoc.getElementsByTagName( "amountbindingtotaleur" )[0].firstChild.data;
    voShoppingCartResult.AmountProductStdEur           = xmldoc.getElementsByTagName( "amountproductstdeur" )[0].firstChild.data;
    voShoppingCartResult.AmountTotalEur                = xmldoc.getElementsByTagName( "amounttotaleur" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingStdChf           = xmldoc.getElementsByTagName( "amountbindingstdchf" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingPerPageChf       = xmldoc.getElementsByTagName( "amountbindingperpagechf" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingAllPagesChf      = xmldoc.getElementsByTagName( "amountbindingallpageschf" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingTotalChf         = xmldoc.getElementsByTagName( "amountbindingtotalchf" )[0].firstChild.data;
    voShoppingCartResult.AmountProductStdChf           = xmldoc.getElementsByTagName( "amountproductstdchf" )[0].firstChild.data;
    voShoppingCartResult.AmountTotalChf                = xmldoc.getElementsByTagName( "amounttotalchf" )[0].firstChild.data;
    voShoppingCartResult.AmountBindingStdLeftEur       = voShoppingCartResult.AmountBindingStdEur.split( "," )[0];
    voShoppingCartResult.AmountBindingStdRightEur      = voShoppingCartResult.AmountBindingStdEur.split( "," )[1];
    voShoppingCartResult.AmountBindingPerPageLeftEur   = voShoppingCartResult.AmountBindingPerPageEur.split( "," )[0];
    voShoppingCartResult.AmountBindingPerPageRightEur  = voShoppingCartResult.AmountBindingPerPageEur.split( "," )[1];
    voShoppingCartResult.AmountBindingAllPagesLeftEur  = voShoppingCartResult.AmountBindingAllPagesEur.split( "," )[0];
    voShoppingCartResult.AmountBindingAllPagesRightEur = voShoppingCartResult.AmountBindingAllPagesEur.split( "," )[1];
    voShoppingCartResult.AmountBindingTotalLeftEur     = voShoppingCartResult.AmountBindingTotalEur.split( "," )[0];
    voShoppingCartResult.AmountBindingTotalRightEur    = voShoppingCartResult.AmountBindingTotalEur.split( "," )[1];
    voShoppingCartResult.AmountProductStdLeftEur       = voShoppingCartResult.AmountProductStdEur.split( "," )[0];
    voShoppingCartResult.AmountProductStdRightEur      = voShoppingCartResult.AmountProductStdEur.split( "," )[1];
    voShoppingCartResult.AmountTotalLeftEur            = voShoppingCartResult.AmountTotalEur.split( "," )[0];
    voShoppingCartResult.AmountTotalRightEur           = voShoppingCartResult.AmountTotalEur.split( "," )[1];
    voShoppingCartResult.AmountBindingStdLeftChf       = voShoppingCartResult.AmountBindingStdChf.split( "," )[0];
    voShoppingCartResult.AmountBindingStdRightChf      = voShoppingCartResult.AmountBindingStdChf.split( "," )[1];
    voShoppingCartResult.AmountBindingPerPageLeftChf   = voShoppingCartResult.AmountBindingPerPageChf.split( "," )[0];
    voShoppingCartResult.AmountBindingPerPageRightChf  = voShoppingCartResult.AmountBindingPerPageChf.split( "," )[1];
    voShoppingCartResult.AmountBindingAllPagesLeftChf  = voShoppingCartResult.AmountBindingAllPagesChf.split( "," )[0];
    voShoppingCartResult.AmountBindingAllPagesRightChf = voShoppingCartResult.AmountBindingAllPagesChf.split( "," )[1];
    voShoppingCartResult.AmountBindingTotalLeftChf     = voShoppingCartResult.AmountBindingTotalChf.split( "," )[0];
    voShoppingCartResult.AmountBindingTotalRightChf    = voShoppingCartResult.AmountBindingTotalChf.split( "," )[1];
    voShoppingCartResult.AmountProductStdLeftChf       = voShoppingCartResult.AmountProductStdChf.split( "," )[0];
    voShoppingCartResult.AmountProductStdRightChf      = voShoppingCartResult.AmountProductStdChf.split( "," )[1];
    voShoppingCartResult.AmountTotalLeftChf            = voShoppingCartResult.AmountTotalChf.split( "," )[0];
    voShoppingCartResult.AmountTotalRightChf           = voShoppingCartResult.AmountTotalChf.split( "," )[1];
    return voShoppingCartResult;
  }
  // Bindungsinformationen zu einer Transaktion einfügen
  this.putShippingInformationToTransaction = function()
  {
    var vsBindingState = "0";
    if ( true === this.bindingIsEnabled() )
    vsBindingState = "-1";
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getSessionURL() + "putShippingInformationToTransaction.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()                         +
                           "&session="                 + this.getSession()                       +
                           "&xvid="                    + this.getXVID()                          +
                           "&BB="                      + vsBindingState                          +
                           "&Currency="                + this.getCurrency()                      +
                           "&EMail="                   + this.vo_SC_ShippingAddress.email        +
                           "&Vorname="                 + this.vo_SC_ShippingAddress.vorname      +
                           "&Nachname="                + this.vo_SC_ShippingAddress.nachname     +
                           "&Strasse="                 + this.vo_SC_ShippingAddress.strasse      +
                           "&Hausnummer="              + this.vo_SC_ShippingAddress.hausnummer   +
                           "&Postleitzahl="            + this.vo_SC_ShippingAddress.postleitzahl +
                           "&Ort="                     + this.vo_SC_ShippingAddress.ort          +
                           "&Land="                    + this.vo_SC_ShippingAddress.land;
    asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
  }
  // Prüfen, ob offene Transaktionen vorhanden sind
  this.checkTransactions = function()
  {
    var vsRequestMethod  = "POST";
    var vsRequestFileURL = this.getSessionURL() + "checkTransactions.php";
    var vbAsynchron      = false;
    var vsParameter      = "token="                    + this.getToken()   +
                           "&session="                 + this.getSession() +
                           "&xvid="                    + this.getXVID();
    var voResponse       = asvStdC.doHTTPRequest( vsParameter , vsRequestFileURL , vsRequestMethod , vbAsynchron );
    if ( false === voResponse )
    return false;
    var xmldoc = voResponse["XML"];
    // XML-Document prüfen
    if ( ( null != xmldoc.getElementsByTagName( "error" )[0] )
    &&   ( null != xmldoc.getElementsByTagName( "error" )[0].firstChild ) )
    {
      this.showMessage( xmldoc.getElementsByTagName( "error" )[0].firstChild.data );
      return false;
    }
    if ( ( null == xmldoc.getElementsByTagName( "result" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "result" )[0].firstChild )
    ||   ( null == xmldoc.getElementsByTagName( "quantity" )[0] )
    ||   ( null == xmldoc.getElementsByTagName( "quantity" )[0].firstChild ) )
    {
      this.showMessage( "Fehler im XML-Dokument!" );
      return false;
    }
    // Daten extrahieren
    return xmldoc.getElementsByTagName( "quantity" )[0].firstChild.data;
  }
}

var asvAC = new asvAstroClass();
