function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
function changeMovie(movieLocation, movieID){
	if (!document.getElementById) return false;
	var theContainer = document.getElementById(movieID);
	var theInner = "<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" height=\"200\" width=\"240\">";
	theInner = theInner + "<param name=\"src\" value=\"" + movieLocation + "\">";
	theInner = theInner + "<param name=\"autoplay\" value=\"true\">";
	theInner = theInner + "<param name=\"wmode\" value=\"transparent\">";
	theInner = theInner + "<param name=\"type\" value=\"video/quicktime\" height=\"200\" width=\"240\">";
	theInner = theInner + "<embed src=\"" + movieLocation + "\" wmode=\"transpare\" height=\"200\" width=\"240\" autoplay=\"true\" type=\"video/quicktime\" pluginspage=\"http://www.apple.com/quicktime/download/\">";
	theInner = theInner + "</object>";
	
	theContainer.innerHTML = theInner;
}
function prepareLinks(){
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById) return false;
	var theList = document.getElementById("videoList");
	var videoLinks = theList.getElementsByTagName("a");
	for (var i=0; i<videoLinks.length; i++){
		videoLinks[i].onclick = function(){
			var theMovie = this.getAttribute("href");
			changeMovie(theMovie, "video");
			return false;
		}
	}
}
addLoadEvent(prepareLinks);