<!--
// (string popImg [, string popTitle [, number popWidth [, number popHeight [, string popFile [, number popLeft [, number popTop [, string popClickTxt [, string popErrorTxt [, string popName]]]]]]]]])

function imgPopup(popImg, popTitle, popWidth, popHeight, popFile, popLeft, popTop, popClickTxt, popErrorTxt, popName) {
  if(!document.images) { alert('Die aufgerufene Seite ist in Ihrem Webbrowser leider nicht darstellbar.'); return; }
  popImg = ((typeof popImg == 'string') && (popImg.indexOf('.') != -1)) ? popImg : false;
  if(popImg) { window.popImg = popImg; } else { alert('Achtung!\n\nEs wurde kein gültiger Pfad für das zu öffnende Bild übergeben.'); return; }
  popTitle = ((typeof popTitle == 'string') && (popTitle.length > 1)) ? popTitle : false;
  popWidth = (parseInt(popWidth) && (parseInt(popWidth) > 10)) ? parseInt(popWidth) : false;
  popHeight = (parseInt(popHeight) && (parseInt(popHeight) > 10) && popWidth) ? parseInt(popHeight) : false;
  popFile = ((typeof popFile == 'string') && (popFile.indexOf('.') != -1)) ? popFile : false;
  popLeft = (((typeof popLeft == 'number') || (typeof popLeft == 'string')) && (parseInt(popLeft) != 'NaN')) ? parseInt(popLeft) : false;
  popTop = (((typeof popTop == 'number') || (typeof popTop == 'string')) && (parseInt(popTop) != 'NaN') && (typeof popLeft == 'number')) ? parseInt(popTop) : false;
  popClickTxt = ((typeof popClickTxt == 'string') && (popClickTxt.length > 1)) ? popClickTxt : false;
  popErrorTxt = ((typeof popErrorTxt == 'string') && (popErrorTxt.length > 1)) ? popErrorTxt : false;
  popName = ((typeof popName == 'string') && (popName.length > 1)) ? popName : false;
  window.autoResize = true;
  if(popHeight) {
    window.autoResize = false;
    if((typeof popTop != 'number') && window.screen) {
      popLeft = ((screen.width / 2) - (popWidth / 2));
      popTop = ((screen.height / 2) - (popHeight / 2));
    }
  }
  window.autoPos = (typeof popTop != 'number') ? true : false;
  
  // Konfiguration Start
  window.popTitle = (popTitle) ? popTitle : 'ORIGINALBILD';
  popWidth = (popWidth) ? popWidth : 150; // min: 150
  popHeight = (popHeight) ? popHeight : 150; // min: 150
  popFile = (popFile) ? popFile : 'popup.html';
  popLeft = (popLeft) ? popLeft : 0;
  popTop = (popTop) ? popTop : 0;
  window.popClickTxt = (popClickTxt) ? popClickTxt : 'Klicken Sie um das Fenster zu schliessen';
  window.popErrorTxt = (popErrorTxt) ? popErrorTxt : 'Die aufgerufene Seite ist in Ihrem Webbrowser leider nicht darstellbar.';
  popName = (popName) ? popName : 'img_popup';
  // Konfiguration Ende
  
  if(!window.autoResize && window.newImgPopup && (window.newImgPopup.closed == false) && (window.newImgPopup.name == popName)) {
    window.newImgPopup.close();
  }
  window.newImgPopup = window.open(popFile, popName, 'width=' + popWidth + ',height=' + popHeight + ',screenX=' + popLeft + ',screenY=' + popTop + ',left=' + popLeft + ',top=' + popTop + ',scrollbars=no,resizable=yes');
}
 
function checkImg() {
  var imgIsLoaded = new Array();
  if(document.all && !window.opera) {
    var i;
    for(i=0; i < document.images.length; i++) {
      if(document.images[i].complete == false) {
        document.images[i].src = noImgGif.src;
        document.images[i].width = noImgGif.width;
        document.images[i].height = noImgGif.height;
        document.images[i].title = noImgGif.title;
        document.images[i].border = noImgGif.border;
        document.images[i].hspace = noImgGif.hspace;
        document.images[i].vspace = noImgGif.vspace;
        imgIsLoaded[i] = false;
        var imgParentElem = document.images[i].parentElement;
        if(imgParentElem.tagName.toUpperCase() == 'A') {
          if(document.getElementById) {
            imgParentElem.removeNode();
          } else {
            with(imgParentElem) {
              removeAttribute('href', 0);
              removeAttribute('target', 0);
              removeAttribute('title', 0);
            }
          }
        }
      } else {
        imgIsLoaded[i] = true;
      }
    }
  }
  // Statt diesem Kommentar kannst du einen bereits auf der Seite vorhandenen onLoad-Funktionsaufruf einsetzen.
}
 
if(document.all && !window.opera) {
  var noImgGif = new Image();
  noImgGif.src = 'no_image.gif';
  noImgGif.width = 50;
  noImgGif.height = 50;
  noImgGif.title = '';
  noImgGif.border = 0;
  noImgGif.hspace = 0;
  noImgGif.vspace = 0;
}
    //-->
