document.write('<div id="links"></div>');
document.write('<a href="javascript: return false;" id="pan_left" onmouseover="movePanoramaPermanently(\'left\');" onmouseout="stopMoving()"><img src="upload/website/a_panorama_left.gif" alt="nach links" width="18" height="120" /></a>');
document.write('<a href="javascript: return false;" id="pan_right" onmouseover="movePanoramaPermanently(\'right\');" onmouseout="stopMoving()"><img src="upload/website/a_panorama_right.gif" alt="nach rechts" width="18" height="98" /></a>');

var panorama = document.getElementById('panorama');
var step_x = 5;
//var img_width = 809;
var start_x = panorama.style.left;
start_x = Math.round(start_x.replace(/px/, ""));

function movePanorama(pos) {
	var actual_x = panorama.style.left;
	actual_x = Math.round(actual_x.replace(/px/, ""));

	if (pos == 'left') {
		if ((actual_x - step_x) >= start_x * 2) {
			actual_x -= step_x;
			
		}
	}
	else {
		if ((actual_x + step_x) <= 0) {
			actual_x += step_x;
		}
	}
	panorama.style.left =  actual_x + 'px';
}

var interval;
var active = false;
function movePanoramaPermanently(pos) {
	if (!active) {
		active = true;
		interval = window.setInterval("movePanorama('"+pos+"')", 50);
	}
}

function stopMoving() {
	active = false;
	clearInterval(interval);
}