// create a new viewer object:
var viewer=new PTGuiViewer();

// point to the location of the flash viewer (PTGuiViewer.swf)
// this should be relative to the location of the current HTML document
viewer.setSwfUrl("tl_files/PTGuiViewer/PTGuiViewer.swf");

// What to do if both Flash and the native viewer can be used:
// use viewer.preferHtmlViewer() if you prefer to use the native HTML viewer even 
// when Flash is available.
viewer.preferFlashViewer();

// set parameters for the viewer:
viewer.setVars({
  pano: "tl_files/PTGuiViewer/DSC_5883 Panorama_",
  format: "14faces",
  pan: 0,
  minpan: -180,
  maxpan: 180,
  tilt:0,
  mintilt: -90,
  maxtilt: 90,
  fov: 90,
  minfov: 10,
  maxfov: 120,
  autorotatespeed: 3,
  autorotatedelay: 10,
  maxiosdimension: 567,
  showfullscreenbutton_flash: 1,
  showfullscreenbutton_html: 1,
  enablegyroscope: 1
});

// and embed the viewer
// The remainder of this HTML document should contain an element with the id mentioned here
// (e.g. <div id="..."> )
// The viewer will be embedded as a child of that element

viewer.embed("mypanoviewer");
