var popup, popup_pan;

function GoRef(uri1)
        {
        window.location.href = uri1;
        }

function PopupPic(pfad, breite, hoehe)
        {

        if(window.popup)              // Fenster-Handle existiert schon
          {
          if(!window.popup.closed) {  // Fenster ist noch offen
            popup.focus();
            exit();
            }
          }
        var abst_o = (screen.availHeight - hoehe) / 3;
        var abst_l = (screen.availWidth - breite) / 2;
        abst_o = Math.ceil(abst_o);
        abst_l = Math.ceil(abst_l);
        abst_o = Math.abs(abst_o);
        abst_l = Math.abs(abst_l);
        var werte = "width="+breite+",height="+hoehe+",screenX="+abst_l+",screenY="+abst_o+"";
        popup = window.open(pfad, "Bildfenster", werte);
        popup.focus();

        window.popup.onBlur = window.popup.close;

        }

function PopupPanorama(pfad, breite, hoehe)
        {

        if(window.popup_pan)              // Fenster-Handle existiert schon
          {
          if(!window.popup_pan.closed) {  // Fenster ist noch offen
            popup_pan.focus();
            exit();
            }
          }
        var abst_o = (screen.availHeight - hoehe) / 3;
        var abst_l = (screen.availWidth - breite) / 2;
        abst_o = Math.ceil(abst_o);
        abst_l = Math.ceil(abst_l);
        abst_o = Math.abs(abst_o);
        abst_l = Math.abs(abst_l);
        var werte = "width="+breite+",height="+hoehe+",screenX="+abst_l+",screenY="+abst_o+"";
        popup_pan = window.open(pfad, "Bildfenster", werte);
        popup_pan.focus();

        }
