$(document).ready(function(){var shifton=false;var gde=
''
;
$(
"img[id^=showkeyboard]"
).click(function(e){
var gde=$(this).attr(
'gde'
)?$(this).attr(
'gde'
):-1;if ($(
'#keyboard'
).is(
':empty'
)){$(
'#keyboard'
).load(
'/index/keyboard/'
,{gde:gde},function(){if(gde !=-1)
toggleKeyboard(e,
'_'
+gde);else
toggleKeyboard(e,
''
);});}
else {$(
'#keyboard'
).empty();}});function toggleKeyboard(e,adv){$(
"#search_field"
+adv).focus();var height=$(
'#keyboard'
).height();var width=$(
'#keyboard'
).width();leftVal=e.pageX-40+
"px"
;topVal=e.pageY+20+
"px"
;$(
'#keyboard'
).css({left:leftVal,top:topVal}).slideDown(300,function(){$(
"#keyboard"
).addClass(
"slided"
);});$(
"#keyboard > div > input"
).attr(
"class"
,
"inp"
);
$(
"#keyboard input"
).bind(
"mousedown"
,function(e){$(
"#search_field"
+adv).focus();if($(this).val()==
'Backspace'
){$(
'#search_field'
+adv).replaceSelection(
""
,true);}
else if($(this).val()==
"Shift"
){if(shifton==false){onShift(1);shifton=true;}
else {onShift(0);shifton=false;}}
else if($(this).val()==
"Enter"
){go_search(document.getElementById(
"search_field"
+adv).form);}
else {$(
'#search_field'
+adv).replaceSelection($(this).val(),true);if(shifton==true){onShift(0);shifton=false;}}});$(
"#search_field"
+adv).bind(
"focus"
,function(e){if (this.createTextRange){var r=this.createTextRange();r.collapse(false);r.select();}});}
function onShift(e){var i;if(e==1){for(i=0;i<4;i++){var rowid=
"#row"
+i;$(rowid).hide();$(rowid+
"_shift"
).show();}}
else {for(i=0;i<4;i++){var rowid=
"#row"
+i;$(rowid).show();$(rowid+
"_shift"
).hide();}}}});
