function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function makeRemote() {

    var myLeft = (screen.width-311)/2;
    var myTop = (screen.height-450)/2;
    features=',left='+myLeft+',top='+myTop;

	remote =   window.open("",'popup',features+((features!='')?',':'')+'width=400,height=330');
	remote.location.href = 'popup.htm';

	if (remote.opener == null) remote.opener = window;
	remote.opener.name = "opener";
}

function openPopup (url, name, width, height, scrollbars)
{
	if (scrollbars!='no')  scrollbars = 'yes';
	popup	= window.open(url,name,'width='+width+',height='+height+',resizable=no,location=no,status=yes,scrollbars='+scrollbars+',toolbar=no,menubar=no');
	popup.focus();
//	return popup;
}

function openWindow(imgPath, imgName, winName, winTitle, myWidth, myHeight, isCenter, features) {
		if (!imgPath) {
				var imgPath = './images/';
		}
	 
		if (window.screen && isCenter && isCenter == "true") {
				var myLeft = (screen.availWidth - myWidth) / 2;
				var myTop = (screen.availHeight - myHeight) / 2;
				var position = ',left=' + myLeft + ',top=' + myTop;
		}
	 
		if (window.innerWidth) {
				var size = 'innerWidth=' + myWidth + ',innerHeight=' + myHeight;
		} else {
				var size = 'width=' + (myWidth - 4) + ',height=' + (myHeight - 4);
		}
	 
		features += ((features != '') ? ', ' : '') + size + position;
		var imgURL = 'bild.php?path=' + imgPath + '&img=' + imgName + '&title=' + winTitle;
	 
		if (window.winName) {
				window.winName.close();
		}
	 
		window.winName = open(imgURL, winName, features);
		window.winName.focus();
}
