 var jsReady = false;
 var startPoint = 0;
 var stopPoint = 0;
 
 function isReady() {
	 return jsReady;
 }
 
 function pageInit() {
	 jsReady = true;
 }
 
 function thisMovie(movieName) {
	 if (navigator.appName.indexOf("Microsoft") != -1) 
	 {
	    if(window[movieName]!=null)
		    return window[movieName];
      else
        return document[movieName];
	 } 
	 else 
	 {
		 return document[movieName];
	 }
 }

function cuepointReachedId(name)
{
	cuepointReached(name, '', '');
}

 function cuepointReached(name, time, desc) 
 { 
  var liElement = document.getElementById(name);
  var liSmallItems = getElementsByClassName('Opened');
  
  for (var i=0; liSmallItems[i]; i++) 
	{ 
		var li = liSmallItems[i];
		li.className = RemoveClassName(li, 'Opened');		
	}	    	
  liElement.className = AddClassName(liElement, 'Opened');
 }


 function videoComplete() 
 {

 }
 
/*
 *	Tells Flash to jump to specific cuepoint in the video, defined by an id.
*/
 function navigateToCuepoint(cuepointId) 
 {
	 thisMovie("vPlayer").navigateToCuepoint(cuepointId);
 }
 
/*
 *	Flash will call this function when user is adding a cuepoint i Editor mode.
*/
 function setCuepoint(time, isStartPoint, isStopPoint) {
	//var newString;
	if (isStartPoint) {
		startPoint = time;
		//newString = "\n" + "Flash sends a startpoint at " + time + " seconds.";
	} else if (isStopPoint) {
		stopPoint = time;
		//newString = "\n" + "Flash sends an endpoint at " + time + " seconds.";
	} else {
		//newString = "\n" + "Flash sends a cuepoint at " + time + " seconds.";
	}
	
	//document.forms["form1"].output.value = newString + document.forms["form1"].output.value;
 }
 
 function editCuepoint(time) {
	// not implemented
	thisMovie("vPlayer").editCuepoint(time);
 }
