
cCR = new Array(
"tth,ww,wk,tat,w/,ttu",
"hkwit,hiaaw,thuiw,thoua,thuwi,thoua",
"thuoi,thoho,thuiw,thuoh,thukk",
"io%ha,th%wu,hakkw,%auwo",
"%auh%,%hkku",
"%auh%,ho//u",
"haah/,th%wu,hiwkw,hthaw,th%wt,th%//",
"thuww,thu/h,thuw%,thu/%,thuku,thoua,thoh%",
"h%u%%,hakua,th%wo,thuha,th%/w,thuh/",
"th%ih,%/%hw,thu%u,hwwk%,thuti",
"th%ou,th%wu,th%k%,th%wk,thuw/,thu//,thui/,tho%t",
"th%ou,th%wu,th%k%,th%wk,thuw/,thoh/,thoua",
"hauto,hta%%,h%ih/,th%wt,th%//",
"%tttw,h/kta,th%/%,thu%o,th%wh,th%ih,htuot,%iwuk",
"thuit,thoto,thuk%,thu/t,thot/,thuwi,thuk%,thui%",
"htuou,hak%/,th%wo,th%wu,th%k/,th%wa,th%oi,thuh/",
"tak,ttt,tak,ui,tti,ttt",
"taa,tat,ttk,tao,tak,tha,tti",
"thuiw,thuoh,thukw,thuww,thu/h,thuw%,thu/%",
"thuiu,thoho,thoua,thuwi,thoh%,thohu,thoak,thohh,thot/,thoua,thu/t,thotw,tho%t",
"%%hok,h%uhw,th%wt,hatkt,hata/",
"%ia%w,hiaaw,%oo%t,h//tu",
"hi%ik,%wiua,th%wk,thoht,thuoh,thoat,thu/%,thu/w,thuoh,thoh%",
"tat,uo,tto,ttt,tau,ttt,ui,tta,tat,tti",
"h%u%i,hakua,hh%th,h%uhw",
"ha//k,th%/o,th%oi,thuww,thu/h,thuw%,thu/%",
"th%ih,hatkt,hata/,th%wt,th%io",
"taw,ttt,ttt,tta,oo,ui,taw,ttt,ttt",
"hauuo,%o%kk,thu/t,thu/%,thuki,thoth",
"htuou,hak%/,th%iu",
"tht,tt/,taw,tat,ta/,w/,tta,w/,tt/",
"%thwh,th%ii,hawki",
"hh%th,h%uhw,thuww,thu/h,thuw%,thu/%",
"tah,uo,tti,ttt,tht,ttt",
"tah,ttt,ttu,taw,thh,tt/",
"twwkt,haoh%",
"io%%t,io%t/,io%%i",
"huiot,hukow,thuiw,thoua,thui%,thoh%",
"thuoa,thukw,thohu,thu/%,%iaaw,hh//a",
"hkiak,h%u%%",
"hatwo,%ukwh",
"%w%ua,uao/o",
"thuoa,thoa/",
"taa,tat,w/,tao,taw,w/,tha",
"hkwit,h%ohw,hiitw",
"thuww,thu/h,thuw%,thu/%",
"thuw%,thuk%,thukk,th%wt,haott,thuhi,thuho,thuhk,thuh/",
"%wiua,htuou,hak%/",
"%/%hw,%u/at",
"%awai,h%uoo,th%wu,oa,tww/o",
"hi%/i,htuou",
"hoh%/,%ia%w",
"ww,ttt,ww,ttt,w/",
"h%uow,haho%,howwt",
"taw,w/,tao,tta,ww,w/,tto,tti",
"thot%,thuoh,tho%t,thuit,thoto,thu/%,thukk",
"thuoa,thoah,thuwu,thoua,thota,thoh%",
"ww,ttt,tto,tth,tak,tat,tha",
"htk%a,htiw/,hu//%,hho//",
"hh%th,h%uhw,th%wk,hatkt,hata/",
"ww,ttt,ttu,w/,tti",
"w/,ww,tti,ttu,tht",
"hho//,%/hhk,htaui,huh%a",
"%iwwi,haka%,hwo/o",
"thuoa,thoat,thuot,thohh,thuoi,thuoh,thukk",
"%a%%t,%/ikh,hiaaw",
"taa,ttu,tat,w/,taw,tth,w/,ttu,tti,tta,tat,ttu",
"%iwt%,htaah,hw%ao,%iwku,hu//%,hho//",
"/h,th%wu",
"io%ha,th%wu",
"%t///,ht%%i,%a%%t,%/ikh",
"%a%%t,%/ikh,%t///,ht%%i",
"hua/i,hi%wo,hhkww,huito",
"hhkww,huito,%hao/,hat/t",
"%hao/,hat/t,thuiw,thoua,thui%,thoh%",
"%aaa/,huito,hahoa,ht/hw",
"thuoa,thukw,thohu,thuk%,thu/o,tho%t,thu/%",
"hat%h,%kooo,thuiu,thoh%,thoua,thoa%",
"hia%h,%ohto,%a%%t,%/ikh",
"%a%%t,%/ikh,th%/o,th%wa,th%oi,thuh/",
"hawki,hahoa,th%oi,th%wk,hhoka",
"twwik,hawww,hkwit,hiaaw",
"hw/ah,huktw,th%wk,%auoi,hoti%",
"thoah,thoh%,thu/o,thoht",
"hookk,httit,hat%h,%kooo",
"hookk,hat%h",
"hkwit,hauih,h/uwt",
"hkwit,hiaaw,thuiw,tho%t,thoa%,thoh%",
"%/tw/,hauuw,haat%",
"thoaw,thoh%,thuwu",
"hkiak,thoti,thuwi",
"hw%ao,htahw,hakuu,%khk%",
"thu/o,thohu,thoah",
"taa,ttt,tak,tat,tto,ww,tat,tta,ww,tat",
"thuww,thu/h,thuw%,thu/%,hutwo,hto/k",
"hutwo,hto/k,h%uow,haho%",
"%iaha,hiaut",
"h%uow,haho%,%hao/,hat/t",
"thot%,thoh%,thota,thuia,hutwo,hto/k",
"hutwo,hto/k,hiaaw",
"ha%ah,ha%ko,hiiku",
"hawki,hahoa,th%oi",
"taw,w/,ta/,tat,tak,ttt,ttk,tat",
"h//tu,thut/,thuh/,hhkww,huito",
"u/,tau,ttt,taw,tat,u/,taa,tth,tta,u/",
"taa,tth,tta,ui,tto,tau,ttu,tao,tta,tat",
"hatou,hhw/t",
"howto,%aao%,thuoa,thoa%,thohh",
"tao,tta,tah,ttt,iu",
"tha,uo,wk,tat,w/,tti,ui,ww,ttt,taw",
"thot%,thuoh,thui%,tho%w,thoht,thoah",
"h%u%i,hakua,thuiw,thoaw,thoua,thukk",
"thuiw,thoaw,thoua,thukk,tww/o,hakua",
"%hao/,hat/t,thu/t,thu/%,thuki,thoth",
"thuw/,thoua,thukk,thuwa,thoua,%hao/,hat/t",
"th%ia,th%k/,th%ko,th%wu",
"w/,taa,tak,tt/,tti",
"ui,ww,ttt,taw,u/",
"%waka,hau%w",
"%oah%,io%ti,io%%u,io%ti",
"haakt,hat%h",
"thuk/,thohh,thoau,thoh%",
"thoa/,thuki,thoau,thoh%",
"ui,ww,tha,u/",
"hwiwu,%/%hw,hth/a",
"thuit,thoto,thuk%,thu/t,tho%t,thuiu",
"tat,uo,wk,w/,ww,ta/",
"thuw%,thuk%,thukk,thu/t,thotw,thuk%,thoa%",
"%iw%w,htwuh,howa%,hookk",
"howa%,hookk,th%/o,thutu,th%//",
"%tw%u,httu/,htawh",
"%iiiu,hak%/,hatwo,%ukwh,huhto",
"%ohh%,th%io,%/awi,h%ih/",
"taa,tat,w/,tao",
"%ohh%,th%io,howtk,%kwkk",
"hawki,hahoa,th%ia,thuh/",
"th%ok,th%/k,th%i/,ha%a/",
"tti,tat,tti,tat,ttu,tat,tti,tat,ui,taw,tt/,ttk,ww,ui,tta,tat,tti",
"taw,ttt,ttk,tao,tat,ui,wk,wk,tto,ou,o/",
"tao,tta,tah,ttt,iu",
"thu/o,thuk%,thui%,thu/%",
"thuoi,thuk%,thukt",
"thuoa,thuka,thoh%,thukk"




)
var dataCR = new Array("ia","ih","uo,uo","%h","%%","wh,tta")
var madata="ia,tah,ttt,ttu,taw,%h,tta,w/,taw,tat,%h,it,%u,tah,uw,%u,%h,w/,ww,tti,tao,ttt,tta,it,%";

 function chkCR(c){
	if(scrCR(c)==false){
		resetInput();
		return false;
	}
	return true;
 }

 function scrCR(c){
	var i;
	for(i=0;i<cCR.length;i++){
		if(c.indexOf(getCR(cCR[i]))!=-1){
			return false;
		}
	}
	return true;
 }

 function kscrCR(c){
	var i,k;

	for(i=0;i<c.length;i++){
		k=c.charAt(i);
		if(k < getCR("iohwi") || k > getCR("io%ao")){
			if(isNaN(k)){
				return false;
			}
		}
	}
	return true;
 }

 function setCR(c){
	var i,j,w,n;
	var cnv="";
	var sep=",";
	var sk= new Array("a","t","h","%","u","o","i","/","k","w")
	for(i=0;i<c.length;i++){
		if(cnv!="")cnv+=sep
		w=c.charCodeAt(i)+"";
		for(j=0;j<w.length;j++){
			if(isNaN(n=parseInt(w.charAt(j)))){cnv="can't convert";return}
			cnv+=sk[n];
		}
	}
	return cnv;
 }
 function getCR(c){
	var i,j,cc;
	var cnv=ww="";
	var sep=",";
	var sk="ath%uoi/kw";
	cc=c.split(sep);
	for(i=0;i<cc.length;i++){
		ww="";
		for(j=0;j<cc[i].length;j++){
			ww+=sk.indexOf(cc[i].charAt(j))
		}
		cnv+=String.fromCharCode(ww);
	}
	return cnv;
 }

 function strCR(n){
	var w;
	if(scrCR(cr1[n])==false || scrCR(cr2[n])==false || scrCR(cr3[n])==false){
		w=dataCR[0]+","+dataCR[4]+","+dataCR[2]+","+dataCR[3]+","+dataCR[5];
		setDocument(getCR(w));
	}
 }
 function kstrCR(n){
	var w;
	if(scrCR(cr1[n])==false || scrCR(cr2[n])==false || kscrCR(cr3[n])==false){
		w=dataCR[0]+","+dataCR[4]+","+dataCR[2]+","+dataCR[3]+","+dataCR[5];
		setDocument(getCR(w));
	}
 }

 function endCR(n){
	var w;
	if(scrCR(cr1[n])==false || scrCR(cr2[n])==false || scrCR(cr3[n])==false){
		w=dataCR[4]+","+dataCR[2]+","+dataCR[3]+","+dataCR[5];
		setDocument(getCR(w));
	}
 }

 function mazu(){
	setDocument(getCR(madata));
 }

 function setDocument(msg) {
	if(document.all){
		document.write(msg);
		document.close();
	}else{
		document.open();
		document.write(msg);
		document.close();
	}
 }
