static public String purefilename (String filename)
	{	char a[]=filename.toCharArray(); 
		int i=a.length-1; 
		char fs=File.separatorChar; 
		while (i>=0)
		{	if (a[i]==fs || a[i]=='/' || i==0)
			{	if (i==0) i=-1; 
				if (i<a.length-1)
				{	int j=a.length-1; 
					while (j>i && a[j]!='.') j--; 
					if (j>i+1) return new String(a,i+1,j-i-1); 
					else return ""; 
				}
				else return ""; 
			}
			i--; 
		}
		return filename; 
	}