/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
behaviours.js / swebs.ch
inits needed start functions
*/


/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Suchfeld initialisieren
*/
function initSearchFields () {
	// Stichwortsuche rechts oben: Themen
	var lang_searchfield = 'Stichwort(e) eingeben';
	var field1 = document.getElementById('inpShortSearch');
	if (field1) {
		if (field1.value == '') field1.value = lang_searchfield;
		field1.onblur = function () { if (field1.value == '') field1.value = lang_searchfield; }
		field1.onfocus = function () { if (field1.value == lang_searchfield) field1.value = ''; }
	}
}


/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Navigation Submenus
*/
function startList () {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("mainnav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}


/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
On Load
*/
window.onload = function () {
	initSearchFields ();
	startList ();
}
