// constants/configuration
	if(typeof booOnLoad == 'undefined')			var booOnLoad = true;			// check onload
	if(typeof booRepeat == 'undefined')			var booRepeat = true;			// check with intervals
	if(typeof intRefreshDelay == 'undefined')		var intRefreshDelay = 512;	// check interval
	if(typeof fltIdTrust == 'undefined')		var fltIdTrust = 0.01;			// cut-off for the reliability of Id's
	if(typeof booValidateUrl == 'undefined')	var booValidateUrl = false;		// check if a  url is passed to this page as a parameter
	if(typeof strValidateFrm == 'undefined')		var strValidateUrl = 'window.content.location'; // replace this page if it is
	if(typeof arrNavSettings == 'undefined'){
		var arrNavSettings =	new Array(0,
									//new Array(intId,intParent,strName,strSetAddress,strGetAddress,intState,intRecursionSenseLvl,intPriority,strGetReliability,fltReliability),
							/*in*/	new Array(1,0,'docInfo0',		'content.setId(intId)',				'content.getId()',				0,-1,100,'content.getIdReliability()',1),
							/*out*/	new Array(2,1,'navIconTray0',	'navigation.setAlwaysOn(intId)',	'navigation.getButtonsId()',	0,1,50,'',1)
								)
	}


// primary functions - functionality
	// checks every step of a function call before executing it.
	function getAddress(strAddress,intId){
		var intValue = -1;
	
	// Build a check string to validate te address
		// split of the end-brackets and variables '(vars)' from the address
		var strCheck = strAddress.split('(')[0];
		
	// validate the path of the address
		arrPath = strCheck.split('.');
		// take the first part of the address, and set it as the first to check
		strPath = arrPath[0];
		// start out assuming the path works
		booPath = true;
		// skip the first part since it's allready been added to the default start string
		for(var intA=1; intA<arrPath.length; intA++){
			if(typeof eval(strPath)=='undefined') booPath = false;
			// add subsequent address parts to check
			strPath += '.' + arrPath[intA]
		}
		
		// validate the address
		if(booPath){
			if(typeof eval(strCheck)!='undefined'){
				// execute the address
				intValue = eval(strAddress);
			}
		}
		
		// return it's result
		return intValue;
	}


// secondary function - construction
	function validateUrl(){
		strUrl = URLparam('strurl','');
		if(strUrl!=''){
			getAddress(strValidateUrl+".replace('"+strUrl+"')",0);
		}
	}


// ternary function - operation 
	// set all navigation element to the correct Id
	function setNavProperties(){
		// for all target-Elements
		for(var intA=1; intA<arrNavSettings.length; intA++){
			if(arrNavSettings[intA][1]>0){
				// get the item's current Id 
				intItemId = arrNavSettings[intA][5];
				// get the item's parent's Id
				intParent = arrNavSettings[intA][1];
				intParentId = arrNavSettings[intParent][5];
				// get the needed recursion level
				intRecursion = arrNavSettings[intA][6];
				// get the Id at the recursed level
				if(intRecursion<0){
					intRecursedId = intParentId;
				}else{
					arrRecursedId = TraceBranch(intParentId);
					intRecursedId = arrRecursedId[intRecursion]
				}
				// if it differs from the element's current Id
				if(intRecursedId != intItemId){
					// give it the updated Id
					getAddress(arrNavSettings[intA][3],intRecursedId)
				}
			}
		}
	}
	
	// get the most recent Id's from their sources
	function getNavProperties(){
		for(var intA=1; intA<arrNavSettings.length; intA++){
			// if there is a reliability getter given, use it
			if(arrNavSettings[intA][8]!='') arrNavSettings[intA][9] = getAddress(arrNavSettings[intA][8]);
			// us the getFunction to get the id of the item, if the item is deemed reliable
			if(arrNavSettings[intA][9]>fltIdTrust) arrNavSettings[intA][5] = getAddress(arrNavSettings[intA][4]);
		}
	}
	
	// update the navigation
	function updateNavProperties(){
		// get the current states
		getNavProperties();
		// set the wanted states
		setNavProperties();
		// get the current states again for proper administration
			//getNavProperties();
		// wash, rinse, repeat
		if(booRepeat) intNavSyncTimeout = setTimeout('updateNavProperties()',intRefreshDelay);
	}
	
	// force a change
	function forceNavProperties(intNewId){
		// stop the automatic updates
		clearInterval(intNavSyncTimeout);
		// set the new Id as the default Id
		for(var intA=1; intA<arrNavSettings.length; intA++){
			if(arrNavSettings[intA][1]==0) arrNavSettings[intA][5];
		}
		// update the navigation
		setNavProperties();
	}


// executed inline
	if(booValidateUrl) onload = validateUrl;
	if(booRepeat && !booOnLoad) updateNavProperties;
	if(booOnLoad) onload = updateNavProperties;
	