function checkFrameset() {
		//alert("checking Frameset: " + parent.frames.length + ", " + parent.frames["mainfinanz"]);
   	if (!parent.frames["mainfinanz"]) {
        window.location.href="http://www.kampa.de/finanz.html?page=" + encodeURIComponent(window.location.href);
	 	}
}

function openPrintWin(url) {
   var win = window.open (url, "Druckansicht", winPosString(500, 600, "center", "center")
         + ",toolbar=no,status=no,scrollbars=yes,resizable=yes,location=no,menubar=yes");
  win.focus();
  return false;
}

function openUrl(url) {
   var win = window.open (url, "Fenster", winPosString(650, 500, "center", "center")
         + ",toolbar=no,status=no,scrollbars=yes,resizable=yes,location=no,menubar=yes");
    win.focus();
    return false;
}

function showImage (url, w, h) {
  w = w + 20;
  h = h + 20;
  var win = window.open (url, "popup", winPosString(w, h, "center", "center")
         + ",toolbar=no,status=no,scrollbars=yes,resizable=yes,location=no,menubar=no");
      win.focus();
}

function zoomImage(url, w, h) {
  // 40 Pixel dazu für Rand
   w = w + 20;
  // 40 Pixel dazu für Rand, 20 Pixel für Fuss, 50 für Titel
  h = h + 100;
  showImage(url, w, h);
}


function openPopup(url, width, height) {
  var win = window.open (url, "popup", winPosString(width, height, "center", "center")
         + ",toolbar=no,status=no,scrollbars=yes,resizable=yes,location=no,menubar=no");
  win.focus();
  return false;
}


function winPosString(w, h, hpos, vpos) {
  var x = 100;
  var y = 100;
  w = w + 20;
  h = h + 20;
  maxW = 0;
  maxH = 0;
  if (screen.availWidth && screen.availHeight)
    {
      maxW = screen.availWidth - 24;
      maxH =  screen.availHeight - 24;
    } else if (screen.width && screen.height) {
      maxW = screen.width - 24;
      maxH = screen.height - 24;
    } else {
      maxW = 760;
      maxH = 550;
    }
    w = Math.min(w, maxW);
    h = Math.min(h, maxH);
    if (hpos == "left") {
      x = 1;
    } else if (hpos == "right") {
      x = maxW - w;
    } else {
      x = (maxW - w) / 2;
    }
    if (vpos == "top") {
      y = 1;
    } else if (vpos == "bottom") {
      y = maxH - h;
    } else {
      y = (maxH - h) / 2;
    }
    return "left=" + x + ",top=" + y + ",width=" + w +",height="+h;
}

function correctWidth() {
   if (window.innerWidth) {
      if (window.innerWidth % 2 == 1) {
          window.resizeBy(-1, 0);
      }
   }
}

