ಮೀಡಿಯವಿಕಿ ಚರ್ಚೆಪುಟ:Transliteration.js

message: Need to include 
* mw-input-wpText
* mw-input-wpSubject
in transliterate & addTransliterationOption...
replies: text: ~ ತೇಜಸ್ ೧೭:೦೭, ೩೧ ಮೇ ೨೦೧೧ (UTC)
thread_title:  TransliterationOption

message: /*
This script is a modified version of Alex benenson's cyrillic translitarator and this version was created by user Tatari for Devnagari and modified by User:Eukesh for Kannada.
*/
var amhaHash='{"k":"ಕ್","ಕ್a":"ಕ","ಕa":"ಕಾ","ಕ್i":"ಕಿ","ಕ್I":"ಕೀ","ಕಿi":"ಕಿಇ","ಕೇe":"ಕೀ","ಕ್u":"ಕು","ಕ್U":"ಕೂ","ಕೋo":"ಕೂ","ಕುu":"ಕೂ","ಕ್e":"ಕೇ","ಕi":"ಕೈ","ಕ್o":"ಕೋ","ಕu":"ಕೌ","ಕ್:":"ಕಃ","ಕ:":"ಕಃ","ಕ್O":"ಕ೉","ಕ೉M":"ಕಾಁ","ಕ್E":"ಕ೅","ಕ೅M":"ಕಁ","ಕ್R":"ಕೃ","ಕೃu":"ಕೃ","ಕೃU":"ಕೄ","ಕೃಓo":"ಕೃಊ","ಕೃl":"ಕೢ","ಕೢu":"ಕೢ","ಕೢU":"ಕೣ","ಕೢಓo":"ಕೢಊ","ಕ್M":"ಕಂ","ಕ್h":"ಖ್","ಖ್a":"ಖ","ಖa":"ಖಾ","ಖ್i":"ಖಿ","ಖ್I":"ಖೀ","ಖಿi":"ಖಿಇ","ಖೇe":"ಖೀ","ಖ್u":"ಖು","ಖ್U":"ಖೂ","ಖೋo":"ಖೂ","ಖುu":"ಖೂ","ಖ್e":"ಖೇ","ಖi":"ಖೈ","ಖ್o":"ಖೋ","ಖu":"ಖೌ","ಖ್:":"ಖಃ","ಖ:":"ಖಃ","ಖ್O":"ಖ೉","ಖ೉M":"ಖಾಁ","ಖ್E":"ಖ೅","ಖ೅M":"ಖಁ","ಖ್R":"ಖೃ","ಖೃu":"ಖೃ","ಖೃU":"ಖೄ","ಖೃಓo":"ಖೃಊ","ಖ್M":"ಖಂ","ಖೃl":"ಖೢ","ಖೢu":"ಖೢ","ಖೢU":"ಖೣ","ಖೢಓo":"ಖೢಊ",';
amhaHash+='"g":"ಗ್","ಗ್a":"ಗ","ಗa":"ಗಾ","ಗ್i":"ಗಿ","ಗ್I":"ಗೀ","ಗಿi":"ಗೀ","ಗೇe":"ಗೀ","ಗ್u":"ಗು","ಗ್U":"ಗೂ","ಗೋo":"ಗೂ","ಗುu":"ಗೂ","ಗ್e":"ಗೇ","ಗi":"ಗೈ","ಗ್o":"ಗೋ","ಗu":"ಗೌ","ಗ್:":"ಗಃ","ಗ:":"ಗಃ","ಗ್O":"ಗ೉","ಗ೉M":"ಗಾಁ","ಗ್E":"ಗ೅","ಗ೅M":"ಗಁ","ಗ್R":"ಗೃ","ಗೃu":"ಗೃ","ಗೃU":"ಗೄ","ಗೃಓo":"ಗೄ","ಗ್M":"ಗಂ","ಗೃl":"ಗೢ","ಗೢu":"ಗೢ","ಗೢU":"ಗೣ","ಗೢo":"ಗೣ","ಗ್h":"ಘ್","ಘ್a":"ಘ","ಘa":"ಘಾ","ಘ್i":"ಘಿ","ಘ್I":"ಘೀ","ಘಿi":"ಘೀ","ಘೇe":"ಘೀ","ಘ್u":"ಘು","ಘ್U":"ಘೂ","ಘೋo":"ಘೂ","ಘುu":"ಘೂ","ಘ್e":"ಘೇ","ಘi":"ಘೈ","ಘ್o":"ಘೋ","ಘu":"ಘೌ","ಘ್:":"ಘಃ","ಘ:":"ಘಃ","ಘ್O":"ಘ೉","ಘ೉M":"ಘಾಁ","ಘ್E":"ಘ೅","ಘ೅M":"ಘಁ","ಘ್R":"ಘೃ","ಘೃu":"ಘೃ","ಘೃU":"ಘೄ","ಘೃಓo":"ಘೄ","ಘ್M":"ಘಂ","ಘೃl":"ಘೢ","ಘೢu":"ಘೢ","ಘೢU":"ಘೣ","ಘೢಓo":"ಘೣ","G":"ಙ್","ಙ್a":"ಙ","ಙa":"ಙಾ","ಙ್i":"ಙಿ","ಙ್I":"ಙೀ","ಙಿi":"ಙೀ","ಙೇe":"ಙೀ","ಙ್u":"ಙು","ಙ್U":"ಙೂ","ಙೋo":"ಙೂ","ಙುu":"ಙೂ","ಙ್e":"ಙೇ","ಙi":"ಙೈ","ಙ್o":"ಙೋ","ಙu":"ಙೌ","ಙ್:":"ಙಃ","ಙ:":"ಙಃ","ಙ್O":"ಙ೉","ಙ೉M":"ಙಾಁ","ಙ್E":"ಙ೅","ಙ೅M":"ಙಁ","ಙ್R":"ಙೃ","ಙೃu":"ಙೃ","ಙೃU":"ಙೄ","ಙೃಓo":"ಙೄ","ಙ್M":"ಙಂ","ಙೃl":"ಙೢ","ಙೢu":"ಙೢ","ಙೢU":"ಙೣ","ಙೢಓo":"ಙೣ",';
amhaHash+='"c":"ಚ್","ch":"ಚ್","ಚ್a":"ಚ","ಚa":"ಚಾ","ಚ್i":"ಚಿ","ಚ್I":"ಚೀ","ಚಿi":"ಚೀ","ಚೇe":"ಚೀ","ಚ್u":"ಚು","ಚ್U":"ಚೂ","ಚೋo":"ಚೂ","ಚುu":"ಚೂ","ಚ್e":"ಚೇ","ಚi":"ಚೈ","ಚ್o":"ಚೋ","ಚu":"ಚೌ","ಚ್:":"ಚಃ","ಚ:":"ಚಃ","ಚ್O":"ಚ೉","ಚ೉M":"ಚಾಁ","ಚ್E":"ಚ೅","ಚ೅M":"ಚಁ","ಚ್R":"ಚೃ","ಚೃu":"ಚೃ","ಚೃU":"ಚೄ","ಚೃಓo":"ಚೄ","ಚ್M":"ಚಂ","ಚೃl":"ಚೢ","ಚೢu":"ಚೢ","ಚೢU":"ಚೣ","ಚೢಓo":"ಚೣ",';
amhaHash+='"C":"ಛ್","ಚ್h":"ಛ್","ಛ್h":"ಛ್","ಛ್a":"ಛ","ಛa":"ಛಾ","ಛ್i":"ಛಿ","ಛ್I":"ಛೀ","ಛಿi":"ಛೀ","ಛೇe":"ಛೀ","ಛ್u":"ಛು","ಛ್U":"ಛೂ","ಛೋo":"ಛೂ","ಛುu":"ಛೂ","ಛ್e":"ಛೇ","ಛi":"ಛೈ","ಛ್o":"ಛೋ","ಛu":"ಛೌ","ಛ್:":"ಛಃ","ಛ:":"ಛಃ","ಛ್O":"ಛ೉","ಛ೉M":"ಛಾಁ","ಛ್E":"ಛ೅","ಛ೅M":"ಛಁ","ಛ್R":"ಛೃ","ಛೃu":"ಛೃ","ಛೃU":"ಛೄ","ಛೃಓo":"ಛೄ","ಛ್M":"ಛಂ","ಛೃl":"ಛೢ","ಛೢu":"ಛೢ","ಛೢU":"ಛೣ","ಛೢಓo":"ಛೣ",';
amhaHash+='"j":"ಜ್","ಜ್a":"ಜ","ಜa":"ಜಾ","ಜ್i":"ಜಿ","ಜ್I":"ಜೀ","ಜಿi":"ಜೀ","ಜೇe":"ಜೀ","ಜ್u":"ಜು","ಜ್U":"ಜೂ","ಜೋo":"ಜೂ","ಜುu":"ಜೂ","ಜ್e":"ಜೇ","ಜi":"ಜೈ","ಜ್o":"ಜೋ","ಜu":"ಜೌ","ಜ್:":"ಜಃ","ಜ:":"ಜಃ","ಜ್O":"ಜ೉","ಜ೉M":"ಜಾಁ","ಜ್E":"ಜ೅","ಜ೅M":"ಜಁ","ಜ್R":"ಜೃ","ಜೃu":"ಜೃ","ಜೃU":"ಜೄ","ಜೃಓo":"ಜೄ","ಜ್M":"ಜಂ","ಜೃl":"ಜೢ","ಜೢu":"ಜೢ","ಜೢU":"ಜೣ","ಜೢಓo":"ಜೣ","ಜ್h":"ಝ್","ಝ್a":"ಝ","ಝa":"ಝಾ","ಝ್i":"ಝಿ","ಝ್I":"ಝೀ","ಝಿi":"ಝೀ","ಝೇe":"ಝೀ","ಝ್u":"ಝು","ಝ್U":"ಝೂ","ಝೋo":"ಝೂ","ಝುu":"ಝೂ","ಝ್e":"ಝೇ","ಝi":"ಝೈ","ಝ್o":"ಝೋ","ಝu":"ಝೌ","ಝ್:":"ಞಃ","ಝ್a:":"ಝಃ","ಝ್O":"ಝ೉","ಝ೉M":"ಝಾಁ","ಝ್E":"ಝ೅","ಝ೅M":"ಝಁ","ಝ್R":"ಝೃ","ಝೃu":"ಝೃ","ಝೃU":"ಝೄ","ಝೃಓo":"ಝೄ","ಝ್M":"ಝಂ","ಝೃl":"ಝೢ","ಝೢu":"ಝೢ","ಝೢU":"ಝೣ","ಝೢಓo":"ಝೣ",';
amhaHash+='"z":"ಝ್","ಝ:":"ಝಃ","Z":"ಝ್","Y":"ಞ್","ಞ್a":"ಞ","ಞa":"ಞಾ","ಞ್i":"ಞಿ","ಞ್I":"ಞೀ","ಞಿi":"ಞೀ","ಞೇe":"ಞೀ","ಞ್u":"ಞು","ಞ್U":"ಞೂ","ಞೋo":"ಞೂ","ಞುu":"ಞೂ","ಞ್e":"ಞೇ","ಞi":"ಞೈ","ಞ್o":"ಞೋ","ಞu":"ಞೌ","ಞ:":"ಞಃ","ಞ್O":"ಞ೉","ಞ೉M":"ಞಾಁ","ಞ್E":"ಞ೅","ಞ೅M":"ಞಁ","ಞ್R":"ಞೃ","ಞೃu":"ಞೃ","ಞೃU":"ಞೄ","ಞೃಓo":"ಞೄ","ಞ್M":"ಞಂ","ಞೃl":"ಞೢ","ಞೢu":"ಞೢ","ಞೢU":"ಞೣ","ಞೢಓo":"ಞೣ",';
amhaHash+='"T":"ಟ್","ಟ್a":"ಟ","ಟa":"ಟಾ","ಟ್i":"ಟಿ","ಟ್I":"ಟೀ","ಟಿi":"ಟೀ","ಟೇe":"ಟೀ","ಟ್u":"ಟು","ಟ್U":"ಟೂ","ಟೋo":"ಟೂ","ಟುu":"ಟೂ","ಟ್e":"ಟೇ","ಟi":"ಟೈ","ಟ್o":"ಟೋ","ಟu":"ಟೌ","ಟ್:":"ಟಃ","ಟ:":"ಟಃ","ಟ್O":"ಟ೉","ಟ೉M":"ಟಾಁ","ಟ್E":"ಟ೅","ಟ೅M":"ಟಁ","ಟ್R":"ಟೃ","ಟೃu":"ಟೃ","ಟೃU":"ಟೄ","ಟೃಓo":"ಟೄ","ಟ್M":"ಟಂ","ಟೃl":"ಟೢ","ಟೢu":"ಟೢ","ಟೢU":"ಟೣ","ಟೢಓo":"ಟೣ","ಟ್h":"ಠ್","ಠ್a":"ಠ","ಠa":"ಠಾ","ಠ್i":"ಠಿ","ಠ್I":"ಠೀ","ಠಿi":"ಠೀ","ಠೇe":"ಠೀ","ಠ್u":"ಠು","ಠ್U":"ಠೂ","ಠೋo":"ಠೂ","ಠುu":"ಠೂ","ಠ್e":"ಠೇ","ಠi":"ಠೈ","ಠ್o":"ಠೋ","ಠu":"ಠೌ","ಠ್:":"ಠಃ","ಠ್a:":"ಠಃ","ಠ್O":"ಠ೉","ಠ೉M":"ಠಾಁ","ಠ್E":"ಠ೅","ಠ೅M":"ಠಁ","ಠ್R":"ಠೃ","ಠೃu":"ಠೃ","ಠೃU":"ಠೄ","ಠೃಓo":"ಠೄ","ಠ್M":"ಠಂ","ಠೃl":"ಠೢ","ಠೢu":"ಠೢ","ಠೢU":"ಠೣ","ಠೢಓo":"ಠೣ",';
amhaHash+='"D":"ಡ್","ಡ್a":"ಡ","ಡa":"ಡಾ","ಡ್i":"ಡಿ","ಡ್I":"ಡೀ","ಡಿi":"ಡೀ","ಡೇe":"ಡೀ","ಡ್u":"ಡು","ಡ್U":"ಡೂ","ಡೋo":"ಡೂ","ಡುu":"ಡೂ","ಡ್e":"ಡೇ","ಡi":"ಡೈ","ಡ್o":"ಡೋ","ಡu":"ಡೌ","ಡ್:":"ಡಃ","ಡ:":"ಡಃ","ಡ್O":"ಡ೉","ಡ೉M":"಑ಾಁ","ಡ್E":"ಡ೅","ಡ೅M":"ಡಁ","ಡ್R":"ಡೃ","ಡೃu":"ಡೃ","ಡೃU":"ಡೄ","ಡೃಓo":"ಡೄ","ಡ್M":"ಡಂ","ಡೃl":"ಡೢ","ಡೢu":"ಡೢ","ಡೢU":"ಡೣ","ಡೢಓo":"ಡೣ","ಡ್h":"ಢ್","ಢ್a":"ಢ","ಢa":"ಢಾ","ಢ್i":"ಢಿ","ಢ್I":"ಢೀ","ಢಿi":"ಢೀ","ಢೇe":"ಢೀ","ಢ್u":"ಢು","ಢ್U":"ಢೂ","ಢೋo":"ಢೂ","ಢುu":"ಢೂ","ಢ್e":"ಢೇ","ಢi":"ಢೈ","ಢ್o":"ಢೋ","ಢu":"ಢೌ","ಢ್:":"ಢಃ","ಢ್a:":"ಢಃ","ಢ್O":"ಢ೉","ಢ೉M":"ಢಾಁ","ಢ್E":"ಢ೅","ಢ೅M":"ಢಁ","ಢ್R":"ಢೃ","ಢೃu":"ಢೃ","ಢೃU":"ಢೄ","ಢೃಓo":"ಢೄ","ಢ್M":"ಢಂ","ಢೃl":"ಢೢ","ಢೢu":"ಢೢ","ಢೢU":"ಢೣ","ಢೢಓo":"ಢೣ",';
amhaHash+='"N":"ಣ್","ಣ್a":"ಣ","ಣa":"ಣಾ","ಣ್i":"ಣಿ","ಣ್I":"ಣೀ","ಣಿi":"ಣೀ","ಣೇe":"ಣೀ","ಣ್u":"ಣು","ಣ್U":"ಣೂ","ಣೋo":"ಣೂ","ಣುu":"ಣೂ","ಣ್e":"ಣೇ","ಣi":"ಣೈ","ಣ್o":"ಣೋ","ಣu":"ಣೌ","ಣ್:":"ಣಃ","ಣ:":"ಣಃ","ಣ್O":"ಣ೉","ಣ೉M":"ಣಾಁ","ಣ್E":"ಣ೅","ಣ೅M":"ಣಁ","ಣ್R":"ಣೃ","ಣೃu":"ಣೃ","ಣೃU":"ಣೄ","ಣೃಓo":"ಣೄ","ಣ್M":"ಣಂ","ಣೃl":"ಣೢ","ಣೢu":"ಣೢ","ಣೢU":"ಣೣ","ಣೢಓo":"ಣೣ",';
amhaHash+='"t":"ತ್","ತ್a":"ತ","ತa":"ತಾ","ತ್i":"ತಿ","ತ್I":"ತೀ","ತಿi":"ತೀ","ತೇe":"ತೀ","ತ್u":"ತು","ತ್U":"ತೂ","ತೋo":"ತೂ","ತುu":"ತೂ","ತ್e":"ತೇ","ತi":"ತೈ","ತ್o":"ತೋ","ತu":"ತೌ","ತ್:":"ತಃ","ತ:":"ತಃ","ತ್O":"ತ೉","ತ೉M":"ತಾಁ","ತ್E":"ತ೅","ತ೅M":"ತಁ","ತ್R":"ತೃ","ತೃu":"ತೃ","ತೃU":"ತೄ","ತೃಓo":"ತೄ","ತ್M":"ತಂ","ತೃl":"ತೢ","ತೢu":"ತೢ","ತೢU":"ತೣ","ತೢಓo":"ತೣ","ತ್h":"ಥ್","ಥ್a":"ಥ","ಥa":"ಥಾ","ಥ್i":"ಥಿ","ಥ್I":"ಥೀ","ಥಿi":"ಥೀ","ಥೇe":"ಥೀ","ಥ್u":"ಥು","ಥ್U":"ಥೂ","ಥೋo":"ಥೂ","ಥುu":"ಥೂ","ಥ್e":"ಥೇ","ಥi":"ಥೈ","ಥ್o":"ಥೋ","ಥu":"ಥೌ","ಥ್:":"ಥಃ","ಥ್a:":"ಥಃ","ಥ್O":"ಥ೉","ಥ೉M":"ಥಾಁ","ಥ್E":"ಥ೅","ಥ೅M":"ಥಁ","ಥ್R":"ಥೃ","ಥೃu":"ಥೃ","ಥೃU":"ಥೄ","ಥೃಓo":"ಥೄ","ಥ್M":"ಥಂ","ಥೃl":"ಥೢ","ಥೢu":"ಥೢ","ಥೢU":"ಥೣ","ಥೢಓo":"ಥೣ",';
amhaHash+='"d":"ದ್","ದ್a":"ದ","ದa":"ದಾ","ದ್i":"ದಿ","ದ್I":"ದೀ","ದಿi":"ದೀ","ದೇe":"ದೀ","ದ್u":"ದು","ದ್U":"ದೂ","ದೋo":"ದೂ","ದುu":"ದೂ","ದ್e":"ದೇ","ದi":"ದೈ","ದ್o":"ದೋ","ದu":"ದೌ","ದ್:":"ದಃ","ದ:":"ದಃ","ದ್O":"ದ೉","ದ೉M":"ದಾಁ","ದ್E":"ದ೅","ದ೅M":"ದಁ","ದ್R":"ದೃ","ದೃu":"ದೃ","ದೃU":"ದೄ","ದೃಓo":"ದೄ","ದ್M":"ದಂ","ದೃl":"ದೢ","ದೢu":"ದೢ","ದೢU":"ದೣ","ದೢಓo":"ದೣ","ದ್h":"ಧ್","ಧ್a":"ಧ","ಧa":"ಧಾ","ಧ್i":"ಧಿ","ಧ್I":"ಧೀ","ಧಿi":"ಧೀ","ಧೇe":"ಧೀ","ಧ್u":"ಧು","ಧ್U":"ಧೂ","ಧೋo":"ಧೂ","ಧುu":"ಧೂ","ಧ್e":"ಧೇ","ಧi":"ಧೈ","ಧ್o":"ಧೋ","ಧu":"ಧೌ","ಧ್:":"ಧಃ","ಧ್a:":"ಧಃ","ಧ್O":"ಧ೉","ಧ೉M":"ಧಾಁ","ಧ್E":"ಧ೅","ಧೇM":"ಧಁ","ಧ್R":"ಧೃ","ಧೃu":"ಧೃ","ಧೃU":"ಧೄ","ಧೃಓo":"ಧೄ","ಧ್M":"ಧಂ","ಧೃl":"ಧೢ","ಧೢu":"ಧೢ","ಧೢU":"ಧೣ","ಧೢಓo":"ಧೣ",';
amhaHash+='"n":"ನ್","ನ್a":"ನ","ನa":"ನಾ","ನ್i":"ನಿ","ನ್I":"ನೀ","ನಿi":"ನೀ","ನೇe":"ನೀ","ನ್u":"ನು","ನ್U":"ನೂ","ನೋo":"ನೂ","ನುu":"ನೂ","ನ್e":"ನೇ","ನi":"ನೈ","ನ್o":"ನೋ","ನu":"ನೌ","ನ್:":"ನಃ","ನ:":"ನಃ","ನ್O":"ನ೉","ನ೉M":"ನಾಁ","ನ್E":"ನ೅","ನ೅M":"ನಁ","ನ್R":"ನೃ","ನೃu":"ನೃ","ನೃU":"ನೄ","ನೃಓo":"ನೄ","ನ್M":"ನಂ","ನೃl":"ನೢ","ನೢu":"ನೢ","ನೢU":"ನೣ","ನೢಓo":"ನೣ",';
amhaHash+='"p":"ಪ್","ಪ್a":"ಪ","ಪa":"ಪಾ","ಪ್i":"ಪಿ","ಪ್I":"ಪೀ","ಪಿi":"ಪೀ","ಪೇe":"ಪೀ","ಪ್u":"ಪು","ಪ್U":"ಪೂ","ಪೋo":"ಪೂ","ಪುu":"ಪೂ","ಪ್e":"ಪೇ","ಪi":"ಪೈ","ಪ್o":"ಪೋ","ಪu":"ಪೌ","ಪ್:":"ಪಃ","ಪ:":"ಪಃ","ಪ್O":"ಪ೉","ಪ೉M":"ಪಾಁ","ಪ್E":"ಪ೅","ಪ೅M":"ಪಁ","ಪ್R":"ಪೃ","ಪೃu":"ಪೃ","ಪೃU":"ಪೄ","ಪೃಓo":"ಪೄ","ಪ್M":"ಪಂ","ಪೃl":"ಪೢ","ಪೢu":"ಪೢ","ಪೢU":"ಪೣ","ಪೢಓo":"ಪೣ",';
amhaHash+='"P":"ಪ್","ಪ್a:":"ಪಃ","ಪ್h":"ಫ್","ಫ್a":"ಫ","ಫa":"ಫಾ","ಫ್i":"ಫಿ","ಫ್I":"ಫೀ","ಫಿi":"ಫೀ","ಫ್ee":"ಫೀ","ಫ್u":"ಫು","ಫ್U":"ಫೂ","ಫೋo":"ಫೂ","ಫ್uu":"ಫೂ","ಫ್e":"ಫೇ","ಫi":"ಫೈ","ಫ್o":"ಫೋ","ಫu":"ಫೌ","ಫ್:":"ಫಃ","ಫ್a:":"ಫಃ","ಫ್O":"ಫ೉","ಫ೉M":"ಫಾಁ","ಫ್E":"ಫ೅","ಫ೅M":"ಫಁ","ಫ್R":"ಫೃ","ಫೃu":"ಫೃ","ಫೃU":"ಫೄ","ಫೃಓo":"ಫೄ","ಫ್M":"ಫಂ","ಫೃl":"ಫೢ","ಫೢu":"ಫೢ","ಫೢU":"ಫೣ","ಫೢಓo":"ಫೣ",';
amhaHash+='"f":"ಫ್","F":"ಫ್","b":"ಬ್","ಬ್a":"ಬ","ಬa":"ಬಾ","ಬ್i":"ಬಿ","ಬ್I":"ಬೀ","ಬಿi":"ಬೀ","ಬೇe":"ಬೀ","ಬ್u":"ಬು","ಬ್U":"ಬೂ","ಬೋo":"ಬೂ","ಬುu":"ಬೂ","ಬ್e":"ಬೇ","ಬi":"ಬೈ","ಬ್o":"ಬೋ","ಬu":"ಬೌ","ಬ್:":"ಬಃ","ಬ:":"ಬಃ","ಬ್O":"ಬ೉","ಬ೉M":"ಬಾಁ","ಬ್E":"ಬ೅","ಬ೅M":"ಬಁ","ಬ್R":"ಬೃ","ಬೃu":"ಬೃ","ಬೃU":"ಬೄ","ಬೃಓo":"ಬೄ","ಬ್M":"ಬಂ","ಬೃl":"ಬೢ","ಬೢu":"ಬೢ","ಬೢU":"ಬೣ","ಬೢಓo":"ಬೣ",';
amhaHash+='"B":"ಬ್","ಬ್h":"ಭ್","ಭ್a":"ಭ","ಭa":"ಭಾ","ಭ್i":"ಭಿ","ಭ್I":"ಭೀ","ಭಿi":"ಭೀ","ಭೇe":"ಭೀ","ಭ್u":"ಭು","ಭ್U":"ಭೂ","ಭೋo":"ಭೂ","ಭುu":"ಭೂ","ಭ್e":"ಭೇ","ಭi":"ಭೈ","ಭ್o":"ಭೋ","ಭu":"ಭೌ","ಭ್:":"ಭಃ","ಭ್a:":"ಭಃ","ಭ್O":"ಭ೉","ಭ೉M":"ಭಾಁ","ಭ್E":"ಭ೅","ಭ೅M":"ಭಁ","ಭೃ":"ಭೃ","ಭೃu":"ಭೃ","ಭೃU":"ಭೄ","ಭೃಓo":"ಭೄ","ಭ್M":"ಭಂ","ಭೃl":"ಭೢ","ಭೢu":"ಭೢ","ಭೢU":"ಭೣ","ಭೢಓo":"ಭೣ","U092DU094D":"ಭ್",';
amhaHash+='"m":"ಮ್","ಮ್a":"ಮ","ಮa":"ಮಾ","ಮ್i":"ಮಿ","ಮ್I":"ಮೀ","ಮಿi":"ಮೀ","ಮೇe":"ಮೀ","ಮ್u":"ಮು","ಮ್U":"ಮೂ","ಮೋo":"ಮೂ","ಮುu":"ಮೂ","ಮ್e":"ಮೇ","ಮi":"ಮೈ","ಮ್o":"ಮೋ","ಮu":"ಮೌ","ಮ್:":"ಮಃ","ಮ:":"ಮಃ","ಮ್O":"ಮ೉","ಮ೉M":"ಮಾಁ","ಮ್E":"ಮ೅","ಮ೅M":"ಮಁ","ಮ್R":"ಮೃ","ಮೃu":"ಮೃ","ಮೃU":"ಮೄ","ಮೃಓo":"ಮೄ","ಮ್M":"ಮಂ","ಮೃl":"ಮೢ","ಮೢu":"ಮೢ","ಮೢU":"ಮೣ","ಮೢಓo":"ಮೣ",';
amhaHash+='"y":"ಯ್","ಯ್a":"ಯ","ಯa":"ಯಾ","ಯ್i":"ಯಿ","ಯ್I":"ಯೀ","ಯಿi":"ಯೀ","ಯೇe":"ಯೀ","ಯ್u":"ಯು","ಯ್U":"ಯೂ","ಯೋo":"ಯೂ","ಯುu":"ಯೂ","ಯ್e":"ಯೇ","ಯi":"ಯೈ","ಯ್o":"ಯೋ","ಯu":"ಯೌ","ಯ್:":"ಯಃ","ಯ:":"ಯಃ","ಯ್O":"ಯ೉","ಯ೉M":"ಯಾಁ","ಯ್E":"ಯ೅","ಯ೅M":"ಯಁ","ಯ್R":"ಯೃ","ಯೃu":"ಯೃ","ಯೃU":"ಯೄ","ಯೃಓo":"ಯೄ","ಯ್M":"ಯಂ","ಯೃl":"ಯೢ","ಯೢu":"ಯೢ","ಯೢU":"ಯೣ","ಯೢಓo":"ಯೣ",';
amhaHash+='"r":"ರ್","ರ್r":"ರ್‍","ರ್a":"ರ","ರa":"ರಾ","ರ್i":"ರಿ","ರ್I":"ರೀ","ರಿi":"ರೀ","ರೇe":"ರೀ","ರ್u":"ರು","ರ್U":"ರೂ","ರೋo":"ರೂ","ರುu":"ರೂ","ರ್e":"ರೇ","ರi":"ರೈ","ರ್o":"ರೋ","ರu":"ರೌ","ರ್:":"ರಃ","ರ:":"ರಃ","ರ್O":"ರ೉","ರ೉M":"ರಾಁ","ರ್E":"ರ೅","ರ೅M":"ರಁ","ರ್M":"ರಂ","ರೢ":"ರೢ","ರೢu":"ರೢ","ರೢU":"ರೣ","ರೢಓo":"ರೣ","ರ್R":"ರೃ","ರೃu":"ರೃ","ರೃU":"ರೄ","ರೃಓo":"ರೄ",';
amhaHash+='"l":"ಲ್","ಲ್a":"ಲ","ಲa":"ಲಾ","ಲ್i":"ಲಿ","ಲ್I":"ಲೀ","ಲಿi":"ಲೀ","ಲೇe":"ಲೀ","ಲ್u":"ಲು","ಲ್U":"ಲೂ","ಲೋo":"ಲೂ","ಲುu":"ಲೂ","ಲ್e":"ಲೇ","ಲi":"ಲೈ","ಲ್o":"ಲೋ","ಲu":"ಲೌ","ಲ್:":"ಲಃ","ಲ:":"ಲಃ","ಲ್O":"ಲ೉","ಲ೉M":"ಲಾಁ","ಲ್E":"ಲ೅","ಲ೅M":"ಲಁ","ಲ್R":"ಲೃ","ಲೃu":"ಲೃ","ಲೃU":"ಲೄ","ಲೃಓo":"ಲೄ","ಲ್M":"ಲಂ","ಲೃl":"ಲೢ","ಲೢu":"ಲೢ","ಲೢU":"ಲೣ","ಲೢಓo":"ಲೣ",';
amhaHash+='"v":"ಭ್","ವ್a":"ವ","ವa":"ವಾ","ವ್i":"ವಿ","ವ್I":"ವೀ","ವಿi":"ವೀ","ವೇe":"ವೀ","ವ್u":"ವು","ವ್U":"ವೂ","ವೋo":"ವೂ","ವುu":"ವೂ","ವ್e":"ವೇ","ವi":"ವೈ","ವ್o":"ವೋ","ವu":"ವೌ","ವ್:":"ವಃ","ವ:":"ವಃ","ವ್O":"ವ೉","ವ೉M":"ವಾಁ","ವ್E":"ವ೅","ವ೅M":"ವಁ","ವ್R":"ವೃ","ವೃu":"ವೃ","ವೃU":"ವೄ","ವೃಓo":"ವೃU","ವ್M":"ವಂ","ವೃl":"ವೢ","\u0935\u0962u":"ವೢ","\u0935\u0962U":"ವೣ","\u0935\u0962ಓo":"ವೣ",';
amhaHash+='"V":"ವ್","w":"ವ್","W":"ವ್","ಸ್h":"ಶ್","ಶ್a":"ಶ","ಶa":"ಶಾ","ಶ್i":"ಶಿ","ಶ್I":"ಶೀ","ಶಿi":"ಶೀ","ಶೇe":"ಶೀ","ಶ್u":"ಶು","ಶ್U":"ಶೂ","ಶೋo":"ಶೂ","ಶುu":"ಶೂ","ಶ್e":"ಶೇ","ಶi":"ಶೈ","ಶ್o":"ಶೋ","ಶu":"ಶೌ","ಶ್:":"ಶಃ","ಶ್a:":"ಶಃ","ಶ್O":"ಶ೉","ಶ೉M":"ಶಾಁ","ಶ್E":"ಶ೅","ಶ೅M":"ಶಁ","ಶ್rR":"ಶರೃ","ಶರೃu":"ಶರೃ","ಶರೃU":"ಶರೄ","ಶರೃoo":"ಶರೄ","ಶ್R":"ಶೃ","ಶೃu":"ಶೃ","ಶೃU":"ಶೄ","ಶೃಓo":"ಶೄ","ಶ್M":"ಶಂ","ಶೃl":"ಶೢ","ಶೢu":"ಶೢ","ಶೢU":"ಶೣ","ಶೢಓo":"ಶೣ","ಶ್h":"ಷ್","ಷ್a":"ಷ","ಷa":"ಷಾ","ಷ್i":"ಷಿ","ಷ್I":"ಷೀ","ಷಿi":"ಷೀ","ಷೇe":"ಷೀ","ಷ್u":"ಷು","ಷ್U":"ಷೂ","ಷೋo":"ಷೂ","ಷುu":"ಷೂ","ಷ್e":"ಷೇ","ಷi":"ಷೈ","ಷ್o":"ಷೋ","ಷu":"ಷೌ","ಷ್:":"ಷಃ","ಷ:":"ಷಃ","ಷ್O":"ಷ೉","ಷ೉M":"ಷಾಁ","ಷ್E":"ಷ೅","ಷ೅M":"ಷಁ","ಷ್R":"ಷೃ","ಷೃu":"ಷೃ","ಷೃU":"ಷೄ","ಷೃಓo":"ಷೄ","ಷ್M":"ಷಂ","ಷೃl":"ಷೢ","ಷೢu":"ಷೢ","ಷೢU":"ಷೣ","ಷೢಓo":"ಷೣ","ಷ್h":"ಷ್",';
amhaHash+='"s":"ಸ್","ಸ್a":"ಸ","ಸa":"ಸಾ","ಸ್i":"ಸಿ","ಸ್I":"ಸೀ","ಸಿi":"ಸೀ","ಸೇe":"ಸೀ","ಸ್u":"ಸು","ಸ್U":"ಸೂ","ಸೋo":"ಸೂ","ಸುu":"ಸೂ","ಸ್e":"ಸೇ","ಸi":"ಸೈ","ಸ್o":"ಸೋ","ಸu":"ಸೌ","ಸ:":"ಸಃ","ಸಾ:":"ಸಃ","ಸ್O":"ಸ೉","ಸ೉M":"ಸಾಁ","ಸ್E":"ಸ೅","ಸ೅M":"ಸಁ","ಸ್R":"ಸೃ","ಸೃu":"ಸೃ","ಸೃU":"ಸೄ","ಸೃಓo":"ಸೄ","ಸ್M":"ಸಂ","ಸೃl":"ಸೢ","ಸೢu":"ಸೢ","ಸೢU":"ಸೣ","ಸೢಓo":"ಸೣ",';
amhaHash+='"S":"ಷ್","h":"ಹ್","ಹ್a":"ಹ","ಹa":"ಹಾ","ಹ್i":"ಹಿ","ಹ್I":"ಹೀ","ಹಿi":"ಹೀ","ಹೇe":"ಹೀ","ಹ್u":"ಹು","ಹ್U":"ಹೂ","ಹೋo":"ಹೂ","ಹುu":"ಹೂ","ಹ್e":"ಹೇ","ಹi":"ಹೈ","ಹ್o":"ಹೋ","ಹu":"ಹೌ","ಹ್:":"ಹಃ","ಹ:":"ಹಃ","ಹ್O":"ಹ೉","ಹ೉M":"ಹಾಁ","ಹ್E":"ಹ೅","ಹ೅M":"ಹಁ","ಹ್R":"ಹೃ","ಹೃu":"ಹೃ","ಹೃU":"ಹೄ","ಹೃಓo":"ಹೄ","ಹ್M":"ಹಂ","ಹೃl":"ಹೢ","ಹೢu":"ಹೢ","ಹೢU":"ಹೣ","ಹೢಓo":"ಹೣ",';
amhaHash+='"L":"ಳ್","ಳ್a":"ಳ","ಳa":"ಳಾ","ಳ್i":"ಳಿ","ಳ್I":"ಳೀ","ಳಿi":"ಳೀ","ಳೇe":"ಳೀ","ಳ್u":"ಳು","ಳ್U":"ಳೂ","ಳೋo":"ಳೂ","ಳುu":"ಳೂ","ಳ್e":"ಳೇ","ಳi":"ಳೈ","ಳ್o":"ಳೋ","ಳu":"ಳೌ","ಳ್:":"ಳಃ","ಳ:":"ಳಃ","ಳ್O":"ಳ೉","ಳ೉M":"ಳಾಁ","ಳ್E":"ಳ೅","ಳ೅M":"ಳಁ","ಳ್R":"ಳೃ","ಳೃu":"ಳೃ","ಳೃU":"ಳೄ","ಳೃಓo":"ಳೄ","ಳ್M":"ಳಂ","ಳೃl":"ಳೢ","ಳೢu":"ಳೢ","ಳೢU":"ಳೣ","ಳೢಓo":"ಳೣ",';
amhaHash+='"x":"ಕ್ಷ್","ಕ್ಷ್a":"ಕ್ಷ","ಕ್ಷa":"ಕ್ಷಾ","ಕ್ಷ್i":"ಕ್ಷಿ","ಕ್ಷ್I":"ಕ್ಷೀ","ಕ್ಷಿi":"ಕ್ಷೀ","ಕ್ಷೇe":"ಕ್ಷೀ","ಕ್ಷ್u":"ಕ್ಷು","ಕ್ಷ್U":"ಕ್ಷೂ","ಕ್ಷೋo":"ಕ್ಷೂ","ಕ್ಷುu":"ಕ್ಷೂ","ಕ್ಷ್e":"ಕ್ಷೇ","ಕ್ಷi":"ಕ್ಷೈ","ಕ್ಷ್o":"ಕ್ಷೋ","ಕ್ಷu":"ಕ್ಷೌ","ಕ್ಷ್:":"ಕ್ಷಃ","ಕ್ಷ:":"ಕ್ಷಃ","ಕ್ಷ್O":"ಕ್ಷ೉","ಕ್ಷ೉M":"ಕ್ಷಾಁ","ಕ್ಷ್E":"ಕ್ಷ೅","ಕ್ಷ೅M":"ಕ್ಷಁ","ಕ್ಷ್R":"ಕ್ಷೃ","ಕ್ಷೃu":"ಕ್ಷೃ","ಕ್ಷೃU":"ಕ್ಷೄ","ಕ್ಷೃಓo":"ಕ್ಷೄ","ಕ್ಷ್M":"ಕ್ಷಂ","ಕ್ಷೃl":"ಕ್ಷೢ","ಕ್ಷೢu":"ಕ್ಷೢ","ಕ್ಷೢU":"ಕ್ಷೣ","ಕ್ಷೢಓo":"ಕ್ಷೣ",';
amhaHash+='"X":"ಕ್ಷ್","ಜ್n":"ಜ್ಞ್","ಗ್y":"ಜ್ಞ್","ಜ್ಞ್a":"ಜ್ಞ","ಜ್ಞa":"ಜ್ಞಾ","ಜ್ಞ್i":"ಜ್ಞಿ","ಜ್ಞ್I":"ಜ್ಞೀ","ಜ್ಞಿi":"ಜ್ಞೀ","ಜ್ಞೇe":"ಜ್ಞೀ","ಜ್ಞ್u":"ಜ್ಞು","ಜ್ಞ್U":"ಜ್ಞೂ","ಜ್ಞೋo":"ಜ್ಞೂ","ಜ್ಞುu":"ಜ್ಞೂ","ಜ್ಞ್e":"ಜ್ಞೇ","ಜ್ಞi":"ಜ್ಞೈ","ಜ್ಞ್o":"ಜ್ಞೋ","ಜ್ಞu":"ಜ್ಞೌ","ಜ್ಞ್:":"ಜ್ಞಃ","ಜ್ಞ್a:":"ಜ್ಞಃ","ಜ್ಞ್O":"ಜ್ಞ೉","ಜ್ಞ೉M":"ಜ್ಞಾಁ","ಜ್ಞ್E":"ಜ್ಞ೅","ಜ್ಞ೅M":"ಜ್ಞಁ","ಜ್ಞ್R":"ಜ್ಞೃ","ಜ್ಞೃu":"ಜ್ಞೃ","ಜ್ಞೃU":"ಜ್ಞೄ","ಜ್ಞೃಓo":"ಜ್ಞೄ","ಜ್ಞ್M":"ಜ್ಞಂ","ಜ್ಞೃl":"ಜ್ಞೢ","ಜ್ಞೢu":"ಜ್ಞೢ","ಜ್ಞೢU":"ಜ್ಞೣ","ಜ್ಞೢಓo":"ಜ್ಞೣ",';
amhaHash+='"a":"ಅ","಑m":"೐","ಅa":"ಆ","A":"ಆ","i":"ಇ","I":"ಈ","ಇi":"ಈ","ಏe":"ಐ","u":"ಉ","ಉu":"ಊ","U":"ಊ","ಓo":"ಔ","e":"ಏ","ಅi":"ಐ","o":"ಓ","ಅu":"ಔ",":":"ಃ","M":"ಂ","ಂM":"ಁ","E":"಍","಍M":"ಅಁ","O":"಑","಑M":"ಆಁ","ಆU":"಑","ಋl":"ೡ","ೡu":"ೡ","R":"ಋ","ಋi":"ಋ","ಋu":"ಋ","ಋU":"ೠ","ಋಓo":"ೠ","ಋI":"ೠ","ಋಇi":"ೠ","ಅ~":"ಽ","q":"೑","೑q":"೒","Q":"೓","೓Q":"೔","J":"಼","K":"಼","C":"॰","|":"೤","೤|":"೥","0":"೦","1":"೧","2":"೨","3":"೩","4":"೪","5":"೫","6":"೬","7":"೭","8":"೮","9":"೯"}';
// for compatibility with bookmarklets
function cyr_translit(src) {
	return to_cyrillic(src);
}
var conversionHash = undefined;
var maxcyrlength = 0;
function getConversionHash() {
	if (conversionHash == undefined) {
		conversionHash = eval("("+amhaHash+")");
		 maxcyrlength=6;
	}
	return conversionHash;
}
function to_cyrillic(src, output, chunks) {
	if (src == undefined || src == "" || src == null)
		return src;
	if (output == undefined)
		output = new String();
	var hash = getConversionHash();
	
	var location = 0;
	
	while (location < src.length) {
		var len = Math.min(maxcyrlength, src.length - location);
		var arr = undefined;
		var sub;
		while (len > 0) {
			sub = src.substr(location, len);
			arr = hash[sub];
			if (arr != undefined) 
				break;
			else 
				len--;
		}
		
		// need this for translit on the fly
		if (chunks != undefined)
			chunks[chunks.length] = sub;
			
		if (arr == undefined) {
			output += sub;
			location ++;
		}
		else {
			// case analysis
			var newChar = arr;
			
			if (sub.toLowerCase() == sub.toUpperCase() && arr.length > 1 && arr[1] && (newChar.toUpperCase() != newChar.toLowerCase())) {
			
				// need translit hash to determine if previous character (and possibly the one before it) 
				// were converted and are in upper case
				
				// set prevDud to true previous is not a translated character or simply a blank
				// set prevCap to true if previous was translated and was upper case
				var prevCh = output.length == 0 ? null : output.substr(output.length - 1, 1);
				var prevDud = !prevCh || !getTranslitString(prevCh);
				var prevCap = (!prevDud && prevCh == prevCh.toUpperCase());
				// sub is caseless but result isn't. case will depend on lookbehind and lookahead
				if (prevDud || !prevCap) {
					output += newChar.toLowerCase();
					prevCap = false;
				}
				else {
					var next = " ";
					if (location + len < src.length)
						next = src.substr(location + len, 1);
					if (next != next.toUpperCase() && next == next.toLowerCase() ) {
						//next is lowercase (and not caseless)
						output += newChar.toLowerCase();
					}
					else if (next == next.toUpperCase() && next != next.toLowerCase() ) {
						// next is uppercase (and not caseless)
						output += newChar.toUpperCase();
					}
					else {
						// next is caseless. output case determined by the case of output[length - 2]
						var pprevCh = output.length == 1 ? null : output.substr(output.length - 2, 1);
						var pprevDud = !pprevCh || !getTranslitString(pprevCh);
						if (!pprevDud && (pprevCh == pprevCh.toUpperCase())) {
							//pre-prev is in upper case. output is also uppercase
							output += newChar.toUpperCase();
						}
						else {
						    output += newChar.toLowerCase();
						}
						
					}
				}
					
			}
			else if ((sub.toLowerCase() == sub.toUpperCase()) && (arr.length < 2 || !arr[1])) {
				
				// literal treatment of newChar
				output += newChar;
			}
			else if (sub != sub.toLowerCase()) {
			
				// sub not all-lowercase
				output += newChar.toUpperCase();
			}
			else {
					
					
					
				// sub is lowercase
			    output += newChar.toLowerCase();
			}
			location += len;
		}
	}
	
	return output;
}
function convertIt(src,converter){
 var resultbuffer=""; 
	for(var i=0;i<src.length;i++){
	resultbuffer=converter(resultbuffer+src[i]);
	}
        return converter(resultbuffer);
}
var translitHash = undefined;
function initTranslit() {
	if (translitHash == undefined) {
		translitHash = new Array();
		for (var i = 0; i < conversionHash.length; i++) {
			var ch = conversionHash[i][1];
			// if the translit string is not caseless, convert cyr string to upper case
			// otherwise maintain its case
			if (conversionHash[i][0].toUpperCase() != conversionHash[i][0].toLowerCase())
				ch = ch.toUpperCase();
				
			if (translitHash[ch] == undefined)
				translitHash[ch] = conversionHash[i][0];
		}
	}
}
//-- translit on-the-fly -- 
function replaceValue(node, value, stepback) {
	if (stepback == undefined)
		stepback = 0;
		
	if (isExplorer()) {
		var range = document.selection.createRange();
		range.moveStart("character", -stepback);
		range.text = value;
		range.collapse(false);
		range.select();
	}
	else {
		var scrollTop = node.scrollTop;
		var cursorLoc =  node.selectionStart;
		node.value = node.value.substring(0, node.selectionStart - stepback) + value + 
                node.value.substring(node.selectionEnd, node.value.length);
		node.scrollTop = scrollTop;
		node.selectionStart = cursorLoc + value.length - stepback;
		node.selectionEnd = cursorLoc + value.length - stepback;
	}
}
// compare positions
function positionIsEqual(other) {
	if (isExplorer())
		return this.position.isEqual(other.position);
	else
		return this.position == other.position;
  
}
function Position(node) {
  if (node.selectionStart != undefined)
	this.position = node.selectionStart;
  else if (document.selection && document.selection.createRange())
    this.position = document.selection.createRange();
    
  this.isEqual = positionIsEqual;
}
function resetState() {
	this.position = new Position(this.node);
	this.transBuffer = "";
	this.cyrBuffer = "";
}
function StateObject(node) {
	this.node = node;
	this.reset = resetState;
	this.cyrBuffer = "";
	this.transBuffer = "";
	this.position = new Position(node);
}
var stateHash = new Array();
function isExplorer() {
  return (document.selection != undefined && document.selection.createRange().isEqual != undefined);
}
function pressedKey(event) {
  if (isExplorer())
	return event.keyCode;
  else
    return event.which;
}
function translitonkey(event) {
     /*
	if ((event.keyCode == 255 && event.charCode > 0) || event.keyCode == 8) {
		return;
	}
    */
    
    if (event == undefined)
		event = window.event;
    
	var node = null;
	if (event.target)
		node = event.target;
	else if (event.srcElement)
		node = event.srcElement;
		
	
	
	// initialize state
	var state = stateHash[node];
	if (state == null) {
		state = new StateObject(node);
		stateHash[node] = state;
	}
	if ( (pressedKey(event) > 20) && !event.ctrlKey && !event.altKey && !event.metaKey) {
		var c = String.fromCharCode(pressedKey(event));
		// process input
		var result = process_translit(state, c);
		// finish up
		if (c != result.out || result.replace != 0) {
		  if (isExplorer())
			event.returnValue = false;
		  else
		    event.preventDefault();
		  
		  replaceValue(node, result.out, result.replace);
		  
		  state.position = new Position(node);
		}
	}
	
}
function TranslitResult() {
	this.out = "";
	this.replace = 0;
}
function process_translit(state, c) {
	// reset state if position changed
	if (!state.position.isEqual(new Position(state.node)))
		state.reset();
		
	var result = new TranslitResult();
	
	// initial backbuffer. Add to it as characters are converted
	var backbuffer = getBackBuffer(state.node, state.cyrBuffer.length, 2);
	var chunks = new Array();
	
	state.transBuffer = state.transBuffer+ c
	var str = to_cyrillic(state.cyrBuffer+c, backbuffer, chunks);
	// remove backbuffer from output
	str = str.substr(backbuffer.length);
	result.out = str; 
	/* str is now left alone - it has the output matching contents of chunks and 
	   will be used to reinitialize backbuffers, along with chunks and state.transBuffer
	*/
	
	// get the difference between state.cyrBuffer and output
	for (var i = 0; i < Math.min(state.cyrBuffer.length, result.out.length); i++) {
		if (state.cyrBuffer.substr(i, 1) != result.out.substr(i, 1)) {
			result.replace = state.cyrBuffer.length - i;
			result.out = result.out.substr(i);
			break;
		}
	}
	if (result.replace == 0) {
               if(result.out.length<state.cyrBuffer.length)
				result.replace=state.cyrBuffer.length- result.out.length;
		result.out = result.out.substr(Math.min(state.cyrBuffer.length, result.out.length));
                 
                       //    result.out+="\u0008"
                         
	}
	
	// update state: backbuffer, bufferArray
	if (chunks.length > 0 && chunks[chunks.length - 1] == result.out.substr(result.out.length - 1)) {
		// no convertion took place, reset state
		state.reset();
	}
	else {
		while (state.transBuffer.length > maxcyrlength) {
			state.transBuffer = state.transBuffer.substr(chunks[0].length);
			chunks.shift();
			str = str.substr(1);
		}
		state.cyrBuffer = str;
	}
	return result;
}
function getBackBuffer(node, offset, count) {
		
	if (isExplorer()) { //.tagName.toUpperCase() == "EDITOR") {
	
		var range = document.selection.createRange();
		range.moveStart("character", -offset);
		var result = range.text.substr(-count);
		if (!result)
			result = "";
			
		return result;
	} else {
		return node.value.substring(0, node.selectionStart - offset).substr(-count);
	}
}
// need this for bookmarklets
function getSelectedNode() {
  if (document.activeElement)
	return document.activeElement;
  else
    if (window.getSelection && window.getSelection() && window.getSelection().rangeCount > 0) {
		var range = window.getSelection().getRangeAt(0);
		if (range.startContainer && range.startContainer.childNodes && range.startContainer.childNodes.length > range.startOffset)
			return range.startContainer.childNodes[range.startOffset]
    }
  return null;
}
function toggleCyrMode() {
	var node = getSelectedNode();
	if (node) {
		if (stateHash[node]) {
			if (removeKeyEventListener(node))
				delete stateHash[node];
		}
		else {
			if (addKeyEventListener(node))
				stateHash[node] = new StateObject(node);
		}
	}
}
function addKeyEventListener(node) {
	if (node.addEventListener)
		node.addEventListener("keypress", translitonkey, false);
	else if (node.attachEvent)
	    node.attachEvent("onkeypress", translitonkey);
	else return false;
	return true;
}
function removeKeyEventListener(node) {
	if (node.removeEventListener)
		node.removeEventListener("keypress", translitonkey, false);
	else if (node.detachEvent)
		node.detachEvent("onkeypress", translitonkey);
	else return false;
	return true;
}
function getSelectedText() {
	if (isExplorer()) {
		return document.selection.createRange().text;
	}
	else {
		var node = getSelectedNode();
		if (node && node.value && node.selectionStart != undefined && node.selectionEnd != undefined)
			return node.value.substring(node.selectionStart, node.selectionEnd);
	}
	return "";
}
thread_title:  unknown