' + texts['T'+wNum].initialHtmlText + '
'; } else { texts['T'+wNum].htmlText = texts['T'+wNum].initialHtmlText; var newHtmlText = texts['T'+wNum].text newHtmlText = newHtmlText.split('&').join('&'); newHtmlText = newHtmlText.split('<').join('<'); newHtmlText = newHtmlText.split('>').join('>'); newHtmlText = newHtmlText.split("'").join('''); newHtmlText = newHtmlText.split('"').join('"'); texts['T'+wNum].htmlText = '' + newHtmlText + '
'; } } function get scroll() { return iScroll; } function set scroll(wScroll) { if (wScroll < 0) wScroll = 0; if (wScroll > maxscroll) wScroll = maxscroll; texts.motion.trans({ _y: - wScroll * 20 }); iScroll = wScroll; } function get bookmark() { return bookmarks.current; } function set bookmark(wBookmark) { if (typeof wBookmark == 'string') { for (var i = 0, j = 0; i < bookmarks.length; i++) { if (bookmarks[i] != undefined && i) j++; if (bookmarks[i] == wBookmark) break; } if (i == bookmarks.length) return; bookmarks.current = j; scroll = i; } else if (wBookmark < bookmarks.current) { for (; wBookmark < bookmarks.current && bookmarks.current > 0 && iScroll > 0; bookmarks.current--) { while (bookmarks[--iScroll] == undefined && iScroll > 0); } scroll = iScroll; } else if (wBookmark > bookmarks.current) { for (; wBookmark > bookmarks.current && bookmarks.current < bookmarks.length && iScroll < maxscroll; bookmarks.current++) { while (bookmarks[++iScroll] == undefined && iScroll < maxscroll); } scroll = iScroll; } } function getBookmark(wBookmark) { if (typeof wBookmark == 'string') { for (var i = 0, j = 0; i < bookmarks.length; i++) { if (bookmarks[i] != undefined && i) j++; if (bookmarks[i] == wBookmark) break; } if (i == bookmarks.length) return false; return i; } else { wBookmark = Number(wBookmark); for (var i = 0, j = 0; i < bookmarks.length; i++) { if (bookmarks[i] != undefined && i) j++; if (j == wBookmark) break; } if (i == bookmarks.length) return false; return i; } } function get maxscroll() { return texts.length - Math.floor(back._height/20); } }