function showFlash(fileID, movieName, movieTitle, movieSpeaker, speakerTitle)
	{
		new Lightbox.base('videoContainer');
		//alert("TEST");
		var xy = getScrollXY();
		var wh = getWindowSize();
		document.getElementById("videoContainer").style.left = xy[0] + (wh[0]/2-194);
		document.getElementById("videoContainer").style.top = xy[1] + (wh[1]/2-255);
		document.getElementById("videoContainer").style.visibility = "visible";
		//videoTitle.innerHTML = movieTitle;
		testString = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="378" height="488" id="' + fileID + '" align="middle">';
		testString = testString + '<param name="allowScriptAccess" value="sameDomain" />';
		testString = testString + '<param name="movie" value="media/moviePlay.swf?movieName=' + movieName + '&movieTitle=' + movieTitle + '&movieSpeaker=' + movieSpeaker + '&speakerTitle=' + speakerTitle + '&movieTime=180" />';
		testString = testString + '<param name="quality" value="high" />';
		testString = testString + '<param name="wmode" value="transparent">';
		testString = testString + '<embed src="media/moviePlay.swf?movieName=' + movieName + '&movieTitle=' + movieTitle + '&movieSpeaker=' + movieSpeaker + '&speakerTitle=' + speakerTitle + '&movieTime=180" quality="high" bgcolor="#000000" width="378" height="488" name="' + fileID + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		testString = testString + '</object><br />';
//alert(testString);
document.getElementById("videoPlayer").innerHTML = testString;
	}

function showFlash2(fileID, movieName, movieTitle, speakerName, speakerTitle)
	{
		new Lightbox.base('videoContainer2');
		//alert("TEST");
		var xy = getScrollXY();
		var wh = getWindowSize();

		if(document.all){
			document.getElementById("movieTitle").innerText = movieTitle;
			document.getElementById("speakerName").innerText = speakerName;
			document.getElementById("speakerTitle").innerText = speakerTitle;
		} else{
			document.getElementById("movieTitle").textContent = movieTitle;
			document.getElementById("speakerName").textContent = speakerName;
			document.getElementById("speakerTitle").textContent = speakerTitle;
		}

		document.getElementById("videoContainer2").style.left = xy[0] + (wh[0]/2-194);
		document.getElementById("videoContainer2").style.top = xy[1] + (wh[1]/2-255);
		document.getElementById("videoContainer2").style.visibility = "visible";
		//videoTitle.innerHTML = movieTitle;
		testString = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="368" height="326" id="' + fileID + '" align="middle">';
		testString = testString + '<param name="allowScriptAccess" value="sameDomain" />';
		testString = testString + '<param name="movie" value="media/moviePlay_compact.swf?movieName=' + movieName + '&movieTime=180" />';
		testString = testString + '<param name="quality" value="high" />';
		testString = testString + '<param name="wmode" value="transparent">';
		testString = testString + '<embed src="media/moviePlay_compact.swf?movieName=' + movieName + '&movieTime=180" quality="high" bgcolor="#000000" width="368" height="326" name="' + fileID + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		testString = testString + '</object><br />';
//alert(testString);
document.getElementById("videoPlayer2").innerHTML = testString;
	}

function closeVideo()
	{
	document.getElementById("videoPlayer").innerHTML = "";
	document.getElementById("videoContainer").style.visibility = "hidden";
	//hideLightbox();
	}

function onScroll() {
    if (document.layers) {
        alert(window.pageXOffset + " - " + window.pageYOffset);
    }
    else if (document.all) {
        alert(document.body.scrollLeft + " - " + document.documentElement.scrollTop);
    }
}

function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

function getWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [myWidth, myHeight];
}

function moveVideo()
	{
	if (videoContainer.style.visibility == "visible")
		{
		var xy = getScrollXY();
		var wh = getWindowSize();
		videoContainer.style.left = xy[0] + (wh[0]/2-194);
		videoContainer.style.top = xy[1] + (wh[1]/2-255);
		}
	}

function showTour(fileName)
	{
		//950 x 600
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="760" height="480" id="tour" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="media/' + fileName+ '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="media/' + fileName+ '" quality="high" bgcolor="#000000" width="760" height="480" name="tour" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object><br />');
	}
