
function openWindow(name, url, width, height) {
	if ( name == "" ) {
		var d = new Date();
		name = "n" + d.getTime();
	}
	if ( document[name] == null  || document[name].closed ) {
		document[name] = window.open(url, name,  "width=" + width + ",height=" + height + ",resizable=yes,scrollbars=no,status=no,menubar=no,toolbar=no,location=no,directories=no");
	}
	document[name].focus();
}

function openFullscreen(name, url, width, height) {
	if ( document[name] == null  || document[name].closed ) {
		document[name] = window.open(url, name,  "fullscreen=yes,scrollbars=no,menubar=no");
	}
	document[name].focus();
}
function openScrollable(name, url, width, height) {
	if ( document[name] == null  || document[name].closed ) {
		document[name] = window.open(url, name,  "width=" + (width + 18) + ",height=" + height + ",resizable=yes,scrollbars=yes,status=no,menubar=no,toolbar=no,location=no,directories=no");
	}
	document[name].focus();
}
		

function includeFlash(source, id, width, height, center) {
	document.writeln('<object type="application/x-shockwave-flash"');
	document.writeln('id="' + id + '"');
	document.writeln('data="' + source + '"');
	document.writeln('width="' + width + '"');
	document.writeln('height="' + height + '">');
	document.writeln('<param name="movie" value="' + source + '" />');
	document.writeln('<param name="scale" value="noscale" />');
	document.writeln('<param name="scale" value="noscale" />');
	if ( center ) {
		document.writeln('<param name="align" value="center" />');
	} else {
		document.writeln('<param name="align" value="LT" />');
	}
	document.writeln('</object>');
}

