var hasQT = false;

function detectQuickTime() {

	var agent = navigator.userAgent.toLowerCase();
		
	if (navigator.plugins != null && navigator.plugins.length > 0) {
	  for (i=0; i < navigator.plugins.length; i++ ) {
		 if (navigator.plugins[i].name.indexOf("QuickTime") > -1) {
			hasQT = true;
		 }
	  }
	} else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	
		document.write('<script 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('      hasQT = True \n');
		document.write('   end if \n');
		document.write('end if \n');
		document.write('</script\> \n');
		
	}

	return hasQT;

}

function viewPanorama(p, t) {

	var u, f;
	
	u = '../images/case_studies/panorama.php?panorama=' + p + '&title=' + t;
	f = 'screenX=50,screenY=50,left=50,top=50,resizable=no,toolbar=no,status=no,location=no,scrollbars=no,width=400,height=216';

	MM_openBrWindow(u, '', f);

}
