// JavaScript Document//Revised 14 April 2005, including path to expected location of CSS filefunction getStyleObject(objectId) {	// cross-browser function to get an object's style object given its id	if(document.getElementById && document.getElementById(objectId)) {	// W3C DOM	return document.getElementById(objectId).style;	} else if (document.all && document.all(objectId)) {	// MSIE 4 DOM	return document.all(objectId).style;	} else if (document.layers && document.layers[objectId]) {	// NN 4 DOM.. note: this won't find nested layers	return document.layers[objectId];	} else {	return false;	}} // getStyleObjectfunction chooseStyle(newstyle) {	var expdate = new Date();	setCookie("corvidaetext",newstyle,28);	window.location.reload();}function writeStyle() {//This part checks whether there is currently a corvidaetext cookie. If not, it creates one and sets it to show interactive text.	if(document.cookie.indexOf('corvidaetext') == -1) {	setCookie("corvidaetext","corvidaeIntText",28);	}//This part checks whether the cookie is set to corvidaeIntText, and if so writes in the link to the interactive_on_new.css style sheet.// IMPORTANT: The path to the style sheet below will need to be altered to reflect the location of the style sheet in the site's folder structure. It is relative to the HTML document in which the function is used, not to this JS file.	if(document.cookie.indexOf('corvidaeIntText') >= 0)		document.write('<link rel="stylesheet" type="text/css" href="/virtualtours/homewood/css/interactive_on_new.css" media="screen" \/>');		window.currentlyVisiblePopup = 'Panel0';}function writeAllLink() {	if(!document.layers) {		if(document.cookie.indexOf('corvidaeAllText') != -1) {			document.write('<a href="javascript:chooseStyle(\'corvidaeIntText\');" accesskey="9" class="displayswitch">Show interactive text<\/a><br>');		}		if(document.cookie.indexOf('corvidaeIntText') != -1) {			document.write('<a href="javascript:showPanel(\'Panel0\',\'\');" class="displayswitch">Show room introduction<\/a> | <a href="javascript:chooseStyle(\'corvidaeAllText\');" accesskey="9" class="displayswitch">Show all text<\/a><br>');		}	}}function setQTVar() {	if(!document.layers) {		if(document.cookie.indexOf('corvidaeAllText') != -1) {			document.panorama.SetSpriteTrackVariable(5,123,0);			}		else {			document.panorama.SetSpriteTrackVariable(5,123,1);		}	}}function jumpPan(theAngle) {			document.panorama.SetPanAngle(theAngle);}function setCookie(name,value,days){	if (days)	{		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = "; expires="+date.toGMTString();	}	else var expires = "";	document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name){	var nameEQ = name + "=";	var ca = document.cookie.split(';');	for(var i=0;i < ca.length;i++)	{		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length);		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);	}	return null;}function eraseCookie(name){	createCookie(name,"",-1);}function showIntro(theItem) {//This checks whether the corvidaeText cookie is set to corvidaeIntText: if it is, it sets the display property of the layer specified by theItem to 'block', i.e. it makes it visible. It also sets a global variable saying that this is the currently visible item, so that it can be hidden when another one is shown.	if(document.cookie.indexOf('corvidaeIntText') >= 0) {	getStyleObject(theItem).display='block';	window.currentlyVisiblePopup = theItem;	}}function showPanel(theItem, theAnchor) {	if(document.cookie.indexOf('corvidaeIntText') >= 0) {		getStyleObject(window.currentlyVisiblePopup).display='none';		getStyleObject(theItem).display='block';		window.currentlyVisiblePopup = theItem;	}	else if(theAnchor) window.location=theAnchor;}function tempShowPanel(theItem) {	if(document.cookie.indexOf('corvidaeIntText') >= 0) {		getStyleObject(window.currentlyVisiblePopup).display='none';		getStyleObject(theItem).display='block';	}}function tempHidePanel(theItem) {	if(document.cookie.indexOf('corvidaeIntText') >= 0) {		getStyleObject(theItem).display='none';		getStyleObject(window.currentlyVisiblePopup).display='block';	}}