/*
 * v.o. 14.11.'03: this version of the createWindow is most recent and is cross-browser compatible.
 * former versions which use document.body.clientwidth were not cross-browser compatible.
 */
function createWindow(strURL, strName, intWidth, intHeight, strScroll) {
	intLeft = ((screen.width-intWidth) / 2);
	intTop = ((screen.height-intHeight) / 2);
	args = "width=" + intWidth + ",height=" + intHeight + ",left=" + intLeft  + ",top=" + intTop  + ",resizable=no,scrollbars=" + strScroll + ",status=0";
	remote = window.open(strURL, strName, args);
	if (remote != null) {
		if (remote.opener == null) remote.opener = self;
	}
	return remote;
}

var previewWindow = null;
function launchPreview( strURL ) {
	if( previewWindow != null ) {
		previewWindow.close();
		previewWindow = null;
	}
	previewWindow = window.open(strURL,'preview', '' );
	previewWindow.focus();
}

