function DoAutorotationStart() {
        document.ptPanoVenster.startAutoPan( 0.5, 0.0, 1.0 );
}
function DoAutorotationStop() {
        document.ptPanoVenster.stopAutoPan();
}
function DoZoomIn() {
	document.ptPanoVenster.startAutoPan( 0.0, 0.0, 1.0/1.03 );
}
function DoZoomOut() {
	document.ptPanoVenster.startAutoPan( 0.0, 0.0, 1.03 );
}
function DoShowHideHotspots() {
	document.ptPanoVenster.toggleHS();
}
function DoReset() {
	document.ptPanoVenster.gotoView( -220, 0, 89 );
}
function DisplayPan() {
	status = document.ptPanoVenster.pan().toString() ;
}
function DisplayTilt() {
	status = document.ptPanoVenster.tilt().toString() ;
}
function DisplayFov() {
	status = document.ptPanoVenster.fov().toString() ;
}
function newPano(n) {
	m=document.ptPanoVenster.getPanoNumber();
    if(m==-1)
	m=0;
	document.ptCompassMap.stopApplet(m);
	document.ptPanoVenster.newPanoFromList(n);
}
function newApplet(n) {
	document.ptCompassMap.startApplet(n);
}


	  function OpenPopup(theURL,PopupName,PopupWidth,PopupHeight,PopupFeatures)
	    {
    	var Xcoor;
	    var Ycoor;
		var Popup;
		var FeaturesTotal;
		if (PopupHeight && PopupWidth)
			{
			if (window.screen.width > PopupWidth)
				Xcoor = (window.screen.width/2) - (PopupWidth/2);
			else
				Xcoor = 0;
		    if (window.screen.height > PopupHeight)
				Ycoor = (window.screen.height/2) - (PopupHeight/2);
			else
				Ycoor = 0;
			if (PopupFeatures)
				FeaturesTotal = PopupFeatures + ",width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
			else
				FeaturesTotal = "width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
			Popup = window.open(theURL,PopupName,FeaturesTotal);
			Popup.focus;
			}
		else
			{
			Popup = window.open(theURL,PopupName);
			Popup.focus;
			}
		}

function open3D(sFile)
{
	OpenPopup("/virtual_tour/"+ sFile,"pano",400,400)
}
