
var layer;
var link;
var smoveInt;
var smoveCnt = 30;

function show(strId1, strId2) {
	
	// smoveCnt = 0;
	layer = document.getElementById(strId1);
	link = document.getElementById(strId2);
	
	// opacity(strId1, 0);
	layer.style.display = 'block';	
	// smoveInt = setInterval('smoveIn("'+strId1+'")', 15);	
	link.style.backgroundImage = 'url(images/navi/naviActive.gif)';
	link.style.lineHeight = '1.6em';
	
}

function smoveIn(strId) {

	if(smoveCnt <= 100) {
		opacity(strId, smoveCnt);
		smoveCnt = smoveCnt +10;
	}
	
	else {
		clearInterval(smoveInt);
	}
}

function hide(strId1, strId2) {
	layer.style.display = 'none';
	if(link.className != 'active') {
		link.style.backgroundImage = 'url(images/navi/naviABack.gif)';
		link.style.lineHeight = '2em';
	}
	// clearInterval(smoveInt);
}

/* Active Navi Element */

function active() {
	if(window.location.search.length > 0) {		
	
		searchString = window.location.search;
		
		if(searchString.match(/title=\S*&/)) {
			searchString = searchString.match(/title=\S*&/) + '';
			stringStart = searchString.indexOf('=') + 1;
			stringEnd = searchString.lastIndexOf('&');
			searchString = searchString.substring(stringStart, stringEnd);
			document.getElementById(searchString).className = 'active';
		}
		else if(searchString.lastIndexOf('title=') != -1) {
			stringStart = searchString.lastIndexOf('title=') + 'title='.length;
			stringEnd = searchString.length;
			searchString = searchString.substring(stringStart, stringEnd);
			document.getElementById(searchString).className = 'active';
		}
	}
	else {
		document.getElementById('home').className = 'active';
	}
}

function subActive() {
document.getElementById('1').className = 'subActive';
}

/* Funktion für die Transparentz | "id" id des Elements | "value" von 0 bis 100 */

function opacity(strId, value) {

	if(layer.attachEvent) {
		document.getElementById(strId).style.filter = 'alpha(opacity=' + value + ')';
	}
	
	if(layer.addEventListener) {
		document.getElementById(strId).style.opacity = value/100;
	}
	
}




