<!--
function getBackDirectory(){
	// Calculate the position in the tree the page is running in
	// This will then add the necessary "../" to the paths
	var hostName = new String(location.hostname);
	var currentPath = new String(document.location.toString());
	var baesystemsDir = new String("/baesystems/");
	var currentDirLevel=0;
	
	if (hostName == ""){
		// File system used
		//alert(currentPath);
		var currentDir = new String(currentPath.substring(currentPath.indexOf(baesystemsDir)+ baesystemsDir.length));
		currentDirLevel = currentDir.split('/').length - 1;
	}else{
		// WebSite
		if (currentPath.indexOf(baesystemsDir) > -1){
			// Default Website
			var currentDir = new String(currentPath.substring(currentPath.indexOf(baesystemsDir) + baesystemsDir.length));
			currentDirLevel = currentDir.split('/').length - 1;
			//alert('test message please ignore!\n\nindexOf: ' + currentPath.indexOf(baesystemsDir) + '\nCurrentPath: ' + currentPath + '\n' + 'CurrentDir: ' + currentDir + '\nLevel No:' + currentDirLevel);
		}else{
			// Proper web site
			var currentDir = new String(currentPath.substring(currentPath.indexOf(hostName)+ hostName.length));
			currentDirLevel = currentDir.split('/').length - 1;
		}
	}
	// For each level add a "../"
	var backDirectory = "";
	for (i=0;i<currentDirLevel;i++){
		backDirectory = backDirectory + "../";
	}
	/*
	if (backDirectory == ""){
		//backDirectory = "/";
		//alert('test message please ignore!\n\nbackDirectory: ' + backDirectory);
	}
	*/
	return backDirectory;
}
-->