﻿/**
 * @author sascha.leutner
 */

function hoverNavigation(point, action) {
	if (action == 'in') {
		point.className = 'hoverMenue';
	}
	else {
		point.className = 'menue';
	}
}

function hoverRubriken(point, action) {
	if (action == 'in') {
		point.className = 'hoverRubrik';
	}
	else {
		point.className = 'rubrik';
	}
}

function highlightMA(imgid, newpath) {
	document.getElementById(imgid).src = newpath;
}

function resetMA(imgid, newpath) {
	document.getElementById(imgid).src = newpath;
}

/* CHANGE TAGLINE SCRIPTING */

var text = new Array ();
text [0] = "Wir unterstützen Sie mit Lösungen für das Ideenmanagement, Konzepttests, Potenzialforschung, Pricing und Usability Ihrer Produkte und Dienstleistungen.";
text [1] = "Wir helfen Ihnen die richtigen Maßnahmen bei Kundenmanagement, Mitarbeiterzufriedenheit, interner wie externer Servicequalität und bei der Wettbewerbsbeobachtung zu finden.";
text [2] = "Sie wollen Ihre Kommunikationseffizienz optimieren, die modernen Kommunikationskanäle (Web 2.0 / Social Media) in Ihre Medienforschung integrieren, Marke, Ruf, Image oder auch Messeauftritte optimal steuern?  – Wir haben Antworten für Sie.";
text [3] = "Ob Online-, Telefon-, Multi-Mode-, Face-to-Face oder qualitative Befragung, ob Mystery Research, internationale Forschung, Online-Reportal oder multivariate Analyseverfahren: Wir setzen die optimalen Methoden für Sie ein.";

var weiter = 0;

function changeTagLine() {
	if (weiter != 5) {
		document.getElementById('explaintag').innerHTML = text[weiter];
		if (weiter == 0) {
			document.getElementById('innovationen').className = 'contenttagheader';
			document.getElementById('beziehungen').className = 'contenttagheaderinactive';
			document.getElementById('kommunikation').className = 'contenttagheaderinactive';
			document.getElementById('methoden').className = 'contenttagheaderinactive';
			document.getElementById('readmoreLink').href = 'themen.html';
			document.getElementById('tagimage').src = 'assets/idea.jpg';
		}
		else if (weiter == 1) {
			document.getElementById('innovationen').className = 'contenttagheaderinactive';
			document.getElementById('beziehungen').className = 'contenttagheader';
			document.getElementById('kommunikation').className = 'contenttagheaderinactive';
			document.getElementById('methoden').className = 'contenttagheaderinactive';
			document.getElementById('readmoreLink').href = 'themen.html';
			document.getElementById('tagimage').src = 'assets/relationship.jpg';
		}
		else if (weiter == 2) {
			document.getElementById('innovationen').className = 'contenttagheaderinactive';
			document.getElementById('beziehungen').className = 'contenttagheaderinactive';
			document.getElementById('kommunikation').className = 'contenttagheader';
			document.getElementById('methoden').className = 'contenttagheaderinactive';
			document.getElementById('readmoreLink').href = 'themen.html';
			document.getElementById('tagimage').src = 'assets/communication.jpg';
		}
		else if (weiter == 3) {
			document.getElementById('innovationen').className = 'contenttagheaderinactive';
			document.getElementById('beziehungen').className = 'contenttagheaderinactive';
			document.getElementById('kommunikation').className = 'contenttagheaderinactive';
			document.getElementById('methoden').className = 'contenttagheader';
			document.getElementById('readmoreLink').href = 'methoden.html';
			document.getElementById('tagimage').src = 'assets/methods.jpg';
		}
		weiter ++;
		if (weiter >= text.length) weiter = 0;
		setTimeout ("changeTagLine()", 10000);
	}	
}

function changeTagLineByClick(clickedElement) {
	if (clickedElement == 'innovationen') {
		document.getElementById('innovationen').className = 'contenttagheader';
		document.getElementById('beziehungen').className = 'contenttagheaderinactive';
		document.getElementById('kommunikation').className = 'contenttagheaderinactive';
		document.getElementById('methoden').className = 'contenttagheaderinactive';
		document.getElementById('explaintag').innerHTML = text[0];
		document.getElementById('tagimage').src = 'assets/idea.jpg';
		document.getElementById('readmoreLink').href = 'themen.html';
		weiter = 5;
	}
	else if (clickedElement == 'beziehungen') {
		document.getElementById('innovationen').className = 'contenttagheaderinactive';
		document.getElementById('beziehungen').className = 'contenttagheader';
		document.getElementById('kommunikation').className = 'contenttagheaderinactive';
		document.getElementById('methoden').className = 'contenttagheaderinactive';
		document.getElementById('explaintag').innerHTML = text[1];
		document.getElementById('tagimage').src = 'assets/relationship.jpg';
		document.getElementById('readmoreLink').href = 'themen.html';
		weiter = 5;
	}
	else if (clickedElement == 'kommunikation') {
		document.getElementById('innovationen').className = 'contenttagheaderinactive';
		document.getElementById('beziehungen').className = 'contenttagheaderinactive';
		document.getElementById('kommunikation').className = 'contenttagheader';
		document.getElementById('methoden').className = 'contenttagheaderinactive';
		document.getElementById('explaintag').innerHTML = text[2];
		document.getElementById('readmoreLink').href = 'themen.html';
		document.getElementById('tagimage').src = 'assets/communication.jpg';
		weiter = 5;
	}
	else if (clickedElement == 'methoden') {
		document.getElementById('innovationen').className = 'contenttagheaderinactive';
		document.getElementById('beziehungen').className = 'contenttagheaderinactive';
		document.getElementById('kommunikation').className = 'contenttagheaderinactive';
		document.getElementById('methoden').className = 'contenttagheader';
		document.getElementById('explaintag').innerHTML = text[3];
		document.getElementById('readmoreLink').href = 'methoden.html';
		document.getElementById('tagimage').src = 'assets/methods.jpg';
		weiter = 5;
	}
	
}

function changeContactButton() {
	if (document.getElementById('giveacall').className == 'giveacallBase') {
		document.getElementById('giveacall').className = 'giveacallOver';
	}
	else if (document.getElementById('giveacall').className == 'giveacallOver') {
		document.getElementById('giveacall').className = 'giveacallBase';
	}		
}

function openNewWindow(theurl) {
  var newWindow = window.open(theurl, "Zweitfenster", "width=600,height=500,left=300,top=200");
  newWindow.focus();
}




