var floater=null;
var win1=null;
var win2=null;
var win3=null;

function neues_fenster(url,width,height,name,fmenu,fresize,ftoolbar,flocationbar,fstatus,fscrollbars,pos_top,pos_left)
{
	if (!width) width='640';
	if (!height) height='480';
	if (!name) name='vicwin';
	if (!fmenu) fmenu='yes';
	if (!fresize) fresize='yes';
	if (!ftoolbar) ftoolbar='no';
	if (!flocationbar) flocationbar='no';
	if (!fstatus) fstatus='yes';
	if (!fscrollbars) fscrollbars='yes';
	if (!pos_top) pos_top = (screen.height/2)-(height/2);
	if (!pos_left) pos_left = (screen.width/2)-(width/2);

	if (document.layers || document.all) {
		if (win1 && (!win1.closed) && (win1.name == name)) {
			floater = win1;
		}
		else if (win2 && (!win2.closed) && (win2.name == name)) {
			floater = win2;
		}
		else if (win3 && (!win3.closed) && (win3.name == name)) {
			floater = win3;
		}
		else {
			if (win1 && (!win1.closed)) {
				floater = win1;
			}
			else if (win2 && (!win2.closed)) {
				floater = win2;
			}
			else if (win3 && (!win3.closed)) {
				floater = win3;
			}
			else {
				floater = null;
			}
		}

		if (floater && !floater.closed) {
			floater.focus();
			floater.document.location.href = url;
			// floater.resizeTo(width, height);
		}
		else {
			floater = window.open(url, name, 'width='+width+',height='+height+',top='+pos_top+',left='+pos_left+',menubar='+fmenu+',resizable='+fresize+',toolbar='+ftoolbar+',location='+flocationbar+',status='+fstatus+',scrollbars='+fscrollbars);

			if (document.layers) {
				floater.focus();
			}

			if (name.substring(0,3) != 'rnd') {
				if ((!win1) || win1.closed) {
					win1 = floater;
				}
				else if ((!win2) || win2.closed) {
					win2 = floater;
				}
				else {
					win3 = floater;
				}
			}
		}
	}
	else {
		floater = window.open(url, name, 'width='+width+',height='+height+',top='+pos_top+',left='+pos_left+',menubar='+fmenu+',resizable='+fresize+',toolbar='+ftoolbar+',location='+flocationbar+',status='+fstatus+',scrollbars='+fscrollbars);
	}
	return;
}

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Schließt das Popup-Fenster nach dem Sprung auf die Ziel-URL (MW@20020816)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
function goToUrl(popThrough) {
	if (popThrough == "X") {
		window.close();
	}
	else {		
		if (!window.opener){
			self.open(popThrough)
		} else if (window.opener.closed){
			window.open(popThrough);
			window.close();
		} else {
			window.opener.location.href = popThrough;
			window.close();
		}
	}
}