function setQTVideo(showController)
{	
	if(showController){
		sCont = '<param name="controller" value="true" />';
		sCont2 = ' controller="true" ';
	}
	else{
		sCont = '<param name="controller" value="false" />';
		sCont2 = ' controller="false" ';
	}
	var objectDefinition = 
		'<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab##version=6,0,2,0" width="537" height="359" align="middle">' +
			'<PARAM name="src" value="/Files/Generic/Panorama/RIBA2-Westminster.mov" />' +
			'<PARAM name="autoplay" value="true" />' +
			sCont +
			'<PARAM name="scale" value="tofit" />' +
			'<embed src="/Files/Generic/Panorama/RIBA2-Westminster.mov"' + sCont2 + 'autoplay="true" width="537" height="359" align="middle" bgcolor="black" pluginspage="http://www.apple.com/quicktime/download/" scale="tofit">' +
		   	'</embed>' +
		'</OBJECT>';
	document.write(objectDefinition);
}

function setPTViewerVideo()
{
    '<APPLET name="ptviewer" archive="ptviewer.jar" code="ptviewer.class" width="537" height="359" align="middle">' +
        '<PARAM name="file" value="RIBA12-SPHERICAL.jpg">' +
        '<PARAM name="cursor" value="MOVE">' +
	'<PARAM name="cache" value="true">' +
	'<PARAM name="auto" value="0.3">' +
	'<PARAM name="autoTime" value="180">' +
	'<PARAM name="imgLoadFeedback" value="true">' +
	'<PARAM name="showToolbar" value="true">'
    '</APPLET>'        
}

function getQueryStringValues(xparam)
{
    xparam = xparam.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS = "[\\?&]"+xparam+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( window.location.href );
    if( results == null )
       return "";  
    else
       return results[1];
}