function Is ()
{
	var agt=navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
	             && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
	             && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
	this.nav2 = (this.nav && (this.major == 2));
	this.nav3 = (this.nav && (this.major == 3));
	this.nav4 = (this.nav && (this.major == 4));
	this.nav4up = (this.nav && (this.major >= 4));
	this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) ||
	                                  (agt.indexOf("; nav") != -1)) );
	this.nav6 = (this.nav && (this.major == 5));
	this.nav6up = (this.nav && (this.major >= 5));
	this.gecko = (agt.indexOf('gecko') != -1);
	this.ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	this.ie3    = (this.ie && (this.major < 4));
	this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
	this.ie4up  = (this.ie && (this.major >= 4));
	this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
	this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
	this.ie5up  = (this.ie && !this.ie3 && !this.ie4);
	this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
	this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
	this.ie6up  = (this.ie && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);
	this.aol   = (agt.indexOf("aol") != -1);
	this.aol3  = (this.aol && this.ie3);
	this.aol4  = (this.aol && this.ie4);
	this.aol5  = (agt.indexOf("aol 5") != -1);
	this.aol6  = (agt.indexOf("aol 6") != -1);
	this.opera = (agt.indexOf("opera") != -1);
	this.opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
	this.opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
	this.opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
	this.opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
	this.opera5up = (this.opera && !this.opera2 && !this.opera3 && !this.opera4);
	this.webtv = (agt.indexOf("webtv") != -1);
	this.TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
	this.AOLTV = this.TVNavigator;
	this.hotjava = (agt.indexOf("hotjava") != -1);
	this.hotjava3 = (this.hotjava && (this.major == 3));
	this.hotjava3up = (this.hotjava && (this.major >= 3));
}
function handleKeys(e,form,checker)
{
	var theKey
	theKey = e.which
	         if (e.which==96)
		         checker.checked = !checker.checked;
	var i=form.value.length - 1;
	if (e.which==96)
		form.value=form.value.slice(0,i) + "";
	if (checker.checked )
	{
		if (e.which==97)
			form.value=form.value.slice(0,i) + "\u10D0";
		if (e.which==98)
			form.value=form.value.slice(0,i) + "\u10D1";
		if (e.which==103)
			form.value=form.value.slice(0,i) + "\u10D2";
		if (e.which==100)
			form.value=form.value.slice(0,i) + "\u10D3";
		if (e.which==101)
			form.value=form.value.slice(0,i) + "\u10D4";
		if (e.which==118)
			form.value=form.value.slice(0,i) + "\u10D5";
		if (e.which==122)
			form.value=form.value.slice(0,i) + "\u10D6";
		if (e.which==84)
			form.value=form.value.slice(0,i) + "\u10D7";
		if (e.which==105)
			form.value=form.value.slice(0,i) + "\u10D8";
		if (e.which==107)
			form.value=form.value.slice(0,i) + "\u10D9";
		if (e.which==108)
			form.value=form.value.slice(0,i) + "\u10DA";
		if (e.which==109)
			form.value=form.value.slice(0,i) + "\u10DB";
		if (e.which==110)
			form.value=form.value.slice(0,i) + "\u10DC";
		if (e.which==111)
			form.value=form.value.slice(0,i) + "\u10DD";
		if (e.which==112)
			form.value=form.value.slice(0,i) + "\u10DE";
		if (e.which==74)
			form.value=form.value.slice(0,i) + "\u10DF";
		if (e.which==114)
			form.value=form.value.slice(0,i) + "\u10E0";
		if (e.which==115)
			form.value=form.value.slice(0,i) + "\u10E1";
		if (e.which==116)
			form.value=form.value.slice(0,i) + "\u10E2";
		if (e.which==117)
			form.value=form.value.slice(0,i) + "\u10E3";
		if (e.which==102)
			form.value=form.value.slice(0,i) + "\u10E4";
		if (e.which==113)
			form.value=form.value.slice(0,i) + "\u10E5";
		if (e.which==82)
			form.value=form.value.slice(0,i) + "\u10E6";
		if (e.which==121)
			form.value=form.value.slice(0,i) + "\u10E7";
		if (e.which==83)
			form.value=form.value.slice(0,i) + "\u10E8";
		if (e.which==67)
			form.value=form.value.slice(0,i) + "\u10E9";
		if (e.which==99)
			form.value=form.value.slice(0,i) + "\u10EA";
		if (e.which==90)
			form.value=form.value.slice(0,i) + "\u10EB";
		if (e.which==119)
			form.value=form.value.slice(0,i) + "\u10EC";
		if (e.which==87)
			form.value=form.value.slice(0,i) + "\u10ED";
		if (e.which==120)
			form.value=form.value.slice(0,i) + "\u10EE";
		if (e.which==106)
			form.value=form.value.slice(0,i) + "\u10EF";
		if (e.which==104)
			form.value=form.value.slice(0,i) + "\u10F0";

	}
	return true;
}
function changeVal(form,checker)
{
	var is=new Is();
	if (is.ie4up || is.opera)
	{
		if (event.keyCode==96)
			checker.checked = checker.checked ? false : true;
		if (event.keyCode==96)
			event.keyCode='';
	}
	else if (is.nav6up)
	{

		document.onkeypress = handleKeys;
	}
	if (checker.checked)
	{
		if (is.ie4up || is.opera)
		{
			var theKey
			theKey=event.keyCode
			if (event.keyCode==97)
				event.keyCode=4304;
			if (event.keyCode==98)
				event.keyCode=4305;
			if (event.keyCode==103)
				event.keyCode=4306;
			if (event.keyCode==100)
				event.keyCode=4307;
			if (event.keyCode==101)
				event.keyCode=4308;
			if (event.keyCode==118)
				event.keyCode=4309;
			if (event.keyCode==122)
				event.keyCode=4310;
			if (event.keyCode==84)
				event.keyCode=4311;
			if (event.keyCode==105)
				event.keyCode=4312;
			if (event.keyCode==107)
				event.keyCode=4313;
			if (event.keyCode==108)
				event.keyCode=4314;
			if (event.keyCode==109)
				event.keyCode=4315;
			if (event.keyCode==110)
				event.keyCode=4316;
			if (event.keyCode==111)
				event.keyCode=4317;
			if (event.keyCode==112)
				event.keyCode=4318;
			if (event.keyCode==74)
				event.keyCode=4319;
			if (event.keyCode==114)
				event.keyCode=4320;
			if (event.keyCode==115)
				event.keyCode=4321;
			if (event.keyCode==116)
				event.keyCode=4322;
			if (event.keyCode==117)
				event.keyCode=4323;
			if (event.keyCode==102)
				event.keyCode=4324;
			if (event.keyCode==113)
				event.keyCode=4325;
			if (event.keyCode==82)
				event.keyCode=4326;
			if (event.keyCode==121)
				event.keyCode=4327;
			if (event.keyCode==83)
				event.keyCode=4328;
			if (event.keyCode==67)
				event.keyCode=4329;
			if (event.keyCode==99)
				event.keyCode=4330;
			if (event.keyCode==90)
				event.keyCode=4331;
			if (event.keyCode==119)
				event.keyCode=4332;
			if (event.keyCode==87)
				event.keyCode=4333;
			if (event.keyCode==120)
				event.keyCode=4334;
			if (event.keyCode==106)
				event.keyCode=4335;
			if (event.keyCode==104)
				event.keyCode=4336;

		}
		else if (is.nav6up )
		{
			document.captureEvents(Event.KEYPRESS) ;
			document.onkeypress = handleKeys;
		}
		else
		{

			checker.checked=false;
		}
	}
}

