function show_tall_movie(myURL)
{
var myMovie=myURL.substring(0,myURL.length - 4)+".mov";
new_comment_series1(myMovie);	
}

function new_comment_series1(myMovie)
{
var myCode = '';
	myCode = myCode+'<html><head><title>Drexel University College of Medicine Video</title>';
	myCode = myCode+'<link rel="stylesheet" type="text/css" href="../css/skillsmovies.css">';
	myCode = myCode+'<script type="text/javascript" src="../js/comment.js"></script>';
	myCode = myCode+'</head><body bgcolor="black" onBlur="self.focus()" onLoad="javascript:writeCommentMovie()">';
	myCode = myCode+'<div align="center"><p id="myCommentMovie">'+myMovie+'</p></div>';
	myCode = myCode+'<p>This video is an excerpt from the e-learining tools developed by <a href="http://webcampus.drexelmed.edu/interactive/cda/" target="_new">Christof Daetwyler</a> and Mark Mumenthaler at <a href="http://www.aum.iawf.unibe.ch/" target="_new">University of Berne Medical School, Department for Educational Media</a> or in private for the DVD to the 5th editon of the textbook Neurologische Differenzialdiagnostik, published by the Georg Thieme Publishing house</div>';

myComment=window.open("","Comment","toolbar=no, width=700, height=600, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
myComment.document.write(myCode);
myComment.document.close();
}

function show_intro_movie(myURL)
{
var myMovie=myURL.substring(0,myURL.length - 4)+".mov";
new_comment_series2(myMovie);	
}

function show_movie(myURL)
{
var myMovie=myURL.substring(0,myURL.length - 4)+".mov";
show_skills_video(myMovie);	
}

function show_skills_video(myMovie)
{
    myCommentWindow = window.open('','ClinicalSkillsVideo','left=20,top=20,width=700,height=600,location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes');

	var myCode = '';
	myCode = myCode+'<html><head><title>Drexel University College of Medicine Video</title>';
	myCode = myCode+'<link rel="stylesheet" type="text/css" href="../css/skillsmovies.css">';
	myCode = myCode+'<script type="text/javascript" src="../js/comment.js"></script>';
	myCode = myCode+'</head><body bgcolor="black" onBlur="self.focus()" onLoad="javascript:writeCommentMovie()">';
	myCode = myCode+'<div align="center"><p id="myCommentMovie">'+myMovie+'</p>';
	myCode = myCode+'<br><font color="#FF9933"><a href="javascript:window.close()">please click HERE to close this window</a></font><br>change speed: <a href="javascript:document.my_movie.Stop()">stop</a> <a href="javascript:document.my_movie.SetRate(0.5)">0.5x</a> <a href="javascript:document.my_movie.SetRate(1)">1x</a> <a href="javascript:document.my_movie.SetRate(1.5)">1.5x</a> <a href="javascript:document.my_movie.SetRate(2)">2x</a></font></p></div><img src="http://webcampus.drexelmed.edu/skills/movies/blackdot.png" width="1" height="1"></body></html>';

myCommentWindow.document.write(myCode);
myCommentWindow.document.close();
}

function pausecomp(millis)
{
date = new Date();
var curDate = null;

do { var curDate = new Date(); }
while(curDate-date < millis);
}


function new_comment_series2(myMovie)
{
var myCode = '';
	myCode = myCode+'<html><head><title>Drexel University College of Medicine Video</title>';
	myCode = myCode+'<link rel="stylesheet" type="text/css" href="../css/skillsmovies.css">';
	myCode = myCode+'<script type="text/javascript" src="../js/comment.js"></script>';
	myCode = myCode+'</head><body bgcolor="black" onBlur="self.focus()" onLoad="javascript:writeCommentMovie()">';
	myCode = myCode+'<div align="center"><p id="myCommentMovie">'+myMovie+'</p>';
	myCode = myCode+'<br><font color="#FF9933"><a href="javascript:window.close()">please click HERE to close this window</a></font><br>change speed: <a href="javascript:document.my_movie.Stop()">stop</a> <a href="javascript:document.my_movie.SetRate(0.5)">0.5x</a> <a href="javascript:document.my_movie.SetRate(1)">1x</a> <a href="javascript:document.my_movie.SetRate(1.5)">1.5x</a> <a href="javascript:document.my_movie.SetRate(2)">2x</a></font></p></div><img src="http://webcampus.drexelmed.edu/skills/movies/blackdot.png" width="1" height="1"></body></html>';

myComment=window.open("","Comment","toolbar=no, width=700, height=600, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
myComment.document.write(myCode);
myComment.document.close();
}

function writeCommentMovie()
{
myMovie=document.getElementById("myCommentMovie").innerHTML;
myVar='<object id="my_movie" name="my_movie" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
	myVar=myVar+' codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="640" height="496">';
	myVar=myVar+' <param name="src" value="' + myMovie + '" />';
	myVar=myVar+' <param name="controller" value="true" />';
	myVar=myVar+' <param name="autoplay" value="true" />';
	myVar=myVar+' <param name="volume" value="100" />';
	myVar=myVar+' <param name="scale" value="tofit" />';
	myVar=myVar+' <param name="loop" value="false" />';
	myVar=myVar+' <embed pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" class="mov" width="640" height="496"';
	myVar=myVar+' src="' + myMovie + '" controller="true" autoplay="true" scale="tofit" volume="100" loop="false" id="my_movie" name="my_movie" enablejavascript="true"></embed></object>';

document.getElementById("myCommentMovie").innerHTML=myVar;
}


function show_GEM_movie(myMovie)
{
var myCode = '';
var tmp = '';
 myCode = myCode+'<html><head><title>SKILLS Movie</title>';
 myCode = myCode+'<link rel="stylesheet" type="text/css" href="../css/gem_movies.css">';
 myCode = myCode+'<script type="text/javascript" src="../js/comment.js"></script>';
 myCode = myCode+'</head><body bgcolor="#FFFFFF" onBlur="self.focus()">';
 myCode = myCode+'<div align="center"><p><OBJECT WIDTH="640" HEIGHT="500" CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" NAME="my_movie" ID="my_movie"><PARAM name="BGCOLOR" value="#000000"><PARAM name="autoplay" value="TRUE"><PARAM name="SRC" VALUE="';
 myCode = myCode+myMovie;
 myCode = myCode+'"><EMBED SRC="';
 myCode = myCode+myMovie;
 myCode = myCode+'" WIDTH="640" HEIGHT="500" align="center" CONTROLLER="TRUE" type="video/quicktime" TARGET="myself" BGCOLOR="#000000" BORDER="0" PLUGINSPAGE="http://www.apple.com/quicktime/download/indext.htm" enablejavascript="true" NAME="my_movie" ID="my_movie"></EMBED></OBJECT>';
 myCode = myCode+'<br><font color="#FF9933"><a href="javascript:window.close()">please click HERE to close this window</a></font><br>If there is no video playing, <a href="http://www.apple.com/quicktime" target="_new">download the free QuickTime-Plugin</a></div></body><\/html>';
 myGEMovie=window.open("","skills","toolbar=no, width=680, height=560, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
pausecomp(100);
var tmp = myGEMovie.document;
tmp.write(myCode);
tmp.close();	
}


function show_GEM_movieNEW(myMovie)
{
var myCode = '';
 myCode = myCode+'<html><head><title>Drexel University College of Medicine SKILLS VIDEO</title>';
 myCode = myCode+'<link rel="stylesheet" type="text/css" href="../css/gem_movies.css">';
 myCode = myCode+'<script type="text/javascript" src="../js/comment.js"></script>';
 myCode = myCode+'</head><body bgcolor="#FFFFFF" onBlur="self.focus()">';
 myCode = myCode+'<div align="center"><p><OBJECT WIDTH="640" HEIGHT="500" CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" NAME="my_movie" ID="my_movie"><PARAM name="BGCOLOR" value="#000000"><PARAM name="autoplay" value="TRUE"><PARAM name="SRC" VALUE="';
 myCode = myCode+myMovie;
 myCode = myCode+'"><EMBED SRC="';
 myCode = myCode+myMovie;
 myCode = myCode+'" WIDTH="640" HEIGHT="500" align="center" CONTROLLER="TRUE" type="video/quicktime" TARGET="myself" BGCOLOR="#000000" BORDER="0" PLUGINSPAGE="http://www.apple.com/quicktime/download/indext.htm" enablejavascript="true" NAME="my_movie" ID="my_movie"></EMBED></OBJECT>';
 myCode = myCode+'<br><font color="#FF9933"><a href="javascript:window.close()">please click HERE to close this window</a></font><br>If there is no video playing, <a href="http://www.apple.com/quicktime" target="_new">download the free QuickTime-Plugin</a></div></body></html>';
 myGEMovie=window.open("","skills","toolbar=no, width=680, height=560, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
 pausecomp(100);
var tmp = myGEMovie.document;
tmp.write(myCode);
tmp.close();	
}

function pausecomp(millis)
{
date = new Date();
var curDate = null;

do { var curDate = new Date(); }
while(curDate-date < millis);
}

function show_comment(myURL)
{
window.open(myURL,"Comment","toolbar=no, width=200, height=200, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
frame1=eval("parent.MovieMainFrame");
frame1.document.main_movie.Stop();
}

function show_textcomment(myURL)
{
window.open(myURL,"Comment","toolbar=no, width=600, height=400, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes");
frame1=eval("parent.MovieMainFrame");
frame1.document.main_movie.Stop();
}


function close_comment()
{
window.close();
window.opener.parent.MovieMainFrame.document.main_movie.Play();
}

function show_movie_stop(myURL)
{
window.open(myURL,"Example","toolbar=no, width=380, height=320, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
frame1=eval("parent.MovieMainFrame");
frame1.document.main_movie.Stop();
}


function close_movie()
{
window.close();
}

function checkQTVersion(QTYN)
{
 if (QTYN == false)
 {
 //quickTime not installed at all
 alert("You must install QuickTime to play our movies! Please read the System Requirements and follow the link to download QuickTime.");
 }
 if (getQuicktimeVersion() < 7)
 {
 alert("You need QuickTime Version 7 or better to play the movies on our site. Please read the System Requirements and follow the link to download QuickTime.");
 }
}

function getQuicktimeVersion() {
// http://www.dithered.com/javascript/quicktime_detect/quicktime_detect.txt
// Quicktime Detection  v1.0
// documentation: http://www.dithered.com/javascript/quicktime_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)

   var agent = navigator.userAgent.toLowerCase(); 
   
   // NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Quicktime plugin in plugin array
   if (navigator.plugins != null && navigator.plugins.length > 0) {
      for (i=0; i < navigator.plugins.length; i++ ) {
         var plugin =navigator.plugins[i];
         if (plugin.name.indexOf("QuickTime") > -1) {
            quicktimeVersion = parseFloat(plugin.name.substring(18));
         }
      }
   }
   
   // IE4+ Win32:  attempt to create an ActiveX object using VBScript
   else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
     document.write('<scr' + 'ipt language="VBScript"\> \n');
      document.write('on error resume next \n');
      document.write('dim obQuicktime \n');
      document.write('set obQuicktime = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") \n');
      document.write('if IsObject(obQuicktime) then \n');
      document.write('   if obQuicktime.IsQuickTimeAvailable(0) then \n');
      document.write('      quicktimeVersion = CInt(Hex(obQuicktime.QuickTimeVersion) / 1000000) \n');
      document.write('   end if \n');
      document.write('end if \n');
      document.write('</scr' + 'ipt\> \n');
  }

   // Can't detect in all other cases
   else {
      quicktimeVersion = quicktimeVersion_DONTKNOW;
   }

   return quicktimeVersion;
}

