/*******************************************************************************
 * Variablen
 ******************************************************************************/
var debug_global = 0;

/*******************************************************************************
 * Baum Funktionen
 ******************************************************************************/
function copyright() {
	var today = new Date();
	var strCopyright;
	strCopyright = "1998 - " + today.getFullYear() + " <a href='http://www.b-ball-day.com'>Baskamerun</a>";
	document.writeln(strCopyright);
}

function oeffnePopUp(path, content, width, height, resizeOK, fullsizeOK) {
	
	var test = document.location.href;
	if(path == 'print'){
		var tempUrl = test.split('?');
		path = 'ShowPrintPreview.php?' + tempUrl[1] + '&preview';
	}

	if (debug_global == 1) {
		alert(path + '\n' + content + '\n' + width + ' - ' + height + '\n'
				+ resizeOK + ' - ' + fullsizeOK);
	}
	var popupWindows = "PopupWindows";
	var popupWidth;
	var popupHeight;
	var windowObjectReferences;
	var screenWitdh = screen.width;
	var screenHeight = screen.height;
	var strWindowsFeaturesResize = "menubar=no,location=false,resizable=yes,scrollbars=yes,status=no,toolbar=no,copyhistory=no";
	var strWindowsFeatures = "menubar=no,location=false,directories=no,resizable=no,scrollbars=yes,status=no,toolbar=no,copyhistory=no";

	if (fullsizeOK == true) {
		popupWidth = screenWitdh - 10;
		popupHeight = screenHeight - 10;
	} else {
		popupWidth = width;
		popupHeight = height;
	}

	if (resizeOK == true) {
		windowsObjectReferences = window.open(path, "cipopup", "width="
				+ popupWidth + ",height=" + popupHeight+","+
				strWindowsFeaturesResize);
	} else {
		windowsObjectReferences = window.open(path, content, "width="
				+ popupWidth + ",height=" + popupHeight +"," + strWindowsFeatures);
	}

	windowsObjectReferences.moveTo((screenWitdh - popupWidth) / 2,
			(screenHeight - popupHeight) / 2);
	if (content == "Impressum") {
		windowsObjectReferences.document
				.writeln("<h2>This is written to Window 3 by the main window</h2>");
	}
	windowsObjectReferences.location.replace(pupopWindows);
	windowsObjectReferences.focus();

}

