var win;

function launchvideo(winurl, width, height) {

	// called from the flash buttons in the onRelease event or from htm eg
	// <a href="javascript: lauchvideo('videopopup/Holborn.htm', 600, 300');">Click to Open Win</a>
	// opens the the htm file winurl in a popup window size specified by height and width

	if (arguments.length == 1) {
		width = 600;	
		height = 300;
	}
	winleft = (screen.width) ? (screen.width - width) / 2 : 0;		// center horizontal
	wintop = (screen.height) ? (screen.height - height) / 3 : 0;	// position towards top of page
	winfeatures = "width=" + width + ",height=" + height + ",top=" + wintop + ",left=" + winleft;
	win = window.open(winurl, "videopopup", winfeatures);

	// when main window closes also close popup window
	window.onunload = function() {win.close();}	
}



