function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openTourPopup () {
		document.getElementById('tourPopup').style.display = 'block';
}
function closeTour() {
	document.getElementById('tourPopup').style.display = 'none';
}
function changeTour(tourId,flash){

	tourData = new Array();
	
	tourData[0] = new Object();
	tourData[0]['filename'] = 'alte_kirche.mov';
	tourData[0]['filename_swf'] = 'alte-kirche.swf';
	tourData[0]['headline'] = 'Alte Kirche';
	tourData[0]['description'] = 'Festliches Ambiente für Kongresse und Tagungen bis 100 Personen oder Vorträge bis 160 Personen. Für die musikalische Untermalung stehen eine Orgel sowie ein Fazioli Flügel zur Verfügung.';
	
	tourData[1] = new Object();
	tourData[1]['filename'] = 'refektorium.mov';
	tourData[1]['filename_swf'] = 'refektorium.swf';
	tourData[1]['headline'] = 'Refektorium 1';
	tourData[1]['description'] = 'Der historische, festliche Speisesaal mit großer Terrasse bietet bis zu 120 Personen Platz.';
	
	tourData[2] = new Object();
	tourData[2]['filename'] = 'entree.mov';
	tourData[2]['filename_swf'] = 'vestibuel.swf';
	tourData[2]['headline'] = 'Vestibül';
	tourData[2]['description'] = '';

	tourData[3] = new Object();
	tourData[3]['filename'] = 'bistro.mov';
	tourData[3]['filename_swf'] = 'leos-bistro.swf';
	tourData[3]['headline'] = 'Bistro';
	tourData[3]['description'] = '80 Sitzplätze, eine Bar und eine große Terrasse sorgen für mediterranes Flair.';

	tourData[4] = new Object();
	tourData[4]['filename'] = 'empfang.mov';
	tourData[4]['filename_swf'] = 'empfang-foyer.swf';
	tourData[4]['headline'] = 'Foyer/Empfang';
	tourData[4]['description'] = '';

	tourData[5] = new Object();
	tourData[5]['filename'] = 'weinkeller.mov';
	tourData[5]['filename_swf'] = 'weinkeller.swf';
	tourData[5]['headline'] = 'Weinstube';
	tourData[5]['description'] = 'Der rustikale Ort für private Feiern, Weinproben und kleinere Tagungen bis zu 30 Personen.';

	tourData[6] = new Object();
	tourData[6]['filename'] = 'atrium.mov';
	tourData[6]['filename_swf'] = 'atrium.swf';
	tourData[6]['headline'] = 'Atrium';
	tourData[6]['description'] = 'Selbstverständlich verfügt unser Haus über modernste Tagungs- und Medientechnik, alle öffentlichen Räume sind mit Internetzugang per WLAN ausgestattet.';

	tourData[7] = new Object();
	tourData[7]['filename'] = 'kapitelsaal.mov';
	tourData[7]['filename_swf'] = 'kapitelsaal.swf';
	tourData[7]['headline'] = 'Kapitelsaal';
	tourData[7]['description'] = 'Der ehrwürdige Sitzungssaal für Tagungen, Kongresse und Vorträge bis zu 35 Personen. Selbstverständlich verfügt unser Haus über modernste Tagungs- und Medientechnik, alle öffentlichen Räume sind mit Internetzugang per WLAN ausgestattet.';

	tourData[8] = new Object();
	tourData[8]['filename'] = 'bibliothek.mov';
	tourData[8]['filename_swf'] = 'bibliothek.swf';
	tourData[8]['headline'] = 'Bibliothek';
	tourData[8]['description'] = 'Intellektuelles Ambiente für Tagungen und Kongresse für bis zu 12 Personen. Selbstverständlich verfügt unser Haus über modernste Tagungs- und Medientechnik, alle öffentlichen Räume sind mit Internetzugang per WLAN ausgestattet.';

	tourData[9] = new Object();
	tourData[9]['filename'] = 'superior.mov';
	tourData[9]['filename_swf'] = 'superior-zimmer.swf';
	tourData[9]['headline'] = 'Superior Zimmer';
	tourData[9]['description'] = 'Es stehen 90 Zimmer in den Kategorien Standard, Superior, Junior Suite und Boarding zur Verfügung. Alle Zimmer und Appartements verfügen über Durchwahltelefon und Internetzugang per WLAN.';

	tourData[10] = new Object();
	tourData[10]['filename'] = 'standard.mov';
	tourData[10]['filename_swf'] = 'standard-zimmer.swf';
	tourData[10]['headline'] = 'Standard Zimmer';
	tourData[10]['description'] = 'Es stehen 90 Zimmer in den Kategorien Standard, Superior, Junior Suite und Boarding zur Verfügung. Alle Zimmer und Appartements verfügen über Durchwahltelefon und Internetzugang per WLAN.';

	tourData[11] = new Object();
	tourData[11]['filename'] = 'hofgarten.mov';
	tourData[11]['filename_swf'] = 'hofgarten.swf';
	tourData[11]['headline'] = 'Hofgarten';
	tourData[11]['description'] = 'Selbstverständlich verfügt unser Haus über modernste Tagungs- und Medientechnik, alle öffentlichen Räume sind mit Internetzugang per WLAN ausgestattet.';

	tourData[12] = new Object();
	tourData[12]['filename'] = 'wellness.mov';
	tourData[12]['filename_swf'] = 'wellness.swf';
	tourData[12]['headline'] = 'Wellness';
	tourData[12]['description'] = 'Ein großzügiges Schwimmbad mit Sauna und eine Physiotherapie (Massagen auf Anfrage) machen den Aufenthalt im Hotel Collegium Leoninum besonders angenehm und entspannend.';	

	tourData[13] = new Object();
	tourData[13]['filename'] = 'refektorium2.mov';
	tourData[13]['filename_swf'] = 'refektorium2.swf';
	tourData[13]['headline'] = 'Refektorium 2';
	tourData[13]['description'] = 'Der historische, festliche Speisesaal mit großer Terrasse bietet bis zu 120 Personen Platz.';

	if (flash) {
		document.getElementById('tour').innerHTML = '<object type="application/x-shockwave-flash" width="443" height="280" data="media/'+tourData[tourId]['filename_swf']+'"><param name="movie" value="media/'+tourData[tourId]['filename_swf']+'" /></object>';
	} else {
		document.getElementById('tour').innerHTML = '<embed src="media/'+tourData[tourId]['filename']+'" name="tour" align="middle" border="0" width="443" height="280" autoplay="1" controller="1" loop="false" nojava="true" showlogo="false"></embed>';
	};
	document.getElementById('tourDescription').getElementsByTagName("h2")[0].innerHTML = tourData[tourId]['headline'];
	document.getElementById('tourDescription').getElementsByTagName("p")[0].innerHTML = tourData[tourId]['description'];
}

function changeTourEn(tourId,flash){

	tourData = new Array();
	
	tourData[0] = new Object();
	tourData[0]['filename'] = 'alte_kirche.mov';
	tourData[0]['filename_swf'] = 'alte-kirche.swf';
	tourData[0]['headline'] = 'The Old Church';
	tourData[0]['description'] = 'Festive ambience for congreses and conferences up to 100 people or lectures for 160  people. The organ and a Fazioli piano can be used for musical entertainment.';
	
	tourData[1] = new Object();
	tourData[1]['filename'] = 'refektorium.mov';
	tourData[1]['filename_swf'] = 'refektorium.swf';
	tourData[1]['headline'] = 'The Refectory 1';
	tourData[1]['description'] = 'The historical and festive dining room takes up to 120 guests. It also offers a big terrace.';
	
	tourData[2] = new Object();
	tourData[2]['filename'] = 'entree.mov';
	tourData[2]['filename_swf'] = 'vestibuel.swf';
	tourData[2]['headline'] = 'Vestibule';
	tourData[2]['description'] = '';

	tourData[3] = new Object();
	tourData[3]['filename'] = 'bistro.mov';
	tourData[3]['filename_swf'] = 'leos-bistro.swf';
	tourData[3]['headline'] = 'Leo’s Bisto';
	tourData[3]['description'] = 'The bar, the terrace and tables for up to 80 guests offer mediterranian flair.';

	tourData[4] = new Object();
	tourData[4]['filename'] = 'empfang.mov';
	tourData[4]['filename_swf'] = 'empfang-foyer.swf';
	tourData[4]['headline'] = 'Reception hall';
	tourData[4]['description'] = '';

	tourData[5] = new Object();
	tourData[5]['filename'] = 'weinkeller.mov';
	tourData[5]['filename_swf'] = 'weinkeller.swf';
	tourData[5]['headline'] = 'The  Wine Bar';
	tourData[5]['description'] = 'The rustic place for private celebrations, wine tastings and smaller conferences up to 30 people';

	tourData[6] = new Object();
	tourData[6]['filename'] = 'atrium.mov';
	tourData[6]['filename_swf'] = 'atrium.swf';
	tourData[6]['headline'] = 'The Atrium';
	tourData[6]['description'] = 'Of course, our house offers the most modern congress- and media equipment. All public  rooms provide WLAN access to the internet.';

	tourData[7] = new Object();
	tourData[7]['filename'] = 'kapitelsaal.mov';
	tourData[7]['filename_swf'] = 'kapitelsaal.swf';
	tourData[7]['headline'] = 'The Chapter';
	tourData[7]['description'] = 'The vererable place for congreses and conferences up to 35 guests. The most modern congress- and media equipment is provided. All public  rooms provide WLAN access to the internet.';

	tourData[8] = new Object();
	tourData[8]['filename'] = 'bibliothek.mov';
	tourData[8]['filename_swf'] = 'bibliothek.swf';
	tourData[8]['headline'] = 'The Library';
	tourData[8]['description'] = 'Our intellectual place for congreses and conferences up to 12 participants. The most modern congress- and media equipment is provided. All public  rooms provide WLAN access to the internet.';

	tourData[9] = new Object();
	tourData[9]['filename'] = 'superior.mov';
	tourData[9]['filename_swf'] = 'superior-zimmer.swf';
	tourData[9]['headline'] = 'Superior Rooms';
	tourData[9]['description'] = 'We offer 90 rooms in the category of Standard, Superior, Junior Suite and Boarding. Telephone and internet access (WLAN) are at our guest’s disposal.';

	tourData[10] = new Object();
	tourData[10]['filename'] = 'standard.mov';
	tourData[10]['filename_swf'] = 'standard-zimmer.swf';
	tourData[10]['headline'] = 'Standard Rooms';
	tourData[10]['description'] = 'We offer 90 rooms in the category of Standard, Superior, Junior Suite and Boarding. Telephone and internet access (WLAN) are at our guest’s disposal.';

	tourData[11] = new Object();
	tourData[11]['filename'] = 'hofgarten.mov';
	tourData[11]['filename_swf'] = 'hofgarten.swf';
	tourData[11]['headline'] = 'The Courtyard';
	tourData[11]['description'] = 'The most modern congress- and media equipment is at your disposal. All public  rooms provide WLAN access to the internet.';

	tourData[12] = new Object();
	tourData[12]['filename'] = 'wellness.mov';
	tourData[12]['filename_swf'] = 'wellness.swf';
	tourData[12]['headline'] = 'Wellness';
	tourData[12]['description'] = 'Our spacious swimming pool, the sauna and physiotherapy (massages on appointment) will make your stay at the Collegium Leoninum particularly pleasant and relaxing.';	

	tourData[13] = new Object();
	tourData[13]['filename'] = 'refektorium2.mov';
	tourData[13]['filename_swf'] = 'refektorium2.swf';
	tourData[13]['headline'] = 'The Refectory 2';
	tourData[13]['description'] = 'The historical and festive dining room takes up to 120 guests. It also offers a big terrace.';

	if (flash) {
		document.getElementById('tour').innerHTML = '<object type="application/x-shockwave-flash" width="443" height="280" data="media/'+tourData[tourId]['filename_swf']+'"><param name="movie" value="media/'+tourData[tourId]['filename_swf']+'" /></object>';
	} else {
		document.getElementById('tour').innerHTML = '<embed src="media/'+tourData[tourId]['filename']+'" name="tour" align="middle" border="0" width="443" height="280" autoplay="1" controller="1" loop="false" nojava="true" showlogo="false"></embed>';
	};
	document.getElementById('tourDescription').getElementsByTagName("h2")[0].innerHTML = tourData[tourId]['headline'];
	document.getElementById('tourDescription').getElementsByTagName("p")[0].innerHTML = tourData[tourId]['description'];
}

slideEffect = false;
openSubMenu = '';

function showMainNavi(id){
	if(id!=openSubMenu && openSubMenu!=''){
		Effect.BlindUp(openSubMenu);
		slideEffect = false;
	}
	if(slideEffect==false){
		Effect.BlindDown(id);
		slideEffect = true;
		openSubMenu = id;
	}
}

function initScroll(){
	activePage = 1;
	animationReady = true;
	pages = document.getElementsByClassName('scrollPage').length;
	pageWidth = document.getElementsByClassName('scrollPage')[0].getWidth();
	scrollBoxWidth = pages*pageWidth;
	$('scrollBox').setStyle({'width':scrollBoxWidth+'px'});
	if(pages<2){
		//$('scrollNavigation').setStyle({'visibility':'hidden'});
		$('scrollNavigation').setStyle({'visibility':'visible'});
		$('scrollNavigation').innerHTML = '<img src="img/arrow_left_passiv.gif" alt="zur&uuml;ck" border="0" /> <img src="img/arrow_right_passiv.gif" alt="vor" border="0" />';
	}
	else {
		$('scrollNavigation').setStyle({'visibility':'visible'});
		$('scrollNavigation').innerHTML = '<a href="javascript:scrollAnimation(1);"><img src="img/arrow_left_passiv.gif" alt="zur&uuml;ck" border="0" /></a> <a href="javascript:scrollAnimation(2);"><img src="img/arrow_right.gif" alt="vor" border="0" /></a>';
	}
}

function scrollAnimation(direction) {
	if(direction==1) {
		if(activePage>1 && animationReady==true){
			activePage--;
			animationReady = false;
			new Effect.Move ('scrollBox',{ x: pageWidth, y: 0, mode: 'relative', afterFinish: allowAnimation});
		}
	}
	if(direction==2 && animationReady==true) {
		if(activePage<pages){
			activePage++;
			animationReady = false;
			new Effect.Move ('scrollBox',{ x: -pageWidth, y: 0, mode: 'relative', afterFinish: allowAnimation});
		}
	}	
}

function allowAnimation() {
	animationReady = true;
	if(activePage==1) {
		$('scrollNavigation').innerHTML = '<img src="img/arrow_left_passiv.gif" alt="zur&uuml;ck" border="0" /> <a href="javascript:scrollAnimation(2);"><img src="img/arrow_right.gif" alt="vor" border="0" /></a>';
	}
	else if(activePage==pages) {
		$('scrollNavigation').innerHTML = '<a href="javascript:scrollAnimation(1);"><img src="img/arrow_left.gif" alt="zur&uuml;ck" border="0" /></a> <img src="img/arrow_right_passiv.gif" alt="vor" border="0" />';
	}
	else {
		$('scrollNavigation').innerHTML = '<a href="javascript:scrollAnimation(1);"><img src="img/arrow_left.gif" alt="zur&uuml;ck" border="0" /></a> <a href="javascript:scrollAnimation(2);"><img src="img/arrow_right.gif" alt="vor" border="0" /></a>';
	}
}