亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vietuni.js

?? 免費的java企業級論壇可執行程序
?? JS
字號:
/*vietuni.js - V.1.618 - R.11.11.01 @QDJTGSLLA@P*Veni*Vidi*Vici*
* by Tran Anh Tuan [tuan@physik.hu-berlin.de]
* Copyright (c) 2001, 2002 AVYS e.V.. All Rights Reserved.
*
* Originally published and documented at http://www.avys.de/
* You may use this code without fee on noncommercial web sites.
* You may NOT alter the code and then call it another name and/or resell it.
* The copyright notice must remain intact on srcipts.
*/

// interface for HTML:
//

// Fix Safari bug, not sure the correct problem
var agt=navigator.userAgent.toLowerCase();
var supported = (document.all || document.getElementById) && (agt.indexOf('safari') == -1) && (agt.indexOf('konqueror') == -1);
//var supported = (document.all || document.getElementById);

var disabled = false;
var charmapid = 1;
var keymodeid = 0;
var linebreak = 0;
var theTyper = null;

reset = function(){}
initTyper = telexingVietUC;

function getVNTyperMode() {
  var vnTyperMode = "";
  var VNTYPER_MODE = "mvnforum.vntypermode";// defined in Mvnforum's Constants
  //alert("COOKIES" +document.cookie);
  if(document.cookie) {
    start = document.cookie.indexOf(VNTYPER_MODE);
    if (start != -1) {
      // get the start index of vntypermode's value
      from = start;
      start = document.cookie.indexOf("=", from) + 1;
      from = start;
      end = document.cookie.indexOf(";", from);
      if (end == -1) { // in case "mvnforum.vntypermode" is the last element
        end = document.cookie.length;
      }
      vnTyperMode = document.cookie.substring(start, end);
      //alert("VN TYPER MODE " + vnTyperMode);
    }
  }
  return vnTyperMode;
}

function initVNTyperMode() {
  vnTyperMode = getVNTyperMode();
  if ( vnTyperMode == "VNI" ) {
    setTypingMode(2);
  } else if ( vnTyperMode == "VIQR") {
    setTypingMode(3);
  } else if ( vnTyperMode == "TELEX") {
    setTypingMode(1);
  } else if ( vnTyperMode == "NOVN") {
    setTypingMode(0);
  } else {
    setTypingMode(2);
    vnTyperMode = "VNI";
  }
  id = document.getElementById(vnTyperMode);
  //alert("ID = " + id.value);
  if (id != null) id.checked = true;
}

function setTypingMode(mode) {
  keymodeid = mode;
  if (theTyper) theTyper.keymode= initKeys();
  if (!supported && !disabled) {
    alert("Xin loi, trinh duyet web cua ban khong cho phep dung VietTyping.\n");
    disabled = true;
  }
}

initCharMap = function() { return new CVietUniCodeMap(); }

initKeys = function() {
  switch (keymodeid) {
    case 1: return new CTelexKeys();
    case 2: return new CVniKeys();
    case 3: return new CViqrKeys();
    case 4: return new CAllKeys();
    default: return new CVKOff();
  }
}

function telexingVietUC (txtarea) {
  txtarea.vietarea= true;
  txtarea.onkeyup= null;
  if (!supported) return;
  txtarea.onkeypress= vietTyping;
  txtarea.getCurrentWord= getCurrentWord;
  txtarea.replaceWord= replaceWord;
  txtarea.onkeydown= onKeyDown;
  txtarea.onmousedown= onMouseDown;
  if(!theTyper) theTyper = new CVietString("");
}

function getEvt(evt) {
  if (typeof(evt)=='string') return evt.charCodeAt(0);
  return document.all? event.keyCode: (evt && evt.which)? evt.which: 0;
}

function onKeyDown(evt) {
  var c= getEvt(evt);
  if ((c==10) || (c==13)) { reset(1); linebreak= 1; }
  else if ((c<49) && (c!=16) && (c!=20)) { linebreak= 0; reset(c==32); }
  return true;
}

function onMouseDown(evt) { reset(0); linebreak= 0; return true; }

function vietTyping(evt) {
  var c= getEvt(evt);
  theTyper.value= this.getCurrentWord();
  var changed= ((c>32) && theTyper.typing(c));
  if (changed) this.replaceWord(theTyper.value);
  return !changed;
}

function getCurrentWord() {
  if(!document.all) return this.value;
  var caret = this.document.selection.createRange();
  if (caret.text) return null;
  var backward = -10;
  do {
    var caret2 = caret.duplicate();
    caret2.moveStart("character", backward++);
  } while (caret2.parentElement() != this && backward <0);
  this.curword = caret2.duplicate();
  return caret2.text;
}

function replaceWord(newword) {
  if(!document.all) { this.value= newword; return; }
  this.curword.text = newword;
  this.curword.collapse(false);
}
// end interface


// "class": CVietString
//
function CVietString(str) {
  this.value= str;
  this.keymode= initKeys();
  this.charmap= initCharMap();
  this.ctrlchar= '-';
  this.changed= 0;

  this.typing= typing;
  this.Compose= Compose;
  this.Correct= Correct;
  this.findCharToChange= findCharToChange;
  return this;
}

function typing(ctrl) {
  this.changed = 0;
  this.ctrlchar = String.fromCharCode(ctrl);
  if (linebreak) linebreak= 0; else this.keymode.getAction(this);
  this.Correct();
  return this.changed;
}

function Compose(type) {
  if(!this.value) return;
  var info = this.findCharToChange(type);
  if (!info || !info[0]) return;
  var telex;
  if (info[0]=='\\') telex= [1,this.ctrlchar,1];
  else if (type>6) telex= this.charmap.getAEOWD(info[0], type, info[3]);
  else telex= this.charmap.getDau(info[0], type);
  if (!(this.changed = telex[0])) return;
  this.value = this.value.replaceAt(info[1],telex[1],info[2]);
  if (!telex[2]) { spellerror= 1; this.value+= this.ctrlchar; }
}

function Correct() {
  if (this.charmap.maxchrlen || !document.all) return 0;
  var tmp= this.value;
  if ('nNcC'.indexOf(this.ctrlchar)>=0) tmp+= this.ctrlchar;
  var er= /[^\x01-\x7f](hn|hc|gn)$/i.exec(tmp);
  if (er) {
    this.value= tmp.substring(0,tmp.length-2)+er[1].charAt(1)+er[1].charAt(0);
    this.changed= 1;
  }
  else if(!this.changed) return 0;
  er= /\w([^\x01-\x7f])(\w*)([^\x01-\x7f])\S*$/.exec(this.value);
  if (!er) return 0;
  var i= this.charmap.isVowel(er[1]);
  var ri= (i-1)%24 + 1, ci= (i-ri)/24;
  var i2= this.charmap.isVowel(er[3]);
  if (!ci || !i2) return 0;
  var ri2= (i2-1)%24 + 1, ci2= (i2-ri2)/24;
  var nc= this.charmap.charAt(ri)+ er[2]+ this.charmap.charAt(ci*24+ri2);
  this.value= this.value.replace(new RegExp(er[1]+er[2]+er[3],'g'), nc);
}

function findCharToChange(type) {
  var lastchars= this.charmap.lastCharsOf(this.value, 5);
  var i= 0, c=lastchars[0][0], chr=0;
  if (c=='\\') return [c,this.value.length-1,1];
  if (type==15) while (!(chr=this.charmap.isVD(c))) {
    if ((c < 'A') || (i>=4) || !(c=lastchars[++i][0])) return null;
  }
  else while( "cghmnptCGHMNPT".indexOf(c)>=0) {
    if ((c < 'A') || (i>=2) || !(c=lastchars[++i][0])) return null;
  }
  c = lastchars[0][0].toLowerCase();
  var pc = lastchars[1][0].toLowerCase();
  var ppc = lastchars[2][0].toLowerCase();
  if (i==0 && type!=15) {
    if ( (chr=this.charmap.isVowel(lastchars[1][0]))
      && ("uyoia".indexOf(c)>=0) && !this.charmap.isUO(pc,c)
      && !((pc=='o' && c=='a') || (pc=='u' && c=='y'))
      && !((ppc=='q' && pc=='u') || (ppc=='g' && pc=='i')) ) ++i;
    if (c=='a' && (type==9 || type==7)) i= 0;
  }
  c= lastchars[i][0];
  if ((i==0 || chr==0) && type!=15) chr= this.charmap.isVowel(c);
  if (!chr) return null;
  var clen= lastchars[i][1], isuo=0;
  if ((i>0) && (type==7 || type==8 || type==11)) {
    isuo=this.charmap.isUO(lastchars[i+1][0],c);
    if (isuo) { chr=isuo; clen+=lastchars[++i][1]; isuo=1; }
  }
  var pos= this.value.length;
  for (var j=0; j<= i; j++) pos -= lastchars[j][1];
  return [chr, pos, clen, isuo];
}
// end CVietString


// character-map template
//
function CVietCharMap(){
  this.vietchars = null;
  this.length = 149;
  this.chr_cache = new Array(20);
  this.ind_cache = new Array(20);
  this.cptr = 0;
  this.caching= function(chr, ind) {
    this.chr_cache[this.cptr] = chr;
    this.ind_cache[this.cptr++] = ind;
    this.cptr %= 20;
  }
  return this;
}

CVietCharMap.prototype.charAt= function(ind){
  var chrcode = this.vietchars[ind];
  return chrcode ? String.fromCharCode(chrcode) : null;
}

CVietCharMap.prototype.isVowel= function(chr){
  var i = 0;
  while ((i<20) && (chr != this.chr_cache[i])) ++i;
  if (i<20) return this.ind_cache[i];

  i = this.length-5;
  while ((chr != this.charAt(i)) && i) --i;
  this.caching(chr, i);
  return i;
}

CVietCharMap.prototype.isVD= function (chr){
  var ind = this.length-5;
  while ((chr != this.charAt(ind)) && (ind < this.length)) ++ind;
  return (ind<this.length)? ind: 0;
}

CVietCharMap.prototype.isUO= function (c1, c2){
  if (!c1 || !c2) return 0;
  var ind1 = this.isVowel(c1);
  var ci = (ind1-1)%12;
  if ((ci!=9) && (ci!=10)) return 0;
  var ind2 = this.isVowel(c2);
  ci = (ind2-1)%12;
  if ((ci!=6) && (ci!=7) && (ci!=8)) return 0;
  return [ind1,ind2];
}

CVietCharMap.prototype.getDau= function (ind, type){
  var accented= (ind < 25)? 0: 1;
  var ind_i= (ind-1) % 24 +1;
  var charset= (type == 6)? 0 : type;
  if ((type== 6) && !accented) return [0];
  var newind= charset*24 + ind_i;
  if (newind == ind) newind= ind_i;
  var chr= this.charAt(newind);
  if (!chr) chr= this.lowerCaseOf(0,newind);
  return [1, chr, newind>24 || type==6];
}

var map=[
[7,7,7,8,8, 8,9,10,11,15],
[0,3,6,0,6, 9,0, 3, 6, 0],
[1,4,7,2,8,10,1, 4, 7, 1]
];
CVietCharMap.prototype.getAEOWD= function(ind, type, isuo) {
  var c=0, i1=isuo? ind[0]: ind;
  var vc1= (type==15)? (i1-1)%2 : (i1-1)%12;
  if (isuo) {
    var base= ind[1]-(ind[1]-1)%12;
    if (type==7 || type==11) c= this.charAt(i1-vc1+9)+this.charAt(base+7);
    else if (type==8) c= this.charAt(i1-vc1+10)+this.charAt(base+8);
    return [c!=0, c, 1];
  }
  var i= -1, shift= 0, del= 0;
  while (shift==0 && ++i<map[0].length) {
    if (map[0][i]==type) {
      if(map[1][i]==vc1) shift= map[2][i]-vc1;
      else if(map[2][i]==vc1) shift= map[1][i]-vc1;
    }
  }
  if (shift==0) {
    if (type==7 && (vc1==2 || vc1==8)) shift=-1;
    else if ((type==9 && vc1==2) || (type==11 && vc1==8)) shift=-1;
    else if (type==8 && (vc1==1 || vc1==7)) shift=1;
    del= 1;
  } else del=(shift>0);
  i1 += shift;
  var chr= this.charAt(i1);
  if (i1<145) this.caching(chr, i1);
  if (!chr) chr= this.lowerCaseOf(0, i1);
  return [shift!=0, chr, del];
}

CVietCharMap.prototype.lastCharsOf= function(str, num){
  if (!num) return [str.charAt(str.length-1),1];
  var vchars = new Array(num);
  for (var i=0; i< num; i++) { vchars[i]= [str.charAt(str.length-i-1),1]; }
  return vchars;
}
// end CVietCharMap prototype


String.prototype.replaceAt= function(i,newchr,clen){
  return this.substring(0,i)+ newchr + this.substring(i+clen);
}

// output map: class CVietUniCodeMap
//
function CVietUniCodeMap(){ var map= new CVietCharMap();
map.vietchars = new Array(
"UNICODE",
97, 226, 259, 101, 234, 105, 111, 244, 417, 117, 432, 121,
65, 194, 258, 69, 202, 73, 79, 212, 416, 85, 431, 89,
225, 7845, 7855, 233, 7871, 237, 243, 7889, 7899, 250, 7913, 253,
193, 7844, 7854, 201, 7870, 205, 211, 7888, 7898, 218, 7912, 221,
224, 7847, 7857, 232, 7873, 236, 242, 7891, 7901, 249, 7915, 7923,
192, 7846, 7856, 200, 7872, 204, 210, 7890, 7900, 217, 7914, 7922,
7841, 7853, 7863, 7865, 7879, 7883, 7885, 7897, 7907, 7909, 7921, 7925,
7840, 7852, 7862, 7864, 7878, 7882, 7884, 7896, 7906, 7908, 7920, 7924,
7843, 7849, 7859, 7867, 7875, 7881, 7887, 7893, 7903, 7911, 7917, 7927,
7842, 7848, 7858, 7866, 7874, 7880, 7886, 7892, 7902, 7910, 7916, 7926,
227, 7851, 7861, 7869, 7877, 297, 245, 7895, 7905, 361, 7919, 7929,
195, 7850, 7860, 7868, 7876, 296, 213, 7894, 7904, 360, 7918, 7928,
100, 273, 68, 272);
return map;
}

// input methods: class C...Keys
function CVietKeys() {
  this.getAction= function(typer){
    var i= this.keys.indexOf(typer.ctrlchar.toLowerCase());
    if(i>=0) typer.Compose(this.actions[i]);
  }
  return this;
}

function CVKOff() {
  this.off = true;
  this.getAction= function(){};
  return this;
}

function CTelexKeys() {
  var k= new CVietKeys();
  k.keys= "sfjrxzaeowd";
  k.actions= [1,2,3,4,5,6,9,10,11,8,15];
  k.istelex= true;
  return k;
}

function CVniKeys() {
  var k= new CVietKeys();
  k.keys= "0123456789";
  k.actions= [6,1,2,4,5,3,7,8,8,15];
  return k;
}

function CViqrKeys() {
  var k= new CVietKeys();
  k.keys= "\xB4/'\u2019`.?~-^(*+d";
  k.actions= [1,1,1,1,2,3,4,5,6,7,8,8,8,15];
  return k;
}

function CAllKeys() {
  var k= new CVietKeys();
  k.keys= "sfjrxzaeowd0123456789\xB4/'`.?~-^(*+d";
  k.actions= [1,2,3,4,5,6,9,10,11,8,15,6,1,2,4,5,3,7,8,8,15,1,1,1,2,3,4,5,6,7,8,8,8,15];
  k.istelex= true;
  return k;
}

// end vietuni.js

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品自拍偷拍| 日韩电影在线一区| 欧美aaaaa成人免费观看视频| 国产酒店精品激情| 欧美挠脚心视频网站| 中文字幕av一区二区三区免费看| 亚洲电影中文字幕在线观看| 国产不卡视频在线播放| 日韩精品专区在线影院重磅| 亚洲女同ⅹxx女同tv| 国产精品资源站在线| 91精品午夜视频| 一区二区在线观看不卡| 成人性视频网站| 精品国产乱码久久久久久闺蜜| 亚洲h精品动漫在线观看| 91老司机福利 在线| 欧美国产精品一区二区| 极品少妇xxxx精品少妇| 欧美精品粉嫩高潮一区二区| 亚洲美女在线国产| 91美女精品福利| 中文字幕一区二区三区蜜月 | 欧美精品v国产精品v日韩精品 | 日韩美女一区二区三区四区| 亚洲国产精品久久不卡毛片| 91亚洲国产成人精品一区二三| 久久综合久久久久88| 亚洲国产aⅴ成人精品无吗| 成人av影视在线观看| 国产精品无圣光一区二区| 国产精品99久久久| 国产欧美精品日韩区二区麻豆天美| 精品一二三四区| 欧美精品一区视频| 国产精品一区二区在线看| 精品伦理精品一区| 黄页网站大全一区二区| 精品国精品国产| 国产91精品久久久久久久网曝门| 久久综合久久久久88| 粉嫩久久99精品久久久久久夜| 国产亚洲美州欧州综合国| 欧美日韩国产bt| 日本va欧美va精品| 久久久久久一级片| 粉嫩一区二区三区在线看| 日本一区二区三区四区在线视频 | 欧美色综合网站| 偷拍一区二区三区| 日韩一区二区中文字幕| 色综合久久久久综合99| 国产精品的网站| 欧美日韩免费观看一区二区三区| 日韩精品久久久久久| 精品国产一二三区| 北岛玲一区二区三区四区| 亚洲最色的网站| 欧美一级二级在线观看| 国产a久久麻豆| 亚洲h精品动漫在线观看| 欧美mv和日韩mv的网站| 成人精品视频一区二区三区| 一区二区三区美女视频| 欧美一级理论性理论a| 国产一区不卡在线| 亚洲综合视频网| 欧美mv日韩mv国产网站app| 97精品电影院| 美女脱光内衣内裤视频久久网站| 久久久99精品久久| 欧美日韩精品一区二区三区四区| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲天堂精品视频| 日韩欧美一卡二卡| 91视频.com| 国产福利一区二区三区在线视频| 一区二区三区在线视频观看58| 91精品国产综合久久久久久久| 成人妖精视频yjsp地址| 青草av.久久免费一区| 中文字幕欧美一| 精品欧美一区二区三区精品久久| www.爱久久.com| 精品一区二区三区香蕉蜜桃| 自拍av一区二区三区| 精品国产自在久精品国产| 在线观看一区二区视频| 丁香亚洲综合激情啪啪综合| 亚洲午夜av在线| 中文字幕一区二区三区不卡| 日韩一级完整毛片| 欧美中文字幕不卡| 播五月开心婷婷综合| 国产一区二区在线看| 午夜不卡av免费| 一区二区日韩av| 亚洲精品一卡二卡| 亚洲欧洲色图综合| 中文字幕不卡在线播放| 久久综合九色综合久久久精品综合| 欧美精品三级日韩久久| 91国偷自产一区二区三区成为亚洲经典 | 欧美国产日韩亚洲一区| 国产精品美女久久久久高潮| 一本色道亚洲精品aⅴ| 韩日欧美一区二区三区| 亚洲777理论| 亚洲综合激情另类小说区| 国产精品福利影院| 国产午夜精品久久久久久久| 精品对白一区国产伦| 日韩欧美第一区| 欧美大片国产精品| 欧美一区二区在线播放| 欧美二区乱c少妇| 91精品欧美综合在线观看最新| 欧美日韩在线播| 欧美优质美女网站| 欧美日韩一区小说| 欧美日韩的一区二区| 91精品免费观看| 日韩欧美成人一区| 亚洲mv在线观看| 久久97超碰国产精品超碰| 精品久久免费看| 一区二区国产视频| 亚洲激情在线激情| 国产女同性恋一区二区| 国产午夜精品美女毛片视频| 日韩成人一级片| 美女任你摸久久| 国产成人av影院| 91欧美一区二区| 欧美无乱码久久久免费午夜一区 | 91在线无精精品入口| 91美女在线视频| 69堂国产成人免费视频| 亚洲精品在线三区| 中文字幕一区二区三| 亚洲一区二区中文在线| 免费成人小视频| 成人高清免费观看| 欧美丝袜丝交足nylons| 欧美刺激脚交jootjob| 日本一区二区三区免费乱视频| 国产精品视频观看| 婷婷六月综合网| 国产二区国产一区在线观看| 色综合婷婷久久| 日韩一区二区三免费高清| 欧美激情一区二区| 石原莉奈在线亚洲二区| 国产成人亚洲综合a∨婷婷图片 | 99久久精品费精品国产一区二区| 91豆麻精品91久久久久久| 精品少妇一区二区三区日产乱码 | 久久久综合激的五月天| 亚洲色图视频免费播放| 日韩电影在线观看网站| 99re在线精品| 精品久久久久久久人人人人传媒| 综合激情成人伊人| 精品系列免费在线观看| 在线视频你懂得一区二区三区| 欧美一二区视频| 亚洲国产一区二区视频| 国产高清不卡一区二区| 欧美一区二区三区视频免费播放| 中文字幕在线观看一区| 国产一区二区不卡在线| 欧美浪妇xxxx高跟鞋交| 中文字幕在线播放不卡一区| 精品免费视频一区二区| 婷婷开心激情综合| 精品一区二区三区欧美| 欧美成人性战久久| 亚洲精品中文在线影院| 国产精品亚洲成人| 日韩免费高清电影| 亚洲一区在线电影| 91亚洲精品久久久蜜桃| 国产欧美一区二区精品仙草咪| 麻豆成人在线观看| 欧美日韩一区二区三区视频| 亚洲伦理在线免费看| 成人激情开心网| 国产人成亚洲第一网站在线播放 | 日韩vs国产vs欧美| 91小视频在线观看| 久久久久99精品一区| 久久成人av少妇免费| 这里只有精品视频在线观看| 亚洲第一久久影院| 91黄视频在线| 亚洲成人高清在线| 欧美日韩不卡在线| 午夜精品福利一区二区三区av| www.视频一区| 国产丶欧美丶日本不卡视频|