﻿var ff22ee=0;
function ChangeLang(lang)
{
  if (lang==1)
  {
    ff22ee=1;
  }else
  {
   ff22ee=0;
  }
}
function document_onkeypress() {
 	var kf=window.event.keyCode;
		
		if (ff22ee==0){
			if (kf>=65 && kf<=90){
				kf=kf+32;
		    }
		    //----------Key With Shift Pressed
		    if (window.event.shiftKey==true){
		        //alert(kf);
		        switch (kf){
		            case 34:
		            case 58:
		            case 42:
		            case 33:
		            case 37:
		            case 60:
		            case 62:
		                kf=kf;
		                break;
		            case 104:
		                kf=1570;
		                break;
		            case 107:
		                kf=1548;
		                break;
		            case 63:
		                kf=1567;
		                break;
		            case 41:
		                kf=40;
		                break;
		            case 40:
		                kf=41;
		                break;
		            default:
		                kf=0;
		        }
		    }else{
		        switch (kf)
		        {
		            case 42:
		            case 43:
		            case 45:
		            case 46:
		            case 47:
		            case 61:
		            case 187:
		            case 189:
		                kf=kf;
		                break;
		            case 109:
		                kf=1574;
		                break;
		            case 97 :
		                kf=1588;
		                break;
		            case 115 :
		                kf=1587;
		                break;
		            case 100 :
		                kf=1610;
		                break;
		            case 102 :
		                kf=1576;
		                break;
		            case 103 :
		                kf=1604;
		                break;
		            case 104 :
		                kf=1575;
		                break;
		            case 106 :
		                kf=1578;
		                break;
		            case 107 :
		                kf=1606;
		                break;
		            case 108 :
		                kf=1605;
		                break;
		            case 59 :
		            case 186:
		                kf=1603;
		               /// kf=1705;
		                break;
		            case 39 :
		            case 222:
		                kf=1711;
		                break;
		            case 113 :
		                kf=1590;
		                break;
		            case 119 :
		                kf=1589;
		                break;
		            case 101 :
		                kf=1579;
		                break;
		            case 114 :
		                kf=1602;
		                break;
		            case 116 :
		                kf=1601;
		                break;
		            case 121 :
		                kf=1594;
		                break;
		            case 117 :
		                kf=1593;
		                break;
		            case 105 :
		                kf=1607;
		                break;
		            case 111 :
		                kf=1582;
		                break;
		            case 112 :
		                kf=1581;
		                break;
		            case 91 :
		            case 219:
		                kf=1580;
		                break;
		            case 93 :
		            case 221:
		                kf=1670;
		                break;
		            case 122 :
		                kf=1592;
		                break;
		            case 120 :
		                kf=1591;
		                break;
		            case 99 :
		                kf=1586;
		                break;
		            case 118 :
		                kf=1585;
		                break;
		            case 98 :
		                kf=1584;
		                break;
		            case 110 :
		                kf=1583;
		                break;
		            case 96 :
		            case 192 :
		                kf=1662
		                break;
		            case 92 :
		            case 220:
		                kf=1688;
		                break;
		            case 44 :
		            case 188:
		                kf=1608;
		                break;
//		            case 77:
//		         //  alert("FGfgf");
//		                break;
		            case 32:
		                kf=32;
		                break;
		            case 13:
		                kf=13;
		                break;
		                case 48:
		                case 49:
		                case 50:
		                case 51:
		                case 52:
		                case 53:
		                case 54:
		                case 55:
		                case 56:
		                case 57:
		                    kf=kf;
		                    break;
		            default:
		                kf=0;
		        }
		    }
				
			window.event.keyCode=kf;	
			}
}




function document_onkeydown() {

    if (window.event.keyCode == 119) {

        if (ff22ee == 0) {
            ff22ee = 1;
        } else {
            ff22ee = 0;
        };

    }
}