document.onreadystatechange = function () {
	if (document.readyState == "complete") {
		document.getElementById('loadMsg').style.display = 'none';
		window.reader = ePubReader(FR.fileURL, {
			bookKey: FR.bookKey,
			contained:true,
			restore: true,
			storage: true
		});
		var themes = window.reader.book.rendition.themes;
		themes.register("filerun", FR.themeURL);
		themes.select('filerun');
	}
};