<!--

    function getWomTarget(){
        var linktarget = 'WetterOnlineMitgliedschaft';
        return linktarget
    }

    function getMapsTarget(){
        var linktarget = 'WetterMaps';
        var sessionCookie = getCookie('WOM-Session');
        try {
            if (sessionCookie.indexOf('USERID') == -1) { // throws error if sessionCookie is null
               linktarget = getWomTarget();
            }
        }
        catch (error) {
          linktarget = getWomTarget();
        }
        return linktarget
    }

    function getCookie(name) {
        var cookies = document.cookie.split('; ');
        for (var i = 0; i < cookies.length; i++) {
            var c = cookies[i];
            var pos = c.indexOf('=');
            var n = c.substring(0,pos);
            if (n == name)
                return c.substring(pos+1);
        }
        return null;
    }

    // fkt liefert den Text für den Link
    function getWomLinkText (section){
    
      var textlink = "Jetzt Mitglied werden: WetterOnline Mitgliedschaft!";
      
      var linktxt = new Array;
      linktxt["akt"] = "Mehr Parameter für das aktuelle Wetter Ihres Ortes: Hier klicken.";
      linktxt["radbild"] = "5-minütige Radarbilder mit Markierung Ihres Ortes: Hier klicken.";
      
      if ( typeof(linktxt[section]) != "undefined" ) textlink = linktxt[section];

      return textlink;
    }



    // fkt liefert wom-html-link
    function getWomLink (section, wmo){
        var link = [];
        link['ref'] = 'cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fcontent%3Dmarketing%26mainmenu%3Dcontents%26submenu%3Dlocalforecast%26tab%3Dlongterm&WERBUNG=click_wom_'+section+'&LANG=de';
        link['alt'] = '14 Tage';
        link['target'] = '_blank';
        var sessionCookie = getCookie('WOM-Session');
        try {
            if (!(sessionCookie.indexOf('USERID') == -1)) {  // throws error if sessionCookie is null
                link['target'] = getWomTarget();
                link['ref'] = 'wom.wetteronline.de/?prefpar=weather&pcid=pc_city_local&pid=p_city_local&sid=LongTerm&gid='+ wmo +'&iid='+ wmo +'&paras=101110';
            }
        }
        catch (error) {
        }

        return '<a href="http://' + link['ref'] + '" target="'+ link['target'] + '">' + link['alt'] + '</a>'
    }


    // fkt liefert maps-link-adresse
    function getWomMapsLink (section, region){
//        var link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fmainmenu%3Dcontents%26submenu%3Dweathermaps&WERBUNG=click_wom_'+section+'&LANG=de';
        var link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2Fneues%2F&WERBUNG=click_wom_'+section+'&LANG=de';
        var lon = 7.50;
        var lat = 52.75;
        var zoom = 4;
        var sessionCookie = getCookie('WOM-Session');
        try {
          if ( section.indexOf("akt") == 0 )
            link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fpcid%3Dpc_aktuell_local%26gid%3D'+region+'&WERBUNG=click_wom_'+section+'&LANG=de';
          else if ( section.indexOf("rad") == 0 )
          {
            if (!(sessionCookie.indexOf('USERID') == -1)) {  // throws error if sessionCookie is null
                if ( region == 'dbad' ){
                  lon = 9.00; lat = 48.65; zoom = 1;
                }else if ( region == 'dbay' ){
                  lon = 11.38; lat = 48.90; zoom = 1;
                }else if ( region == 'dber' ){
                  lon = 12.65; lat = 52.48; zoom = 1;
                }else if ( region == 'dhes' ){
                  lon = 9.00; lat = 50.53; zoom = 1;
                }else if ( region == 'dmec' ){
                  lon = 12.54; lat = 53.90; zoom = 1;
                }else if ( region == 'dnie' ){
                  lon = 9.15; lat = 52.55; zoom = 1;
                }else if ( region == 'dnrw' ){
                  lon = 7.70; lat = 51.53; zoom = 1;
                }else if ( region == 'drlp' ){
                  lon = 7.35; lat = 49.95; zoom = 1;
                }else if ( region == 'dsac' ){
                  lon = 13.45; lat = 50.93; zoom = 1;
                }else if ( region == 'dsan' ){
                  lon = 11.88; lat = 52.00; zoom = 1;
                }else if ( region == 'dsch' ){
                  lon = 9.83; lat = 54.20; zoom = 1;
                }else if ( region == 'dtue' ){
                  lon = 11.25; lat = 50.93; zoom = 1;
                }else if ( region == 'ddlnw' ){
                  lon = 5.00; lat = 51.50; zoom = 2;
                }else if ( region == 'dOS' ){
                  lon = 13.25; lat = 47.70; zoom = 2;
                }else if ( region == 'dSW' ){
                  lon = 8.25; lat = 46.80; zoom = 2;
                }
                
                //link = 'http://maps.wetteronline.de/?M=' + zoom + '&Zlat=' + lat + '&Zlon=' + lon;
                if( region == 'eurg' )
                  link = 'http://wom.wetteronline.de/?pcid=pc_radar_map&gid=euro';
                else
                  link = 'http://wom.wetteronline.de/?pcid=pc_radar_map&gid=DL';
            }
            else
            {
              if( region == 'eurg' )
                link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fpcid%3Dpc_radar_map%26gid%3Deuro&WERBUNG=click_wom_'+section+'&LANG=de';
            }
          }
        }
        catch (error) {
              if( section.indexOf("rad") == 0 && region == 'eurg' )
                link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fpcid%3Dpc_radar_map%26gid%3Deuro&WERBUNG=click_wom_'+section+'&LANG=de';
              else if ( section.indexOf("akt") == 0 )
                link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fpcid%3Dpc_aktuell_local%26gid%3D'+region+'&WERBUNG=click_wom_'+section+'&LANG=de';
        }

        return link
    }

    // fkt liefert wom-link-adresse
    function getWomSatLink (section, region){
        var link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fcontent%3Dmarketing%26mainmenu%3Dcontents&WERBUNG=click_wom_' + section + '&LANG=de';
        // http://wom.wetteronline.de/?mainmenu=contents&submenu=clouds
        if ( section == "satbild" ){
          link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fcontent%3Dmarketing%26mainmenu%3Dcontents%26submenu%3Dclouds&WERBUNG=click_wom_'+section + '&LANG=de';
          if ( region == "euro" || region == "dldl" ){
            link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fcontent%3Dmarketing%26mainmenu%3Dcontents%26submenu%3Dweathermaps&WERBUNG=click_wom_'+section + '&LANG=de';
          }
        }

        // http://wom.wetteronline.de/?mainmenu=contents&submenu=thunderstorm
        if ( section == "blitzebild" ){
          //link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fcontent%3Dmarketing%26mainmenu%3Dcontents%26submenu%3Dthunderstorm&WERBUNG=click_wom_'+section + '&LANG=de';
          link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=http%3A%2F%2Fwom.wetteronline.de%2F%3Fcontent%3Dmarketing%26mainmenu%3Dcontents%26submenu%3Dweathermaps&WERBUNG=click_wom_'+section + '&LANG=de';
        }
        var sessionCookie = getCookie('WOM-Session');
        try {
          if (!(sessionCookie.indexOf('USERID') == -1)) {  // throws error if sessionCookie is null
            var product = 'pc_sat_image';
            var gid = region;
            var lon = 7.50;
            var lat = 52.75;
            var zoom = 4;
            
            if ( gid == 'dldl' ) gid = 'DL';
            
            if ( section == "blitzebild" ){
              product = 'pc_blitze_map';
            }
            link = 'http://wom.wetteronline.de/?pcid=' + product + '&gid=' + gid;
            
            if ( region == "euro" || region == "dldl" ){
              if ( region == "dldl" ){
                 zoom = 3;
                 lat = 51.00;
                 lon = 10.50;
              }
              link = 'http://maps.wetteronline.de/?M=' + zoom + '&Zlat=' + lat + '&Zlon=' + lon;
            }
                
          }
        }
        catch (error) {
        }

        return link
    }


    function getWomDemoLink(section, region){
      var demolink = 'http://womdemo.wetteronline.de';

      if ( section == "karten" ){
        demolink = 'http://womdemo.wetteronline.de/?pcid=pc_city_colormap&gid=DL&pid=p_city_colormap&sid=PrecipitationAmount24h';
      }
      if ( section == "satbild" ){
        demolink = 'http://womdemo.wetteronline.de/?pcid=pc_sat_image&gid=a2952&pid=p_sat_image&sid=CloudMask&lat=52.97&lon=10.57';
      }
            
      var link = 'http://cnt.wetteronline.de/cgi-bin/goto?URL=' + escape(demolink) + '&WERBUNG=click_wom_' + section + '&LANG=de';

      return link
    }


    function getWomDemoLinkTxt(section){
      var demotxt = 'http://womdemo.wetteronline.de';

      if ( section == "karten" ){
        demotxt = 'Karten für 14 Tage mit Markierung Ihres Ortes: Hier klicken.';
      }
      if ( section == "satbild" ){
        demotxt = '5-min&uuml;tige Satellitenbilder mit Markierung Ihres Ortes: Hier klicken.';
      }
            
      return demotxt
    }


    function createWomDemoLink(section, region){
      var linksrc = "";
      
      var link = "";
      var linktxt = "";
      var linktarget = "";
      
      try{
        link = getWomDemoLink(section, region);
        linktarget = getWomTarget();
        linktxt = getWomDemoLinkTxt(section);
        
        linksrc = '<a href="' + link + '" target="' + linktarget + '" class="wotexte">' + linktxt + '</a>';
      }
      catch(error){
      }
      
      return linksrc
    }
    
    function getAppLinkTag()
    {
      var linkRegen = "http://www.wetteronline.de/RegenRadarApp/";
      var linkMaps = "http://www.wetteronline.de/WetterMapsApp/";
      var linktarget = "_top";
      var linksrc = 'Apps für <a href="' + linkRegen + '" target="' + linktarget + '" class="wotexte">Android</a>'+
                    ' und <a href="' + linkMaps + '" target="' + linktarget + '" class="wotexte">iPhone</a>'; 
      
      return linksrc
    }

//-->

