// JavaScript Document

function para_borders()
{
	for(i=0;i<7;i++)
	{
		try{
			document.getElementById("paradiv"+i).style.borderColor = "white";
			}
		catch(e)
		{}
	}	
}
function changepano(inValue) 
{



	//var soundon=false;
	if(inValue!="")
	{
		var temp = inValue;
	}
	else
	{

		var elementid = document.getElementById("choice");
		var temp = elementid[elementid.selectedIndex].value;
	}
	var temp2 = temp.split("#");
	if (temp2[0] == "pano")
	{ 
		para_borders();
document.getElementById("ptviewer").newPanoFromList(parseInt(temp2[1]));

//		document.ptviewer.newPanoFromList(parseInt(temp2[1]));
		document.getElementById("panodiv").style.visibility = "visible";
		document.getElementById("paradiv"+temp2[2]).style.borderColor = "black";
		startpano();
		close_help();
	}

	
}

function stoppano() 
{
	document.ptviewer.stopAutoPan();
}

function startpano() 
{
	document.ptviewer.startAutoPan( 0.2, 0.0, 1.0 );
}

function still_visible() 
{
	document.getElementById("stilldiv").style.visibility = "visible";
	document.getElementById("panodiv").style.visibility = "hidden";
}

function pano_visible() 
{
	
	document.getElementById("stilldiv").style.visibility = "hidden";
	document.getElementById("panodiv").style.visibility = "visible";
	
}
function show_help()
{
	stoppano();
	document.getElementById('help_div').style.visibility = "visible";
	document.getElementById('help_div').style.top="0px";
	document.getElementById('help_div').style.left="0px";
	document.getElementById('help_div').style.zIndex = 1;
}
function close_help()
{
	document.getElementById('help_div').style.visibility = "hidden";
	startpano();
}		






	other_pano_info='<param name="preload" value="http://www.rotography.com/towerhouse/ytb1004_1.jpg,http://www.rotography.com/towerhouse/ytb1004_2.jpg,http://www.rotography.com/towerhouse/ytb1004_4.jpg,http://www.rotography.com/towerhouse/ytb1004_5.jpg,http://www.rotography.com/towerhouse/ytb1004_6.jpg,http://www.rotography.com/towerhouse/ytb1004_7.jpg"/><param name="file"  value="http://www.rotography.com/towerhouse/ytb1004_1.jpg"/><param name="pano0" value="{file=http://www.rotography.com/towerhouse/ytb1004_1.jpg}"/><param name="pano1" value="{file=http://www.rotography.com/towerhouse/ytb1004_2.jpg}"/><param name="pano2" value="{file=http://www.rotography.com/towerhouse/ytb1004_4.jpg}"/><param name="pano3" value="{file=http://www.rotography.com/towerhouse/ytb1004_5.jpg}"/><param name="pano4" value="{file=http://www.rotography.com/towerhouse/ytb1004_6.jpg}"/><param name="pano5" value="{file=http://www.rotography.com/towerhouse/ytb1004_7.jpg}"/><param name="frame"		value=""/><param name="wait"        value="http://www.rotography.com/sample/towerhouse/virtual_tour/splash-pg.jpg"/><param name="auto"	 value="0.1"/><span id="java">You need a Java-enabled browser to see this. Download <a href = "http://www.java.com/en/download/index.jsp"> Java</a></span></object> ';
	var pano_code=' <object height="240px" width="320px" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"  codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4_0-win.cab" id="ptviewer"> <param name="code" value="ptviewer.class" /><param name="codebase" value="http://www.rotography.com/panoapplets/"/>'+ other_pano_info;
	var other_browser_pano_code='<object classid="java:ptviewer.class" type="application/x-java-applet" height="240px" width="320px" id="ptviewer" name="ptviewer"><param name="codebase" value="http://www.rotography.com/panoapplets"/> <param name="java_codebase" value="http://www.rotography.com/panoapplets/"/>'+other_pano_info;
	var dropdown = '<form id="panoform" action="" method="post"><div><label for="choice"></label><select   name="choice" id="choice" onchange="changepano('+"'"+"'"+')"  onfocus="stoppano()" onblur="startpano()" title="Rotograph selection listing"><option value="pano#0#0">Dining Room</option><option value="pano#1#1">Priory Room</option> <option value="pano#2#2">Cromwell Suite</option> <option value="pano#3#2">Cromwell Ensuite</option><option value="pano#4#3">Waddington Room Acc</option> <option value="pano#5#3">Accessibility Ensuite</option> </select><span id="question"><a href="help.html" onclick = "show_help();return false" rel="external">?</a></span></div> </form>';
		
