// JavaScript Document

function pic_borders()
{
	for(i=0;i<7;i++)
	{
		try{
			document.getElementById("pic_"+i).style.borderColor = "#a0a690";
			}
		catch(e)
		{}	

	}	
}
function changepano(inValue) 
{
	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")
	{
		pic_borders();
		document.getElementById('ptviewer').newPanoFromList(parseInt(temp2[1]));
		document.getElementById("pic_"+parseInt(temp2[1])).style.borderColor = "#000";
		startpano();
	}
}

function stoppano() 
{
	document.getElementById("ptviewer").stopAutoPan();
}

function startpano() 
{
	document.getElementById("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="frame" value="http://www.rotography.com/images/vt-interface-2.gif"/><param name="preload" value="panoimages/1.jpg,panoimages/2.jpg,panoimages/3.jpg,panoimages/4.jpg,panoimages/5.jpg,panoimages/6.jpg,panoimages/7.jpg"/><param name="file"  value="panoimages/1.jpg"/><param name="pano0" value="{file=panoimages/1.jpg}"/><param name="pano1" value="{file=panoimages/2.jpg}"/><param name="pano2" value="{file=panoimages/3.jpg}"/><param name="pano3" value="{file=panoimages/4.jpg}"/><param name="pano4" value="{file=panoimages/5.jpg}"/><param name="pano5" value="{file=panoimages/6.jpg}"/><param name="pano6" value="{file=panoimages/7.jpg}"/><param name="frame"		value="http://www.rotography.com/images/vt-interface-2.gif"/><param name="wait"        value="http://www.rotography.com/images/vt-splash-image.jpg"/><param name="auto"	 value="0.1"/><param name="frame" value="http://www.rotography.com/images/vt-interface-2.gif"/><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.keartoncountryhotel.co.uk/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.keartoncountryhotel.co.uk/panoapplets/"/> <param name="java_codebase" value="http://www.keartoncountryhotel.co.uk/panoapplets"/>'+other_pano_info;
		
function show_hand(in_element)
{ 
	document.getElementById('pic_'+in_element).style.cursor ="pointer";
}
function hide_hand()
{
	
	document.body.style.cursor ="default";
}
function underline_show_hand(in_element)
{
	document.getElementById('link_'+in_element).style.textDecoration ="underline";
	document.getElementById('link_'+in_element).style.cursor ="pointer";
	
}
function hide_underline_hand(in_element)
{

	document.getElementById('link_'+in_element).style.textDecoration ="none";
	document.getElementById('link_'+in_element).style.cursor ="default";
}