
isIE=(/msie/i.test(navigator.userAgent)&&document.all);hotKeysOk=false;shortcut.add("ALT+L",function(){ret="ALT+L";key=108;shif=false;alt=true;ctrl=false;execHotKeys({'str':ret,'code':key,'shif':shif,'alt':alt,'ctrl':ctrl});});shortcut.add("ALT+1",function(){ret="ALT+1";key=49;shif=false;alt=true;ctrl=false;execHotKeys({'str':ret,'code':key,'shif':shif,'alt':alt,'ctrl':ctrl});});function getHotKey(e){var key=isIE?event.keyCode:e.charCode,ctrl=isIE?event.ctrlKey:e.ctrlKey,alt=isIE?event.altKey:e.altKey,shif=isIE?event.shiftKey:e.shiftKey,ret='';if(key>126)
return true;if(shif)
ret+='SHIFT+';if(alt)
ret+='ALT+';if(ctrl){ret+='CTRL+';if(isIE)
key+=96;}
ret+=String.fromCharCode(key).toUpperCase();if(/[\"!@#\$%¨&\*\(\)\_+\^`\{\}\|\:\?]/.test(ret.charAt(ret.length-1)))
ret=ret.replace(/SHIFT\+/,'');if(!(/^(SHIFT\+)?(CTRL\+)?(ALT\+)?.$/.test(ret)))
ret='';if(hotKeysOk)
execHotKeys({'str':ret,'code':key,'shif':shif,'alt':alt,'ctrl':ctrl});}
function setHotKeysFunction(){if(!chamarAtalho||typeof(chamarAtalho)!='function'){return true;}else{hotKeysOk=true;execHotKeys=chamarAtalho;}}
function chamarAtalho(keyInfo){if(!keyInfo.ctrl&&!keyInfo.shif&&keyInfo.alt){if(keyInfo.code==49)
document.location.href=document.getElementById('subcabecalho').getElementsByTagName('A')[0].href;if(keyInfo.code==108)
document.location.href=document.getElementById('subcabecalho').getElementsByTagName('A')[1].href;}}
function mostrarInfo(keyInfo){alert('str: '+keyInfo.str+'\ncode: '+keyInfo.code+'\nalt: '+keyInfo.alt+'\nshift: '+keyInfo.shif+'\nctrl: '+keyInfo.ctrl);}
adicionarEventoOnLoad(setHotKeysFunction);adicionarEventoOnKeyPress(getHotKey);
