
swfobject.registerObject("FlashPanorama", "9.0.0", "expressInstall.swf");

function loadDirEditPano( id, scene, north_id, panoname, mode )
{
	var north = document.getElementById(north_id).value;
	if( north == "" ) north = 0;

	var flashvars = {
		movie: webroot + "fpp/pano.swf",
		xml_file: ""+ webroot + "scenes/editxml/" + scene + "/0/" + mode + "/" + north
	};

	var params = {
		bgcolor: "#282828",
		allowfullscreen: "true",
		allowscriptaccess: "sameDomain"
	};

	var attributes = {
	  id: panoname,
	  name: panoname
	};


	swfobject.embedSWF(webroot + "fpp/pano.swf", id, 450, 300, "9.0.0","expressInstall.swf", flashvars, params, attributes);
}

function loadDefaultEditPano( id, scene, pan_id, tilt_id, zoom_id, panoname, mode )
{
	var pan = document.getElementById(pan_id).value;
	if( pan == "" ) pan = 0;

	var tilt = document.getElementById(tilt_id).value;
	if( tilt == "" ) tilt = 0;

	var zoom = document.getElementById(zoom_id).value;
	if( zoom == "" ) zoom = 0;

	var flashvars = {
			movie: webroot + "fpp/pano.swf",
			xml_file: ""+ webroot + "scenes/editxml/" + scene + "/1/" + mode + "/" + pan + "/" + tilt + "/" + zoom
	};
	var params = {
		bgcolor: "#282828",
		allowfullscreen: "true",
		allowscriptaccess: "sameDomain"
	};
	var attributes = {
	  id: panoname,
	  name: panoname
	};

	swfobject.embedSWF(webroot + "fpp/pano.swf", id, 450, 300, "9.0.0","expressInstall.swf", flashvars, params, attributes);
}


function loadDirConfirmPano( id, scene, north, panoname, mode )
{
	var flashvars = {
			movie: webroot + "fpp/pano.swf",
			xml_file: ""+ webroot + "scenes/editxml/" + scene + "/2/" + mode + "/" + north
		};

	var params = {
		bgcolor: "#282828",
		allowfullscreen: "true",
		allowscriptaccess: "sameDomain"
	};

	var attributes = {
	  id: panoname,
	  name: panoname
	};

	swfobject.embedSWF(webroot + "fpp/pano.swf", id, 450, 300, "9.0.0","expressInstall.swf", flashvars, params, attributes);
}

function loadDefaultConfirmPano( id, scene, pan, tilt, zoom, panoname, mode )
{
	var flashvars = {
			movie: webroot + "fpp/pano.swf",
			xml_file: ""+ webroot + "scenes/editxml/" + scene + "/3/" + mode + "/" + pan + "/" + tilt + "/" + zoom
	};
	var params = {
		bgcolor: "#282828",
		allowfullscreen: "true",
		allowscriptaccess: "sameDomain"
	};
	var attributes = {
	  id: panoname,
	  name: panoname
	};

	swfobject.embedSWF(webroot + "fpp/pano.swf", id, 450, 300, "9.0.0","expressInstall.swf", flashvars, params, attributes);
}

function flashPano( id, user, pano_id, width, height )
{
	var flashvars = {
			movie: webroot + "fpp/pano.swf",
			xml_file: ""+ webroot + "scenes/panoramaxml/" + pano_id
	};
	var params = {
		bgcolor: "#282828",
		allowfullscreen: "true",
		allowscriptaccess: "sameDomain"
	};
	var attributes = {
	  id: "flashpano",
	  name: "flashpano"
	};

	swfobject.embedSWF(webroot + "fpp/pano.swf", id, width, height, "9.0.0","expressInstall.swf", flashvars, params, attributes);
}

