var inputHandler={};inputHandler.clear_evt_handlers=function(){try{var input_form=document.getElementById('keyword');if(window.detatchEvent){input_form.detachEvent('onclick',inputHandler.select_input);document.detachEvent('onkeypress',inputHandler.remove_input);}else{input_form.removeEventListener('click',inputHandler.select_input,false);document.removeEventListener('keypress',inputHandler.remove_input);}}catch(e){}};inputHandler.select_input=function(evt){inputHandler.focused=true;try{if(evt.srcElement){if(evt.srcElement.value==keyword_message_text){evt.srcElement.select();}}else{if(evt.target.value==keyword_message_text){evt.target.select();}}}catch(e){}};inputHandler.add_blinker=function(evt){inputHandler.focused=true;try{if(evt.srcElement){evt.srcElement.detachEvent('onfocus',inputHandler.add_blinker);evt.srcElement.attachEvent('onfocus',inputHandler.select_input);if(evt.srcElement.createTextRange){var range=evt.srcElement.createTextRange();range.collapse(true);range.moveEnd('character',0);range.moveStart('character',0);range.select();}
document.attachEvent('onkeypress',inputHandler.remove_input);}else{evt.target.removeEventListener('focus',inputHandler.add_blinker,false);evt.target.addEventListener('focus',inputHandler.select_input,false);if(evt.target.setSelectionRange){evt.target.focus();evt.target.setSelectionRange(0,0);}
document.addEventListener('keypress',inputHandler.remove_input,false);}}catch(e){}};inputHandler.remove_input=function(evt){var input_form=document.getElementById('keyword');if(input_form.value==keyword_message_text&&inputHandler.focused===true){input_form.select();}};inputHandler.input_init=function(){try{var input_form=document.getElementById('keyword');if(window.addEventListener){input_form.addEventListener('focus',inputHandler.add_blinker,false);}else{input_form.attachEvent('onfocus',inputHandler.add_blinker);}
window.onunload=inputHandler.clear_evt_handlers;}catch(e){setTimeout(function(){inputHandler.input_init();},10);}};inputHandler.input_init();