var home_base = "";
var shared_base = "";
var home_base_file = false;

function get_homebase()
{
	var i;

	home_base = document.location.href;
	home_base_file = (home_base.substring(0,4) == "file");
	// trim off query
	i = home_base.indexOf("?");
	if (i != -1)
		home_base = home_base.substring(0, i);
	// trim off filename
	i = home_base.lastIndexOf("/");
	if (i != -1)
		home_base = home_base.substring(0, i + 1);
//	home_base = home_base.replace(":", "|");


//  document.location == document.location.href
//	document.location.href.base is undefined

	shared_base = home_base;
	// trim off trailing slash
	shared_base = shared_base.substring(0, shared_base.length - 1);
	// trim off explorer folder name
	shared_base = shared_base.substring(0, shared_base.lastIndexOf("/") + 1);
	shared_base += "shared/";

//	alert(home_base_file + "\n" + home_base + "\n" + shared_base);

}
