function renderingIE5(){if(rr.IE<6)$css.flip('bagg',document.body)};
function classVKeyboard(thisName){
this.nameThisObj=thisName;
this.kCaps=false;
this.kShift=false;
this.kTr='ru';
this.nameAttrValueKey="valuekey";
this.nameAttrValueCodeKey="codekey";
this.objEdit=false;
this.past_objKey=false;
var charTest=document.charset?document.charset:document.characterSet;
charTest=charTest?(charTest.toLowerCase()=='koi8-r'):false;
this.keyboard=[
192,49,50,51,52,53,54,55,56,57,48,189,187,{cl:'kBackspace',vl:'&laquo;',cd:8},
{cl:'kTab',vl:'Tab',cd:9},81,87,69,82,84,89,85,73,79,80,219,221,{cl:'kDel',vl:'Del',cd:46},
{cl:'kCaps',vl:'CapsL',cd:0},65,83,68,70,71,72,74,75,76,186,222,{cl:'kEnter',vl:'Enter',cd:13},
{cl:'kShift',vl:'Shift',cd:0},90,88,67,86,66,78,77,188,190,191,{cl:'kShift',vl:'Shift',cd:0,cdd:16},
{cl:'kTr',vl:'En',leng:'en',cd:0,title:'\u0410\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b'},{cl:'kTr',vl:'Ru',leng:'ru',cd:0,title:'\u0420\u0443\u0441\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b'},{cl:'kSpace',vl:' ',cd:32},
(charTest?{cl:'no',vl:''}:{cl:'kTr',vl:'Ua',leng:'ukr',cd:0,title:'\u0423\u043a\u0440\u0430\u0438\u043d\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b'}),{cl:'kTr',vl:'Rt',leng:'ru2',cd:0,title:'\u0420\u0443\u0441\u0441\u043a\u0430\u044f \u0444\u043e\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b'}
];
this.symbols={
en:{n1:['`','1','2','3','4','5','6','7','8','9','0','-','='],
n2:['~','!','@','#','$','%','^','&','*','(',')','_','+'],
s1:['q','w','e','r','t','y','u','i','o','p','[',']',
'a','s','d','f','g','h','j','k','l',';','\'',
'z','x','c','v','b','n','m',',','.','/'],
s2:['q','w','e','r','t','y','u','i','o','p','{','}',
'a','s','d','f','g','h','j','k','l',':','"',
'z','x','c','v','b','n','m','<','>','\\']},
ru:{n1:['\u0451','1','2','3','4','5','6','7','8','9','0','-','='],
n2:['\u0451','!','"','\u2116',';','%',':','?','*','(',')','_','+'],
s1:['\u0439','\u0446','\u0443','\u043a','\u0435','\u043d','\u0433','\u0448','\u0449','\u0437','\u0445','\u044a',
'\u0444','\u044b','\u0432','\u0430','\u043f','\u0440','\u043e','\u043b','\u0434','\u0436','\u044d',
'\u044f','\u0447','\u0441','\u043c','\u0438','\u0442','\u044c','\u0431','\u044e','.'],
s2:['\u0439','\u0446','\u0443','\u043a','\u0435','\u043d','\u0433','\u0448','\u0449','\u0437','\u0445','\u044a',
'\u0444','\u044b','\u0432','\u0430','\u043f','\u0440','\u043e','\u043b','\u0434','\u0436','\u044d',
'\u044f','\u0447','\u0441','\u043c','\u0438','\u0442','\u044c','\u0431','\u044e',',']},
ru2:{n1:['\u0451','1','2','3','4','5','6','7','8','9','0','-','='],
n2:['\u0451','!','"','\u2116',';','%',':','?','*','(',')','_','+'],
s1:['\u044f','\u0432','\u0435','\u0440','\u0442','\u044b','\u0443','\u0438','\u043e','\u043f','\u0448','\u0449',
'\u0430','\u0441','\u0434','\u0444','\u0433','\u0447','\u0439','\u043a','\u043b','\u044c','\u044a',
'\u0437','\u0445','\u0446','\u0436','\u0431','\u043d','\u043c','\u044d',';','.'],
s2:['\u044f','\u0432','\u0435','\u0440','\u0442','\u044b','\u0443','\u0438','\u043e','\u043f','\u0448','\u0449',
'\u0430','\u0441','\u0434','\u0444','\u0433','\u0447','\u0439','\u043a','\u043b','\u044c','\u044a',
'\u0437','\u0445','\u0446','\u0436','\u0431','\u043d','\u043c','\u044d','`',',']},
ukr:{n1:['\u0451','1','2','3','4','5','6','7','8','9','0','-','\u0491'],
n2:['\u0451','!','"','\u2116',';','%',':','?','*','(',')','+','\u0491'],
s1:['\u0439','\u0446','\u0443','\u043a','\u0435','\u043d','\u0433','\u0448','\u0449','\u0437','\u0445','\u0457',
'\u0444','i','\u0432','\u0430','\u043f','\u0440','\u043e','\u043b','\u0434','\u0436','\u0454',
'\u044f','\u0447','\u0441','\u043c','\u0438','\u0442','\u044c','\u0431','\u044e','.'],
s2:['\u0439','\u0446','\u0443','\u043a','\u0435','\u043d','\u0433','\u0448','\u0449','\u0437','\u0445','\u0457',
'\u0444','\u0456','\u0432','\u0430','\u043f','\u0440','\u043e','\u043b','\u0434','\u0436','\u0454',
'\u044f','\u0447','\u0441','\u043c','\u0438','\u0442','\u044c','\u0431','\u044e',',']}
};
this.createKeyboard=function(){
var newKey=false;
var keyboard=this.symbols[this.kTr];
var nKey=0;
var nodeDiv=document.createElementNS?document.createElementNS("http://www.w3.org/1999/xhtml","div"):document.createElement("div");
var txt='';
txt+=(rr.IE)?'<a href="#" ondrag="return killBubble(event)"  tabindex="-1" ':"<div";
txt+=(rr.IE<6)?' class="vkeyboard ie5"':' class="vkeyboard"';
txt+=' class="vkeyboard" onmousedown="return '+this.nameThisObj+'.onmousedown(event);" onmouseup="return '+this.nameThisObj+'.onmouseup(event);" onmousemove="try {return '+this.nameThisObj+'.onmousemove(event);} catch (e) {};" onclick="return '+this.nameThisObj+'.onclick(event);" onmouseout="'+this.nameThisObj+'.body_mousedown = false;"><div class="kbody"></div>';
txt+=(rr.IE)?'</a>':"</div>";
nodeDiv.innerHTML=txt;
var keyboard=$css.firstChild('vkeyboard',nodeDiv);
var bodykeyboard=$css.firstChild('kbody',keyboard);
for(var i=0;i<this.keyboard.length;i++){
newKey=this.keyboard[i];
if(typeof newKey=='object'){
bodykeyboard.appendChild(this.createFKeys(i));
}else{
bodykeyboard.appendChild(this.createKeys(nKey,newKey));
nKey+=1;
};
};
return keyboard;
};
this.createKeys=function(nKey,codeKey){
var nodeKey=document.createElement('SPAN');
nodeKey.tabIndex=-1;
nodeKey.setAttribute(this.nameAttrValueCodeKey,codeKey);
$css.add('key',nodeKey);
var valueKey='';
var valueKeyShift='';
if(nKey<13){
switch(true){
case(!this.kShift&&!this.kCaps):valueKey=this.symbols[this.kTr].n1[nKey].toLowerCase();valueKeyShift=this.symbols[this.kTr].n2[nKey].toUpperCase();break;
case(this.kShift&&!this.kCaps):valueKey=this.symbols[this.kTr].n2[nKey].toUpperCase();valueKeyShift=this.symbols[this.kTr].n1[nKey].toLowerCase();break;
case(!this.kShift&&this.kCaps):valueKey=this.symbols[this.kTr].n1[nKey].toUpperCase();valueKeyShift=this.symbols[this.kTr].n2[nKey].toLowerCase();break;
case(this.kShift&&this.kCaps):valueKey=this.symbols[this.kTr].n2[nKey].toLowerCase();valueKeyShift=this.symbols[this.kTr].n1[nKey].toUpperCase();break;
default:return document.createTextNode('');
};
nodeKey.appendChild(document.createTextNode(valueKey));
nodeKey.setAttribute(this.nameAttrValueKey,valueKey);
nodeKey.setAttribute(this.nameAttrValueKey+"Shift",valueKeyShift);
nodeKey.onmouseout=this.onmouseout;
return nodeKey;
};
switch(true){
case(!this.kShift&&!this.kCaps):valueKey=this.symbols[this.kTr].s1[nKey-13].toLowerCase();valueKeyShift=this.symbols[this.kTr].s2[nKey-13].toUpperCase();break;
case(this.kShift&&!this.kCaps):valueKey=this.symbols[this.kTr].s2[nKey-13].toUpperCase();valueKeyShift=this.symbols[this.kTr].s1[nKey-13].toLowerCase();break;
case(!this.kShift&&this.kCaps):valueKey=this.symbols[this.kTr].s1[nKey-13].toUpperCase();valueKeyShift=this.symbols[this.kTr].s2[nKey-13].toLowerCase();break;
case(this.kShift&&this.kCaps):valueKey=this.symbols[this.kTr].s2[nKey-13].toLowerCase();valueKeyShift=this.symbols[this.kTr].s1[nKey-13].toUpperCase();break;
default:return document.createTextNode('');
};
nodeKey.appendChild(document.createTextNode(valueKey));
nodeKey.setAttribute(this.nameAttrValueKey,valueKey);
nodeKey.setAttribute(this.nameAttrValueKey+"Shift",valueKeyShift);
nodeKey.onmouseout=this.onmouseout;
return nodeKey;
};
this.createFKeys=function(nKey){
var nodeKey=document.createElement('SPAN');
nodeKey.tabIndex=-1;
$css.add('key',nodeKey);
$css.add('fKey',nodeKey);
$css.add(this.keyboard[nKey].cl,nodeKey);
nodeKey.innerHTML=this.keyboard[nKey].vl;
nodeKey.setAttribute(this.nameAttrValueCodeKey,this.keyboard[nKey].cd);
if(this.keyboard[nKey].title)nodeKey.setAttribute('title',this.keyboard[nKey].title);
switch(this.keyboard[nKey].cl){
case('kBackspace'):break;
case('kTab'):break;
case('kDel'):break;
case('kCaps'):
if(this.kCaps)$css.add('flag',nodeKey);
break;
case('kEnter'):break;
case('kShift'):
if(this.kShift)$css.add('flag',nodeKey);
break;
case('kTr'):
if(this.kTr==this.keyboard[nKey].leng)$css.add('flag',nodeKey);
nodeKey.setAttribute('lang',this.keyboard[nKey].leng);
break;
case('kSpace'):nodeKey.setAttribute(this.nameAttrValueKey," ");break;
default:;
};
nodeKey.onmouseout=this.onmouseout;
return nodeKey;
};
this.addChar=function(objKey){
if(objKey.getAttribute(this.nameAttrValueKey)){
return this.addChar_B(objKey.getAttribute(this.nameAttrValueKey));
};
};
this.addChar_B=function(val){
var uk=val.length==1?val.charCodeAt(0):null,evt,p1;
if(val=='.')uk=null;
try{
if(typeof document.createEvent=='function'&&uk!=null){
try{
evt=document.createEvent("KeyEvents");
evt.initKeyEvent('keypress',false,true,this.objEdit.contentWindow,false,false,false,false,uk,uk);
}catch(ex){
evt=document.createEvent("KeyboardEvents");
evt.initKeyEvent('keypress',false,true,this.objEdit.contentWindow,false,false,false,false,uk,0);
};
this.objEdit.dispatchEvent(evt);
return;
};
}catch(e){};
this.getScrollText();
if(rr.IE){
this.objEdit.caret_pos=false;
this.objEdit.focus();
with(document.selection.createRange()){
text=val;collapse();select();
renderingIE5();
};
this.setScrollText();
return false;
};
p1=this.objEdit.selectionStart;
this.objEdit.value=this.objEdit.value.substring(0,p1)+val+this.objEdit.value.substring(this.objEdit.selectionEnd);
if(val=='\n'&&rr.Opera){
this.objEdit.setSelectionRange(p1+2,p1+2);
}else{
this.objEdit.setSelectionRange(p1+val.length,p1+val.length);
};
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
this.setScrollText();
return false;
};
this.getScrollText=function(){
if(rr.IE||rr.Gecko)return;
var t=this,el=this.objEdit;
t.dYpix=el.scrollTop-el.scrollHeight;
t.dXpix=el.scrollLeft-el.scrollWidth;
};
this.setScrollText=function(){
if(rr.IE||rr.Gecko)return;
var t=this,el=this.objEdit;
el.scrollTop=(t.dYpix+el.scrollHeight)||0;
el.scrollLeft=t.dXpix+el.scrollWidth;
};
this.click=function(objKey){
if(!this.objEdit)return;
this.getScrollText();
var vkeyboard=$css.parentNode('vkeyboard',objKey);
if(typeof this.onkey=='function')this.onkey(this.objEdit);
if(!$css.exists('fKey',objKey)){
this.addChar(objKey);
var kShift=$css.firstChild('kShift',this.past_objKey.parentNode);
if($css.exists('flag',kShift)){
this.kShift=this.kShift?false:true;
vkeyboard.parentNode.replaceChild(this.createKeyboard(),vkeyboard);
}
return;
};
switch(true){
case($css.exists('kBackspace',objKey)):
if(rr.IE){
this.objEdit.focus();
var pos_selection=document.selection.createRange();
if(pos_selection.text!=""){
with(pos_selection){text="";collapse();select();renderingIE5();}
break;
};
pos_selection.moveStart("character",-1);
pos_selection.select();
with(pos_selection){text="";collapse();select()}
break;
};
var p1=this.objEdit.selectionStart;
var p2=this.objEdit.selectionEnd;
var dp=1;
if(p1==p2){
if(rr.Opera&&this.objEdit.value.substring(p1,p1-2).indexOf("\r")===0)dp=2;
this.objEdit.value=this.objEdit.value.substring(0,p1-dp)+this.objEdit.value.substring(p2);
this.objEdit.setSelectionRange(p1-dp,p1-dp);
}else{
this.objEdit.value=this.objEdit.value.substring(0,p1)+this.objEdit.value.substring(p2);
this.objEdit.setSelectionRange(p1,p1);
};
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
break;
case($css.exists('kTab',objKey)):
if(!(rr.Opera<9&&this.objEdit.nodeName!='TEXTAREA'))this.addChar_B('    ');
break;
case($css.exists('kDel',objKey)):
if(rr.IE){
this.objEdit.focus();
var sLen=this.objEdit.value.length;
var pos_selection=document.selection.createRange();
if(!pos_selection.text>''){
pos_selection.moveEnd('character',1);
};
with(pos_selection){text="";collapse(false);select()}
if(sLen==this.objEdit.value.length){
with(this.objEdit.createTextRange()){collapse(false);select()}
};
break;
};
var p1=this.objEdit.selectionStart;
var p2=this.objEdit.selectionEnd;
var dp=1;
if(p1==p2){
if(rr.Opera&&this.objEdit.value.substring(p1,p1+1).indexOf("\r")===0)dp=2;
this.objEdit.value=this.objEdit.value.substring(0,p1)+this.objEdit.value.substring(p2+dp);
}else{
this.objEdit.value=this.objEdit.value.substring(0,p1)+this.objEdit.value.substring(p2);
};
this.objEdit.setSelectionRange(p1,p1);
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
break;
case($css.exists('kCaps',objKey)):
this.kCaps=this.kCaps?false:true;
vkeyboard.parentNode.replaceChild(this.createKeyboard(),vkeyboard);
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
break;
case($css.exists('kEnter',objKey)):
if(this.objEdit.nodeName=='TEXTAREA'){
this.addChar_B('\n');
}else{
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
};
break;
case($css.exists('kShift',objKey)):
this.kShift=this.kShift?false:true;
vkeyboard.parentNode.replaceChild(this.createKeyboard(),vkeyboard);
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
break;
case($css.exists('kTr',objKey)):
if(this.kTr==objKey.getAttribute('lang'))break;
this.kTr=objKey.getAttribute('lang');
vkeyboard.parentNode.replaceChild(this.createKeyboard(),vkeyboard);
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
this.objEdit.focus();
break;
case($css.exists('kSpace',objKey)):
this.addChar_B(' ');
break;
default:if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
};
this.setScrollText();
return objKey;
};
this._getOEdit=function(aEl){
aEl=aEl||document.activeElement||document.myActiveElement;
if(aEl&&aEl.tagName&&aEl.style.display!='none'&&((aEl.tagName=='INPUT'&&(aEl.type=='text'||aEl.type=='password'))||aEl.tagName=='TEXTAREA'))return aEl;
};
this.onclick=function(even){
this.objEdit=this.objEdit||this._getOEdit();
if(!this.objEdit)return killBubble(even);;
if(!this.past_objKey){if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};return killBubble(even);};
if(rr.IE){this.click(this.past_objKey);}
this.past_objKey=false;
return killBubble(even);
};
this.body_mousedown=false;
this.onmousedown=function(even){
even=even||window.event;
this.objEdit=this._getOEdit()||this._getOEdit(this.objEdit)||this._getOEdit(this.main_objEdit);
if(!this.objEdit)return killBubble(even);;
if(!(rr.Opera<9&&rr.Opera>8.5&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
if(rr.IE)document.onselectstart=function(e){killBubble(e);};
this.body_mousedown=true;
var objKey=$css.parentNode('key',even.target||even.srcElement,true);
if(!objKey){
if(!(rr.Opera<9&&(this.objEdit.nodeName!='TEXTAREA'))){this.objEdit.focus();};
return killBubble(even);
};
this.past_objKey=objKey;
if(!rr.IE){this.click(this.past_objKey);}
if(this.past_objKey){
$css.add('mousedown',this.past_objKey);
};
if(rr.IE){
return killBubble(even);
this.objEdit.focus();
with(document.selection.createRange()){collapse();select();};
return killBubble(even);
};
return killBubble(even);
};
this.onmouseup=function(even){
if(rr.IE)document.onselectstart=function(){return true;};
if(this.past_objKey){
$css.remove('mousedown',this.past_objKey);
};
this.body_mousedown=false;
};
this.onmouseout=function(even){
if(rr.IE)document.onselectstart=function(){return true;};
try{$css.remove('mousedown',this);
}catch(e){};
};
this.onmousemove=function(even){
return;
if(this.objEdit)this.objEdit.focus();
if(this.body_mousedown){
return killBubble(even);
};
};
this.fireKey=function(even,objKeyb){
this.objEdit=this._getOEdit();
if(!even)even=window.event;
var keyCode=even.keyCode;
if(rr.Gecko){
switch(keyCode){
case(59):keyCode=186;break;
case(109):keyCode=189;break;
case(61):keyCode=187;break;
};
};
if(rr.Opera){
var errKode=false;
eval('errKode = {96:192,45:109,61:64,91:219,93:221,59:186,44:188,46:0};');
if(typeof errKode[keyCode]!='undefined')keyCode=errKode[keyCode];
};
if(!keyCode)return false;
var sKey=false;
var kbody=$css.firstChild('kbody',objKeyb);
var nodeKey=kbody.firstChild;
if(!nodeKey)return false;
while(!sKey){
if(rr.IE){
if(nodeKey.getAttribute(this.nameAttrValueCodeKey)&&nodeKey.getAttribute(this.nameAttrValueCodeKey)==keyCode){
sKey=nodeKey;break;
};
}else{
if(nodeKey.getAttributeNode(this.nameAttrValueCodeKey)&&nodeKey.getAttribute(this.nameAttrValueCodeKey)==keyCode){
sKey=nodeKey;break;
};
};
nodeKey=$css.nextSibling('key',nodeKey);
if(!nodeKey)return false;
};
$css.add('fire',nodeKey);
var func=function(){
$css.remove('fire',nodeKey);
};
window.setTimeout(func,100);
if(nodeKey.getAttribute(this.nameAttrValueKey)){
if(even.shiftKey){
return nodeKey.getAttribute(this.nameAttrValueKey+"Shift");
};
return nodeKey.getAttribute(this.nameAttrValueKey);
};
return false;
};
};
new function(){
var vkStatus,_pastKeyCode,_interceptionKey;
function getfEl(e){
e=e||window.event;
var aEl=e.target||e.srcElement;
if(aEl&&aEl.tagName&&aEl.style.display!='none'&&((aEl.tagName=='INPUT'&&(aEl.type=='text'||aEl.type=='password'))||aEl.tagName=='TEXTAREA'))return aEl;
};
function onkeydown(e){
e=e||window.event;
var tgEl=getfEl(e);
if(!vkeyboard.transliteration||!vkStatus||!tgEl)return;
if(e.keyCode==16||e.ctrlKey)return;
_interceptionKey=false;
var vk=$css.firstChild('vkeyboard',$gId(vkeyboard.id_vkey)),newKey=vk&&__keyboard.fireKey(e,vk);
if(!newKey)return;
_pastKeyCode=newKey;
__keyboard.addChar_B(newKey);
_interceptionKey=true;
return killBubble(e);
};
function onkeypress(e){
e=e||window.event;
if(!vkeyboard.transliteration||!vkStatus||!getfEl(e)||e.ctrlKey)return;
if(_interceptionKey){
_interceptionKey=false;
return killBubble(e);
};
if(_pastKeyCode){
__keyboard.addChar_B(_pastKeyCode);
return killBubble(e);
};
};
function onkeyup(e){
e=e||window.event;
if (e.keyCode==9) __keyboard.objEdit = __keyboard._getOEdit()||__keyboard.main_objEdit;
_pastKeyCode=false;
};
__keyboard=new classVKeyboard('__keyboard');
__keyboard.onkey=function(obj){obj.was_changed=true;};
rr.addHandler(document.body,'keydown',onkeydown);
rr.addHandler(document.body,'keypress',onkeypress);
rr.addHandler(document.body,'keyup',onkeyup);
function ondocumentclick(e){
	__keyboard.objEdit = __keyboard._getOEdit()||__keyboard.main_objEdit;
};
rr.addHandler(document.body,'click',ondocumentclick);

vkeyboard={
id_vkey:'vkeyboard-01',
transliteration:true,
titleWindow:'\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430',
show:function(oEdit,nearby){
oEdit=__keyboard._getOEdit(oEdit)||__keyboard._getOEdit();
__keyboard.objEdit=oEdit||__keyboard.objEdit;
if(vkStatus){
this.hide({target:$gId(this.id_vkey)});
return;
};
vkStatus=true;
var oThis=this;
var func_movestop=function(){
var objEdit=__keyboard.objEdit;
if(objEdit){
if(rr.IE&&objEdit.caret_pos)objEdit.caret_pos.select();
objEdit.focus();
};
};
var func_resizestop=function(){
var ow=raWindow.get_elements(this),vkb=$css.firstChild('vkeyboard',ow.wcaption),d=vkb.offsetTop;
ow.width=vkb.offsetWidth+((rr.Opera<9)?d:d*2+2);
ow.wcaption.style.height='1px';
ow.height=ow.wcaption.scrollHeight+((rr.Opera<9)?d/2:d);
if(vkb.offsetWidth>0)raWindow.setWidthHeight(ow);
func_movestop();
};
var func_close=function(e){
e=e||window.event;
vkeyboard.hide(e);
return false
};
var ow=raWindow.createWindow({
top:-200,
left:50,
nearby:nearby||oEdit,
parent:parent,
width:440,
height:230,
title:this.titleWindow,
onresize:"switch (true ) {case (this.offsetWidth < 420):$css.add('kbsize300', this);$css.remove('kbsize600', this);break;case (this.offsetWidth > 600):$css.remove('kbsize300', this);$css.add('kbsize600', this);break;default:$css.remove('kbsize300', this);$css.remove('kbsize600', this);};",
onresizestop:func_resizestop,
onmovestop:func_movestop,
buttons:[{
cl:"close",
onclick:"vkeyboard.hide(event);return false"
}],
rListObj:true,
noShow:true
});
var vkeyb=ow.wcaption.appendChild(__keyboard.createKeyboard());
ow.wcaption.id=this.id_vkey;
ow.window.onresizestop();
window.setTimeout(function(){
ow.window.style.visibility="";
},10);
if(oEdit)oEdit.focus();
ow.window.onmousedown=function(e){
e=e||window.event;
if($css.parentNode('vkeyboard',e.target||e.srcElement))return;
__keyboard.objEdit=__keyboard._getOEdit();
};
},
hide:function(e){
e=e||window.event;
raWindow.removeWindow(e.target||e.srcElement);
vkStatus=false;
var oe=__keyboard._getOEdit()||__keyboard.objEdit;
if(oe){
if(rr.IE&&oe.caret_pos)oe.caret_pos.select();
oe.focus();
};
return false;
}
};
};
rr.createCSS([
".vkeyboard  {font-size: 10pt; font-family:'Lucida Grande CY',Arial,sans-serif;}",
".vkeyboard, .vkeyboard * {-moz-box-sizing: content-box !important;-ms-box-sizing: content-box !important;-webkit-box-sizing: content-box !important;box-sizing: content-box !important;}",
'.swinVkeyboard {position:absolute;top:220px;left:100px;}',
rr.Opera<9&&'input, .opera8 textarea {position:relative;}',
rr.webkit<499&&'textarea:focus  { outline: 0px none black }',
'.vkeyboard * {margin:0px;padding:0px;}',
'.vkeyboard {margin:1ex auto 0;display:block;cursor:default;overflow:hidden;width:421px;_width:420px;background-color:#FFF;border:1px solid #7d97df;text-decoration:none !important;-moz-border-radius: 5px;padding:6px 4px 6px 6px;-moz-user-select: none;-o-user-select:none;-khtml-user-select: none;}',
rr.IE<6&&'.vkeyboard {width:432px;}',
'.kbsize300 .vkeyboard {font-size:11px;font-family:Arial,Helvetica,sans-serif;width:302px;_width:290px;padding:4px 3px 4px 4px;}',
'.kbsize600 .vkeyboard {font-size:140%;font-family:Arial,Helvetica,sans-serif;width:615px;_width:615px;padding:8px 5px 8px 8px;}',
'.vkeyboard .kbody {}',
'.vkeyboard .kbody .key {width:24px;float:left;padding:0.4ex 1px 0.5ex 0px;text-decoration:none;text-align:center;color:#000;overflow: hidden;height:1.2em;border:1px solid #7d97df;margin-right:1px;background-color:#C7D5FE;font-weight:bold;margin-bottom:1px;cursor:pointer;_height:24px;}',
'.kbsize300 .vkeyboard .kbody .key {width:16px;_height:16px;}',
'.kbsize600 .vkeyboard .kbody .key {width:36px;_height:36px;}',
rr.IE<6&&'.kbsize300 .vkeyboard .key {width:18px;}',
rr.IE<6&&'.kbody .key {height:1.7em;width:27px;float:none;padding:0.3ex 0px 0.5ex;}',
'div.vkeyboard .kbody .key:hover {border-color:#4c67af;background-color:#a4b8ef;}',
'.svkeyboard .kbody .key:active {color:#8f0d0d;border-style:inset;padding:0.5ex 0px 0.4ex 1px;}',
'.vkeyboard .kbody .key.mousedown {color:#8f0d0d;border-style:inset;padding:0.5ex 0px 0.4ex 1px;}',
'.vkeyboard .kbody .key.mousedown:hover{border-color:#4c67af;background-color:#C7D5FE;}',
'.vkeyboard .kbody .key:focus  {outline: 1px none black }',
'.vkeyboard .kbody .key.flag {background-color:#dfe8ff;color:#3F4069}',
'.vkeyboard .kbody .key.fire {border-style:inset;padding:0.5ex 0px 0.4ex 1px;}',
'.vkeyboard .kbody .kBackspace {width:52px;_width:70px;}',
'.vkeyboard .kbody .kTab   {width:40px;}',
'.vkeyboard .kbody .kDel   {width:36px;_width:54px;}',
'.vkeyboard .kbody .kCaps  {width:52px;}',
'.vkeyboard .kbody .kEnter {width:52px;_width:67px;}',
'.vkeyboard .kbody .kShift {width:66px;_width:72px;}',
'.vkeyboard .kbody .kSpace {width:265px;_width:256px;margin-left:20px;margin-right:20px;}',
'.vkeyboard .kbody .kTr    {}',
'.kbsize300 .vkeyboard .kbody .kBackspace {width:36px;_width:46px;}',
'.kbsize300 .vkeyboard .kbody .kTab   {width:26px;}',
'.kbsize300 .vkeyboard .kbody .kDel   {width:26px;_width:36px;}',
'.kbsize300 .vkeyboard .kbody .kCaps  {width:36px;}',
'.kbsize300 .vkeyboard .kbody .kEnter {width:36px;_width:43px}',
'.kbsize300 .vkeyboard .kbody .kShift {width:46px;_width:48px;}',
'.kbsize300 .vkeyboard .kbody .kSpace {width:184px;_width:167px;margin-left:16px;margin-right:17px;}',
'.kbsize300 .vkeyboard .kbody .kTr    {}',
'.kbsize600 .vkeyboard .kbody .kBackspace {width:88px;_width:94px;}',
'.kbsize600 .vkeyboard .kbody .kTab   {width:60px;}',
'.kbsize600 .vkeyboard .kbody .kDel   {width:64px;_width:70px;}',
'.kbsize600 .vkeyboard .kbody .kCaps  {width:82px;}',
'.kbsize600 .vkeyboard .kbody .kEnter {width:82px;_width:85px;}',
'.kbsize600 .vkeyboard .kbody .kShift {width:102px;}',
'.kbsize600 .vkeyboard .kbody .kSpace {width:368px;_width:347px;margin-left:40px;margin-right:41px;}',
'.kbsize600 .vkeyboard .kbody .kTr    {}',
rr.IE<6&&'.vkeyboard {margin-left:6px;}',
rr.IE<6&&'.vkeyboard .kBackspace {width:53px;}',
rr.IE<6&&'.vkeyboard .kDel   {width:40px;}',
rr.IE<6&&'.vkeyboard .kCaps {width:54px;}',
rr.IE<6&&'.vkeyboard .kEnter {width:54px;} ',
rr.IE<6&&'.vkeyboard .kShift {width:68px;}',
rr.IE<6&&'.vkeyboard .kSpace {width:261px;margin-left:18px;margin-right:27px;}',
rr.IE<6&&'.kbsize300 .vkeyboard {width:293px;}',
rr.IE<6&&'.kbsize300 .vkeyboard .kDel {width:27px;}',
rr.IE<6&&'.kbsize300 .vkeyboard .kTab {width:27px;}',
rr.IE<6&&'.kbsize300 .vkeyboard .kEnter {width:37px;}',
rr.IE<6&&'.kbsize300 .vkeyboard .kSpace {width:180px;margin-left:14px;margin-right:14px;}',
rr.IE<6&&'.kbsize600 .vkeyboard {width:588px;margin-left:8px;}',
rr.IE<6&&'.kbsize600 .vkeyboard .kEnter {width:79px;}',
rr.IE<6&&'.kbsize600 .vkeyboard .kShift {width:99px;}',
rr.IE<6&&'.kbsize600 .vkeyboard .kSpace {width:390px;margin-left:16px;margin-right:16px;}'
]);
if(rr.Opera<9)try{new 1}catch(e){rr.include.init(e)};