var popup_width = 700;
var popup_height = 575;
var popup_cnt = 0;

var norm = new Array();
var high = new Array();

// Allgemeine Popup-Funktion:
// im Link für Std-Größe/Name/Resizable/Scrolling: onclick="popup(this.href);return false;"
// im Link für speziellere Angaben z.B.: onclick="popup(this.href, 'name', 200, 300, 'no', 'yes');return false;"
function popup (url, name, w, h, resizable, scroll, statusbar) {
	if (statusbar == null || statusbar == '')
   		statusbar = 'no';
 	if (scroll == null || scroll == '')
   		scroll = 'yes';
 	if (resizable == null || resizable == '')
   		resizable = 'yes';
 	if (h == null || h == '')
   		h = popup_height;
 	if (w == null || w == '')
   		w = popup_width;
 	if (name == null || name == '')
   		name = 'popup_' + (new Date().getTime());

 	var winl = (screen.width - w) / 2;
 	//winl += popup_cnt * 20; // immer um 10px versetzt
 	var wint = (screen.height - h) / 2;
 	//wint += popup_cnt * 20; // immer um 10px versetzt
 	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable;
 	winprops += ',status='+statusbar;

 	win = window.open(url, name, winprops);
 	if (parseInt(navigator.appVersion) >= 4) {
   		win.window.focus();
 	}

 	popup_cnt++;
 	return win;
}

// Non-Resizable Popup, sonst wie oben
function popup_nr (url, name, w, h, scroll) {
	return popup(url, name, w, h, 'no', scroll, 'yes');
}

function popup_druckversion (url) {
	//var url = this.location.href;
    //if (url.indexOf('?') > -1)
    	//url += "&type=1";
	//else
		//url += "?type=1";

    popup_nr(url, "druckversion");
}

function on(which) {   
   document.images[which].src = high[which].src;
}
function off(which) {	
   document.images[which].src = norm[which].src;
}
function mon(which) {
   on(which);
}
function moff(which) {	
   off(which);   
}

norm['img_print'] = new Image;
norm['img_print'].src = "fileadmin/images/printversion_ongrey.gif";
high['img_print'] = new Image;
high['img_print'].src = "fileadmin/images/printversion_ongrey_on.gif";


