//<script LANGUAGE=javascript>
//<!--
// array of objects to point at layers to be positioned in page;
var arrLayers = new Array();

var offTop = 0;
var offLeft = 0;
// the width of the "table" in pixels which requires centering
var iContentWidth = 760;

function fnLoadResizeLoop() {
	var offsetRight = 0;
	if(is.ie4 || is.ie5 || is.ie6) {
		offLeft = ((document.body.clientWidth - iContentWidth) / 2);
	}
	if(is.ns4 || is.op6up) {
		offsetRight = -8;
		offLeft = ((innerWidth - iContentWidth) / 2);
	}
	if(is.ns6) {
		// work out if the scroll bars exist, and if so adjust the menu
		window.scrollTo(0, 1)
		var yScroll = window.scrollY;
		window.scrollTo(0, 0)
		offsetRight = 0;
		if(yScroll > 0)
			offsetRight = 6;
		offLeft = ((innerWidth - iContentWidth) / 2);
	}
}

function fnLayerObj(name, x, y, visib) {
	this.name = name;
	this.x = x;
	this.y = y;
	this.visib = visib;
}

// bChangeVisible will state whether or not the objects are set to their default visibility.
// this prevents the page being reset on resize if the layers have been changed by
// user input (e.g. the slide shows)
function fnPlaceAllLayers(bChangeVisible) {
	if(arrLayers.length > 0) {
		fnLoadResizeLoop();
		for(var i = 0; i < arrLayers.length; i ++) {
			var o = fnGetObj(arrLayers[i].name);
			o.top = arrLayers[i].y + offTop;
			o.left = arrLayers[i].x + offLeft;
			if(bChangeVisible) o.visibility = arrLayers[i].visib;
		}
	}
}

function fnShowFlash(id) {
	if(is.ns6 || is.op5) {
		var o = fnGetObj(id);
		o.visibility = 'visible';
	}
}

function fnVirtualTourAlt() {
	window.open('vt.htm', 'vt', 'width=390,height=290,top=5,left=5');
}

function fnWriteJava() {
	var s = '';
	var o = document;
	if(is.ns4/*|| is.ie5*/) {
		s = '<A href="javascript:void(0)" onclick="fnVirtualTourAlt()">Launch Virtual Tour</A>';
		s += '<SCRIPT>\nwindow.onload = function () { fnShowFlash(\'flashSlider\'); fnPlaceAllLayers(true); fnFlaEnlargeImg(1, \'landmarkofficespace\'); }\nsetTimeout(\'fnVirtualTourAlt();\', 500);\n</script>'
		if(is.ns4) {
			o = document.lyrVT.document;
			o.write(s);
			o.close();
		}
 		/*if(is.ie5) {
 			o.write(s);
 			o.close();
 		}*/
	} else {
		 s += '<APPLET archive="vista3dF.jar" name="vista3dF" code="DVistaViewer.class" codebase="./vt" width="382" height="286" align=center>'
			+ '<PARAM NAME="Mark Code" VALUE="49100002">'
			+ '<PARAM NAME="Skin URL" VALUE="skins/ClassicFusion.ski">'
			+ '<PARAM NAME="Skin Images URL" VALUE="skins/ClassicFusion/">'
			+ '<PARAM NAME="DAT URL" VALUE="panoramas/introductionamended236.dat">'
			+ '<PARAM NAME="Panoramas URL" VALUE="panoramas/">'
			+ '<PARAM NAME="Audio URL" VALUE="sounds/">'
			+ '<PARAM NAME="Hot Spot Target Color" VALUE="(255,0,0)">'
			+ '<PARAM NAME="Load All Panoramas" VALUE="NO">'
			+ '<PARAM NAME="Initial Panorama" VALUE="0">'
			+ '<PARAM NAME="Frame Rate" VALUE="38.0">'
			+ '<PARAM NAME="Shift Pixels X" VALUE="1">'
			+ '<PARAM NAME="Shift Pixels Y" VALUE="1">'
			+ '<PARAM NAME="Maximum Shift Pixels X" VALUE="10">'
			+ '<PARAM NAME="Maximum Shift Pixels Y" VALUE="10">'
			+ '<PARAM NAME="Play On Start"  VALUE="YES">'
			+ '<PARAM NAME="Initial Move Sense" VALUE="RIGHT">'
			+ '<PARAM NAME="Visible Hot Spot" VALUE="NO">'
			+ '</APPLET>'
 		if(is.ie4/* || is.ie5*/) {
 			document.all.lyrVT.innerHTML = s;
 		} else {
 			o.write(s);
 			o.close();
 		}
		
	}
}

////-->
//</SCRIPT>
