// returns directory path section of URL

function getDirPath(URL) {
	var result=unescape(URL.substring(0,(URL.lastIndexOf("/"))+1));
	return result;
}

// returns directory path of current web page
function thisDirPath() {
	return getDirPath(location.pathname);
}

