/**
 * Reference and declaration for all vars to keep track of for the video player page.
 */
 
// user logged in status
loggedIn = false;

// holds data about object segments
var transcriptIndex = new Array();

// set initial index for currently loaded segment, satrt with the first
curIndex = 0;

// id of the currently highlighted anchor
curAnchor = "";

// id of the last anchor in the current segment
lastSegmentAnchor = "";

// segment finished loading
//var segmentLoaded = false;

// saved responseXML
var savedResponseXML = "";

// activate segment links
activateLinks = false;

// Name of the current speaker
var curSpeaker = "";

// object pid
var pid;

// collection object pid
var coid;

// currently playing segment id
var segId;

// current content Model
var contentModel;

// holds all of the anchors for the table of contents
var anchors = new Array();

// all items to appear in the transcript window
var transcripts = new Array();

// all items to appear in the notes window
var notes = new Array();

// Take note of all flash Events
var flashEvents = new Array();

// boolean for indicating whether we're composing or not
var composing = false;

// flash movie
var movie;

// these are set to true when the ajax components complete
tocDone = false;
transcriptDone = false;
notesDone = false;

//Search

// 0 - segment; 1 - chpter; 2 - phrase;
var searchStateSegment  =  0;
var searchStateChapter  =  1;
var searchStatePhrase   =  2;
var searchStateControll =  searchStatePhrase;

// position controll to navigate (first -1; last 1; do not synchronize - 0);
var searchPositionFirst = -1;
var searchPositionLast  = 1;
var searchPositionDoNotSynchronize = 0;

var searchPositionControll = searchPositionFirst;

//Inetrnet explorer flag;
var isIE = /MSIE/.test(navigator.userAgent);
