﻿//  ~~~~~~~~~~ Interface for the Vietnamese JavaScript Input Editor, VietJie ~~~~~~~~~~~
//This is an interface for the radio buttons and Vietnamese brief typing instruction
// Important note: Saving this file to normal text format will make the text unreadable
// If you edit the file, save it to UTF-8 format to preserve the Vietnamese characters
// You are free to use VietJie as long as the name & url of Vovisoft are intact
// Vovisot www.vovisoft.com is a non profit organisation located in Australia 
// Please help to promote our devotion to doing something for our people

var Englishrule = ""; 
Englishrule += "<div align='center'><center>";
Englishrule += "<table align='center' border='0' width='486'>";
Englishrule += "<tr><td><img border='0' src='images/off.gif' width='484' height='45'>";
Englishrule += "</td></tr></table></div>";

var VIQR2Uni = ""; 
VIQR2Uni += "<P><font face='Arial' size='1' color='#0000FF'>Chuyển dạng chữ VIQR thành Unicode...</font></P>";

var Uni2VIQR = ""; 
Uni2VIQR += "<P><font face='Arial' size='1' color='#0000FF'>Chuyển từ Unicode thành dạng chữ VIQR...</font></P>";

var VNIrule = "";
VNIrule += "<div align='center'><center>";
VNIrule += "<table align='center' border='0' width='486'>";
VNIrule += "<tr><td><img border='0' src='images/vni.gif' width='484' height='45'>";
VNIrule += "</tr></table></center></div>";

var VIQRrule = "";
VIQRrule += "<div align='center'><center>";
VIQRrule += "<table align='center' border='0' width='486'>";
VIQRrule += "<tr><td><img border='0' src='images/viqr.gif' width='484' height='45'>";
VIQRrule += "</tr></table></center></div>";

var Telexrule = "";
Telexrule += "<div align='center'><center>";
Telexrule += "<table align='center' border='0' width='486'>";
Telexrule += "<tr><td><img border='0' src='images/telex.gif' width='484' height='45'>";
Telexrule += "</tr></table></center></div>";

function ctrl() {
var prefix = '';
	if (window.event.shiftKey) prefix = 's'; 
	if (window.event.ctrlKey) prefix = 'c'; 
    	if (window.event.altKey) prefix = 'a';
	return prefix;
}

function selectedBtn(btnGroup){
	for (var i = 0; i < btnGroup.length; i++) {
		if (btnGroup[i].checked) {
			return i
		}
	}
	return 0
}

function cycle(myForm) {
	var i = selectedBtn(myForm.tmode)
	if (i+1 == myForm.tmode.length) {
		myForm.tmode[0].checked = true;
		TypingMode(0);
	} else {
		myForm.tmode[i+1].checked = true;
		TypingMode(i+1);
	}
}

