
// ---------------------------------------
function launchPanoWindow(window_size, movie_name, movie_title)
{
	if (typeof panoviewer == "undefined")
	{
	//	var panoviewer = 0;
	}

	switch(panoviewer)
	{
	case 1:
		var panoext = ".jpg";
		break;
	case 2:
		var panoext = ".xml";
		break;
	case 3:
	case 4:
		var panoext = ".swf";
		break;
	case 5:
		var panoext = "";
		break;
	default :
		var panoext = ".mov";
		break;
	}

	var wf = "";
	var wn = "";

	wf += "left=0, top=0, location=0";
	wf += ",menubar=0, toolbar=0";
	wf += ",directories=0, location=0";
	wf += ",status=0, scrollbars=0";
	wf += ",resizable=0";


	switch(window_size)
	{
	case 1 : // small
		wf += ",width=550, height=450";
		var pano_width = '540';
		var pano_height = '400';
		wn = 'panosmall';
		break;
	case 2 : // medium
		wf += ",width=900, height=660";
		var pano_width = '890';
		var pano_height = '600';
		wn = 'panomedium';
		break;
	case 3 : // large
		var aw = screen.availWidth - 10;
		var ah = screen.availHeight - 30;
		wf += ",width=" + aw;
		wf += ",height=" + ah;
		wf += ",fullscreen";
		var pano_width = '99%';  // screen.availWidth - 30;
		var pano_height = '97%'; // screen.availHeight - 60;
		wn = 'panolarge';
		break;
	default : // medium
		wf += ",width=890, height=660";
		var pano_width = '900';
		var pano_height = '600';
		wn = 'panomedium';
		break;
	}

	var w = window.open("panoLaunch.php?name=" + movie_name + '&viewer=' + panoviewer + '&size=' + window_size + '&width=' + pano_width + '&height=' + pano_height + '&title=' + movie_title, wn, wf);
	w.focus();
}
