// JavaScript Document
/*
* Specified animation methods for http://www.gesundheitspiazza.eu/
* By: t.scherrer consulting
* Version: 1.0.1
* Updated: January 29th, 2011
*/

// properties
var currentInfoBox = 0;

var headerTextGP5 = '<h2>Gesundheits<br>Piazza<br>'
	+ '<span class="beige">Bodensee<br>5</span></h2>'
	+ '<p class="beige">'
	+ '26. - 27. April 2012<br>Festspielhaus Bregenz'
	+ '</p>';
var headerTextAnmeldung = '<h1>Am Marktplatz</h1>'
	+ '<h2>Gesundheits Piazza Bodensee</h2>'
	+ '<p>'
	+ '31. März / 01. April 2011<br>Festspielhaus Bregenz<br>'
	+ '<a title="Anmeldung - Gesundheits Piazza" target= "_blank" href="http://vorarlberg.nethotels.com/cpv/gesundheitspiazza_2011">Anmeldung zum Kongress</a>'
	+ '<br>'
	+ '<a title="Hotelbuchung - Gesundheits Piazza"  target= "_blank" href="http://www.vorarlberg.nethotels.com/gesundheitspiazza11/search.htm?Rekursiv=Y">Hotelbuchung</a>'
	+ '</p>';	
var headerText1 = '<h1>Lebendigkeit<br>am Marktplatz</h1>'
	+ '<h2>Leben und Erleben</h2>'
	+ '<p>Wir erweitern den Blickwinkel, damit uns das Leben den Weg weist. So kann unsere Orientierung wachsen.</p>';
var headerText2 = '<h1>Ein Markt f&uuml;r<br>Offenheit</h1>'
	+ '<h2>Lernen am unmittel-<br>baren Kontakt.</h2>'
	+ '<p>Wir interessieren uns am Austausch, weil uns das Zuh&ouml;ren lernen l&auml;sst. Unsere Visionen entstehen im Gespr&auml;ch.</p>';
var headerText3 = '<h1>Teilnehmer als<br>Experten</h1>'
	+ '<h2>Aufeinander zugehen</h2>'
	+ '<p>Wir sind auf demselben Weg, weil wir uns unserer Hintergr&uuml;nde bewusst sind. Hier k&ouml;nnen wir unser Wissen zusammentragen.</b></p>';
var headerText4 = '<h1>Treffpunkt Marktplatz</h1>'
	+ '<h2>Austausch f&uuml;r<br>Gesundheit</h2>'
	+ '<p>Wir kommen zusammen. Ein gemeinsamer Ort macht uns zu einem Team; &uuml;ber diesen Ort hinaus!</p>';
var headerTextArray = new Array(headerTextGP5, headerTextAnmeldung, headerText1, headerText2, headerText3, headerText4);

// methods
function prevInfoBox() {
	// decrease count
    currentInfoBox--;
    // check last item --> loop items
    if(currentInfoBox < 0) currentInfoBox = 5;
	// display current html
    document.getElementById('header-info-content-text').innerHTML = headerTextArray[currentInfoBox];
}

function nextInfoBox() {
	// increase count
    currentInfoBox++;
	// check last item --> loop items
    if(currentInfoBox > 5) currentInfoBox = 0;
    // display current html
    document.getElementById('header-info-content-text').innerHTML = headerTextArray[currentInfoBox];
}

function loadInfoBox(index) {
	var loadBoxIndex = 0;
	// check index
	if(index >= 0 && index <= 5) loadBoxIndex = index;
	else if (index < 0) loadBoxIndex = 5;
	else if (index > 5) loadBoxIndex = 0;
	else loadBoxIndex = 0;
	// display current html
    document.getElementById('header-info-content-text').innerHTML = headerTextArray[loadBoxIndex];
}

function openGPWoerterbuch() {
  	newwindow=window.open('index.php?id=19','Gesundheits Piazza Wörterbuch','height=750,width=1024,resizable=yes,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}
