
	function getElmById (_id) {
		var o;
		// Netscape N < 6
		if (document.layers) {
			return o = document.layers[_id];
		// MS IE < 5
		}else if (document.all) {
			return o = document.all[_id];
		// Firefox, Safari, ..
		}else if (document.getElementById(_id)) {
			return o = document.getElementById(_id);
		}
	}
	
	function setClassNameById (_id, _className) {
		if (o = getElmById (_id)) {
			o.className = _className;
		}
	}
	
	function setElmContentById (_id, _cont) {
		if (o = getElmById (_id)) {
			o.innerHTML = _cont;
		}
	}
	
	function setVisibilityById (_id, _stat) {
		if (o = getElmById (_id)) {
			if (!_stat) {
				if (o.style.display != 'none') {
					o.style.display = 'none';
				}else{
					o.style.display = '';
				}
			}else{
				o.style.display = _stat;
			}
			return o.style.display;
		}
	}
	
	function setColVisibility (_table_id, _col_id, _stat) {
		if (t = getElmById (_table_id)) {
			for (i=0; i < t.rows.length; i++) {
				if (t.rows[i].childNodes[_col_id].style.display != 'none') {
					t.rows[i].childNodes[_col_id].style.display = 'none';
				}else{
					t.rows[i].childNodes[_col_id].style.display = '';
				}
			}
		}
	}
	
	/** FUNCTION sendExternalMail
	 *	
	 *	@param		_prefix		(String)		my.name <- mail addi prefix, befor @
	 *	@param		_suffix		(String)		domain.com <- mail addi suffix, after @
	 *
	 *	return		Void
	 */
	function sendExternalMail (_prefix, _suffix) {
		if (_prefix && _suffix) {
			w = window.open('mailto:' + _prefix + '@' + _suffix);
			w.close();
		}
	}
	
	/** FUNCTION createElm
	 *
	 *	@param		_tag		(String)		tag name
	 *	@param		_cont		(String)		tag content
	 *	@param		_att		(Array)			array of tag attributs, Array([var1, val1],[var2, val2])
	 *
	 *	@return		Document 'element object', add it by using appendChild(result);
	 */
	function createElm (_tag, _cont, _att) {
		var t = document.createElement(_tag);
		var c = document.createTextNode(_cont);
		for (i=0; i < _att.length; i++) {
			var a = document.createAttribute(_att[i][0]);
			a.nodeValue = _att[i][1];
			t.setAttributeNode(a);
		}
		t.appendChild(c);
		return t;
	}
	
	function removeElmById (_id) {
		return o = getElmById (_id).parentNode.removeChild(getElmById (_id));
	}
	
	function removeTagElmByClass (_tag, _className) {
		for (i=0; i < document.getElementsByTagName(_tag).length; i++) {
			if(document.getElementsByTagName(_tag)[i].className == _className) {
				document.getElementsByTagName(_tag)[i].parentNode.removeChild(document.getElementsByTagName(_tag)[i]);
			}
		}
	}
	
	function addElmBefor (_next_id, _tag, _cont, _att) {
		var p = getElmById (_next_id).parentNode;
		var o = p.appendChild(createElm(_tag, _cont, _att));
		p.insertBefore(o, getElmById (_next_id));
	}
	
	function showBubble(bubbleId, _x, _y){
		if(bubbleId == 0){
			$("#bubble").fadeOut('fast');
		}else{
			document.getElementById("bubble").style.top  = _y + "px";
			document.getElementById("bubble").style.left = _x + "px";
			$("#bubble").fadeIn();
			
			if(bubbleId == 1){
					document.getElementById("bubbleHead").textContent = 'André Oswald';
					document.getElementById("bubbleUnderhead").textContent = 'Web- und Produktentwickler';
					document.getElementById("bubbleText").textContent = 'André ist das technisch- naturwissenschaftliche Kompetenzzentrum des Teams. Wenn alle anderen nicht mehr weiter wissen, wird er um Rat gefragt. Denn André hat auf die komplexesten Problem- stellungen Lösungen parat.';
					document.getElementById("bubbleFon").textContent = '0177 8648637';
			}
			if(bubbleId == 2){
					document.getElementById("bubbleHead").textContent = 'Steffen Klaue';
					document.getElementById("bubbleUnderhead").textContent = 'Konzepter und Designer';
					document.getElementById("bubbleText").textContent = 'Steffen ist das Allround- Talent des Teams. Durch sei- nen schier unerschöpflichen Tatendrang und robusten Op- timismus bringt er jedes Projekt nach vorn. Übrigens: In seiner Freizeit mal eben 160 km mit dem Rennrad abzu- fahren, ist eine seiner Lie- blingsbeschäftigungen.';
					document.getElementById("bubbleFon").textContent = '0177 8979692';
			}
			/*
					document.getElementById("bubbleHead").textContent = 'Steffen Fiedler';
					document.getElementById("bubbleUnderhead").textContent = 'Oberflaechen- und Produktdesigner';
					document.getElementById("bubbleText").textContent = 'Steffen ist für Interfaces und Benutzeroberflächen zu- ständig. Nächtelange Pro- grammiersessions machen ihn zu einem Kenner unseres Kaffeeautomaten. Sein Leit- satz: Gutes Design zeichnet sich durch Minimalismus und Usability aus.';
					document.getElementById("bubbleFon").textContent = '0177 5390063';
					break;
				case 4:
					document.getElementById("bubbleHead").textContent = 'Martin Seufert';
					document.getElementById("bubbleUnderhead").textContent = 'Software- und Datenbankentwickler';
					document.getElementById("bubbleText").textContent = 'Martin ist der ruhende Pol des Teams. Auch in der größten Hektik behält er einen kühlen Kopf. Seine Leidenschaft für anspruchs- volles Programmieren verwir- klicht er mit ausgefeilten Backends und Datenbanken.';
					document.getElementById("bubbleFon").textContent = '0177 8978600';
					break;
				case 5:
					document.getElementById("bubbleHead").textContent = 'Hans-Christian Psaar';
					document.getElementById("bubbleUnderhead").textContent = 'Konzepter';
					document.getElementById("bubbleText").textContent = 'Hans-Christian ist Diplom- Sozialwissenschaftler. Er ist für Recherche, Textar- beit  und Projektkoordination verantwortlich. Schwachstellen von Projekten aufzuspüren und damit die Produktqualität zu sichern, ist eine seiner Stärken.';
					document.getElementById("bubbleFon").textContent = '0151 59245996';
					break;
			*/
			if(bubbleId == 6){
					document.getElementById("bubbleHead").textContent = 'Matthias Ropel';
					document.getElementById("bubbleUnderhead").textContent = 'Screen- und Printdesigner';
					document.getElementById("bubbleText").textContent = 'Matthias ist ein erstklassi- ger Fotograf und versierter Designer. Das Web 2.0 ist sein Wohnzimmer. Er ist stetig auf der Suche nach neuen Herausforderungen und bringt durch seine unkonventionelle Art frischen Wind in das Team.';
					document.getElementById("bubbleFon").textContent = '0178 8634592';
			}
		
			document.getElementById("bubbleImg").src = 'img/faces/' + bubbleId + '.jpg';
		}
	}