/*©2007 The University of the Holy Land, all rights reserved*/

var querySting = new Array;

function setUp() { //This is the function run to set up the page.
	querySting = getQueryString();
	if (querySting['qtvr']) {
		document.getElementById('QTVR_Div').innerHTML=setQTVR(querySting['qtvr']);
	} else {
		document.getElementById('QTVR_Div').innerHTML=setQTVR('NJN3D');
	}
}

function setQTVR(newQTVR) { //This is the main function for setting the QTVR. It should be the only function used to do so.
	var targetQTVR = "QTVR/" + newQTVR + ".mov";
	var QTVRHTML = "<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" width=\"1000\" height=\"490\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" src=\"" + targetQTVR + "\" id=\"theMovie\" onLoad=\"QTVRCheck()\"><param name=\"controller\" value=\"true\"><param name=\"kioskmode\" value=\"true\">";
	QTVRHTML += "<embed src=\"" + targetQTVR + "\" width=\"1000\" height=\"490\" controller=\"true\"";
	QTVRHTML += "pluginspace=\"http://www.apple.com/quicktime/download/\" name=\"theMovie\" enablejavascript=\"true\" kioskmode=\"true\"><\/embed><\/object>";
	return QTVRHTML;
}