boolean loadScriptFileInternal(String filename) {
		if (filename.toLowerCase().indexOf("javascript:") == 0)
			return loadScript(filename, viewer.eval(filename.substring(11)));
		Object t = viewer.getInputStreamOrErrorMessageFromName(filename);
		if (!(t instanceof InputStream))
			return loadError((String) t);
		BufferedReader reader = new BufferedReader(new InputStreamReader((InputStream) t));
		StringBuffer script = new StringBuffer();
		try {
			while (true) {
				String command = reader.readLine();
				if (command == null)
					break;
				script.append(command);
				script.append("\n");
			}
		}
		catch (IOException e) {
			try {
				reader.close();
			}
			catch (IOException ioe) {
			}
			return ioError(filename);
		}
		try {
			reader.close();
		}
		catch (IOException ioe) {
		}
		return loadScript(filename, script.toString());
	}