/*
 * ato interactive GmbH
 * Autor: Matthias Holze
 * April 2010
 */

$(document).ready(function() {
	
	$(".popup").click(function(e){
    e.preventDefault();
    var weite = (Fensterweite() / 2) - 347;
    var hoehe = (Fensterhoehe() / 2) - 100;
    window.open($(this).attr("href"), "bedienungsanleitung", "width=520,height=520,left="+weite+",top=" + hoehe + ",resizable=no,scrollbars=no"); 
  });
	
});

function Fensterweite() {
 if (window.innerWidth) {
  return window.innerWidth;
 } else if (document.body && document.body.offsetWidth) {
 return document.body.offsetWidth;
 } else {
 return 0;
 }
}

function Fensterhoehe() {
 if (window.innerHeight) {
 return window.innerHeight;
 } else if (document.body && document.body.offsetHeight) {
 return document.body.offsetHeight;
 } else {
 return 0;
 }
}
