function arrowHandler(a){if(a.altKey||a.shiftKey||a.ctrlKey){return}switch(a.keyCode||a.charCode){case Event.KEY_LEFT:if($("prev")){document.location.href=$("prev").href}break;case Event.KEY_RIGHT:if($("next")){document.location.href=$("next").href}break}}function message_submit(a){if(a=="spam_report"){if(!window.confirm(IMP.text.spam_report)){return}}else{if(a=="notspam_report"){if(!window.confirm(IMP.text.notspam_report)){return}}}$("actionID").setValue(a);$("messages").submit()}function flagMessage(b){var a=$("flag1"),c=$("flag2");if((b==1&&$F(a))||(b==2&&$F(c))){$("flag").setValue((b==1)?$F(a):$F(c));message_submit("flag_message")}}function transfer(d,b){var a=$("targetMbox");a.setValue((b==1)?$F("target1"):$F("target2"));if($F(a)=="*new*"){var c=window.prompt(IMP.text.newfolder,"");if(c!=null&&c!=""){$("newMbox").setValue(1);a.setValue(c);message_submit(d)}}else{if(!$F(a)){window.alert(IMP.text.target_mbox)}else{message_submit(d)}}}function updateFolders(a){var b=(a==1)?2:1;$("target"+b).selectedIndex=$("target"+a).selectedIndex}function messageActionsHover(){var a=new Element("IFRAME",{scrolling:"no",frameborder:0}).hide();a.setStyle({position:"absolute"});a.setAttribute("src","javascript:false;");$$("UL.msgactions LI").each(function(b){var c,e=b.down("UL"),d;if(!e){return}c=a.cloneNode(false);b.insert(c);c.clonePosition(e);d=b.getStyle("zIndex");if(d==""){b.setStyle({zIndex:2});c.setStyle({zIndex:1})}else{c.setStyle({zIndex:parseInt(d)-1})}b.observe("mouseout",function(){this.removeClassName("hover");b.down("iframe").hide()});b.observe("mouseover",function(){this.addClassName("hover");b.down("iframe").show()})})}document.observe("dom:loaded",function(){document.observe("keydown",arrowHandler);if(Prototype.Browser.IE){messageActionsHover()}});