/**
 * Takes a string variable which is a complete file path string along with the 
 * file name and splits off the path section
 *
 * @ declare public
 * @ param  sFileStr  String  The full address of a given file.
 * @ return String  The path to the given string.
 */
 function getFilePath( sFileStr )
 {
	 //minimal error checking, don't allow empty strings
	 if (sFileStr != "")
	 {
		 //get the last index of file delimiters, forward and back slash
		 //if there are no delimiters, there's no path so just return an empty string
		 //don't forget to escape the backslash
		 if ( sFileStr.lastIndexOf('/') >= 0 || sFileStr.lastIndexOf('\\') >= 0 )
		 {
			 //try and assign a index pointer to the last slash
			 var i = sFileStr.lastIndexOf('/');
			 //if we don't find a slash at all, use the backslash
			 if ( i<0 )
			 {
				 i = sFileStr.lastIndexOf('\\');
			 }
			 //now make sure we have at least one slash/backslash set, substring from that
			 //to get the path name
			 if ( i<0 )
			 {
				 sFileStr = "";
			 }
			 else
			 {
				 //substring out from the start of the string
			    sFileStr = sFileStr.substring( 0, i +1 );
			 }
		 }
		 else
		 {
		    sFileStr = "";
		 }
	 }

	 //now we can return our input value
	 return sFileStr;
 }
  

function over(what) {
	document.images[what].src = getFilePath(document.images[what].src) + what + "_rollover.gif";
	return true;
	}

function off(what) {
	document.images[what].src = getFilePath(document.images[what].src) + what + ".gif";
	return false;
	}
	
function on(what) {
	document.images[what].src = getFilePath(document.images[what].src) + what + "_on.gif";
	return true;
	}
