// Author.....: Jessie R. Hernandez
// Date.......: 02/02/2001
// Description: Gets the path of the current document (without the document name).

function getDocumentPath()
{
	var index1 = 0;
	var index2 = 0;
	// 'result' will hold the path of the current document
	var result = "";

	// get the indices of the last forward slash and backslash
	index1 = document.URL.lastIndexOf( "/" );
	index2 = document.URL.lastIndexOf( "\\" );

	// get only the path of the current document
	if( index1 < index2 )
		result = document.URL.substring( 0, index2 ) + "\\";
	else // index1 >= index2
		result = document.URL.substring( 0, index1 ) + "/";

	// return the path
	return result;
} // function getDocumentPath