<!--

  function setCode(formID, c, v, submitForm)
  {
      var formElem = document.forms[formID];
      for (var i=0; i<formElem.length; i++)
      {
          vn = formElem.elements[i].name.toString();
                      if (vn == c)
          {
                                formElem.elements[i].value = v;
                                if (submitForm != false) formElem.submit();
                      }
      }
      return false;
  }

  pfeil_on  = new Image(9,8); pfeil_on.src  = "/img/onlineshop/pfeil_preis2.gif";
  pfeil_off = new Image(9,8); pfeil_off.src = "/img/onlineshop/pfeil_preis1.gif";

  function display(id)
  {
            switch (id)
            {
                      case "discounts":
                                var img   = 'discounts_img';
                                var elem  = 'discounts';
              var total = 'discounts_total';
              var felem = 'opened_d';
                                break;
                      case "additions":
                                var img  = 'additions_img';
                                var elem = 'additions';
              var total = 'additions_total';
              var felem = 'opened_a';
                                break;
          default:
              return;
            }
      if (total) swapDiv(total);
            if (elem)
      {
          var stat = swapDiv(elem);
                switch (stat)
                {
                          case 'none':
                swapImage(img, 'pfeil_off');
                setCode('kalk', felem, 0, false);
                break;
                          case 'block':
                swapImage(img, 'pfeil_on');
                setCode('kalk', felem, 1, false);
                break;
                }
      }
  }

  function swapDiv(divID)
  {
            var new_stat = 'block';
            if (document.getElementById)
            {
                      var elem = document.getElementById(divID);
                      new_stat = elem.style.display == 'block' ? 'none' : 'block';
                      elem.style.display = new_stat;
            }
            return new_stat;
  }

  function swapImage(imgDocID, imgObjName)
  {
      if (document.getElementById)
      {
          theObj = document.getElementById(imgDocID);
          theObj.setAttribute("src", eval(imgObjName + ".src"));
      }
      else
          document.images[imgDocID].src = eval(imgObjName + ".src");
  }

  function angebot()
  {
      openBrWindow('/Kalkulator/Angebot','Angebot','scrollbars=yes,resizable=yes,width=800,height=500');
  }

  function openWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=470,height=450");
      return;
  }

  function openGCWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=450,height=500");
      return;
  }

    function openGC2Window(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,left=10,top=10,width=750,height=500");
      return;
  }

    function openSWFWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=562,height=480");
      return;
  }

    function openProdPodcast(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=562,height=470");
      return;
  }
      
      function openAdventWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,left=10,top=10,width=610,height=410");
      return;
  }

    function openAusInfoWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,left=10,top=10,width=750,height=500");
      return;
  }


  function openBAWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=450,height=500");
      return;
  }

  function openDDWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=700,height=310");
      return;
  }

  function openDEWindow(url)
  {
      neu=open(url,"","status=yes,scrollbars=yes,resizable=yes,width=500,height=700");
      return;
  }
  
  function openBrWindow(url, titel, einstellung)
  {
      Fenster1 = open(url, titel, einstellung);
      Fenster1.focus();
      return;
  }

  function openNewWindow(url, titel, einstellung)
  {
      Fenster1 = window.open(url, titel, einstellung);
      Fenster1.focus();
  }

  function getposOffset(what, offsettype)
  {
      var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
      var parentEl=what.offsetParent;
      while (parentEl!=null){
        totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
        parentEl=parentEl.offsetParent;
      }
      return totaloffset;
  }


//-->