
// define navi array
document.menustate 						= new Array;

/*document.menustate['main_coll'] 			= 'normal';
document.menustate['main_hist']				= 'normal';
document.menustate['main_dist']				= 'normal';
document.menustate['main_cont']				= 'normal';
document.menustate['main_pres']				= 'normal';
 
document.menustate['history_truman_h']		= 'normal';
document.menustate['history_eisenhower_d']	= 'normal';
document.menustate['history_truman_h']		= 'normal';
*/

function set_derivatives() {

	// page url: toplevel
	document.upstring = '';
	document.pagehtml = document.pageid + '.' + document.pagesuffix;
	// page url: level1
 	if (document.page_n1 != ''){
		document.upstring = '../';
		document.pagehtml = document.page_n1 + '/' + document.pageid + '.' + document.pagesuffix;
	}
	// page url: level2
 	if (document.page_n2 != ''){
		document.upstring = '../../';
		document.pagehtml = document.page_n1 + '/' + document.page_n2 + '/' + document.pageid + '.' + document.pagesuffix;
	}
	// page url: level3
 	if (document.page_n3 != ''){
		document.upstring = '../../../';
		document.pagehtml = document.page_n1 + '/' + document.page_n2 + '' + document.page_n3 + '/' + document.pageid + '.' + document.pagesuffix;
	}

 	//activate menu n1 in array
 	if (document.page_n1 != ''){
	 	document.menustate['n1_' + document.page_n1] = 'high';
	}
	//activate menu n2 in array
	if (document.page_n2 != ''){
		document.menustate['n2_' + document.page_n2] = 'high';
	}
	//activate menu n3 in array
	if (document.page_n3 != ''){
		document.menustate['n3_' + document.page_n3] = 'high';
	}
}


function setnavi(menuitem) {
	document.getElementById(menuitem).src = '../' + document.pagelang + '/img/menu/high/' + menuitem + '.jpg';
}
 
function unsetnavi(menuitem) {
	document.getElementById(menuitem).src = '../' + document.pagelang + '/img/menu/' + document.menustate[menuitem] + '/' + menuitem + '.jpg';
}
 
function initnavi() {
	//main
	for (var hashkey in document.menustate) {
		//alert('key is: ' + hashkey + ', value is: ' + document.menustate[hashkey]);
		if (document.getElementById(hashkey) != null){
			document.getElementById(hashkey).setAttribute('class', document.menustate[hashkey]);
		}
	}
}

/*function printlangswitch(){

	if (document.pagelang != 'de'){
		document.write('<a href="' + document.upstring + '../de/' + document.pagehtml + '">D</a> &nbsp; &nbsp; ');
	}else{
		document.write('D &nbsp; &nbsp; ');
	}
	if (document.pagelang != 'en'){
		document.write('<a href="' + document.upstring + '../en/' + document.pagehtml + '">E</a> &nbsp; &nbsp; ');
	}else{
		document.write('E &nbsp; &nbsp; ');
	}
	if (document.pagelang != 'fr'){
		document.write('<a href="' + document.upstring + '../fr/' + document.pagehtml + '">F</a> &nbsp; &nbsp; ');
	}else{
		document.write('F &nbsp; &nbsp; ');
	}
}
*/

// // build links at http://jumk.de/nospam/stopspam.html
// function UnCryptMailto( s ){
//     var n = 0;
//     var r = "";
//     for( var i = 0; i < s.length; i++){
//         n = s.charCodeAt( i )
//         if( n >= 8364 ){ n = 128; }
//         r += String.fromCharCode( n - 1 );
//     }
//     return r;
// }
// 
// function linkTo_UnCryptMailto( s ){
//     location.href=UnCryptMailto( s );
// }
// 
