function t(){v=new Date();n=new Date();o=new Date();for(cn=1;cn<=anz;cn++){bxx=document.getElementById("bxx"+cn);ss=bxx.title;s=ss-Math.round((n.getTime()-v.getTime())/1000);m=0;h=0;if(s<0){bxx.innerHTML="-"}else{if(s>59){m=Math.floor(s/60);s=s-m*60}if(m>59){h=Math.floor(m/60);m=m-h*60}if(s<10){s="0"+s}if(m<10){m="0"+m}bxx.innerHTML=h+":"+m+":"+s+""}bxx.title=bxx.title-1}window.setTimeout("t();",999)}var x="";var e=null;function cntchar(a){if(window.document.forms[0].text.value.length>a){window.document.forms[0].text.value=x}else{x=window.document.forms[0].text.value}if(e==null){e=document.getElementById("cntChars");e.childNodes[0].data=window.document.forms[0].text.value.length}else{e.childNodes[0].data=window.document.forms[0].text.value.length}}function popupWindow(f,c,g,i,j,d,k,b,l,a){var p=window.open(f,c,"scrollbars=yes,menubar="+i+",top="+j+",left="+d+",toolbar="+k+",width="+b+",height="+l+",resizable="+a+"");p.focus()}function fenster(b,a){var c=window.open(b,a,"scrollbars=yes,menubar=no,top=0,left=0,toolbar=no,width=550,height=280,resizable=yes");c.focus()}function fenstered(b,a){var c=window.open(b,a,"scrollbars=yes,menubar=no,top=0,left=0,toolbar=no,width=550,height=280,resizable=yes");c.focus()}function haha(z1){eval("location='"+z1.options[z1.selectedIndex].value+"'")}function tb_open(a){tb_show(null,a,false)}function tb_remove_openNew(a){tb_remove();setTimeout("tb_open_new('"+a+"')",500)}function tb_initialize(){tb_init("a.thickbox, area.thickbox, input.thickbox, a.ajax_thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage}function tb_is_open(){return TB_open}function tb_remove_iframe(a){a=!a?event:a;tastenCode=a.keyCode?a.keyCode:a.which;if(tastenCode==27){self.parent.tb_remove()}}function link_to_gamepay(){document.getElementsByName("lang");document.getElementsByName("name");document.getElementsByName("playerid");document.getElementsByName("checksum");document.getElementsByName("session")}function showGalaxy(c,b,a){if(typeof window.opener=="undefined"||window.opener==null){document.location.href="index.php?page=galaxy&no_header=1&galaxy="+c+"&system="+b+"&planet="+a+"&session="+session}else{window.opener.document.location.href="index.php?page=galaxy&no_header=1&galaxy="+c+"&system="+b+"&planet="+a+"&session="+session}}function showRenamePlanet(a){if(typeof window.opener=="undefined"||window.opener==null){document.location.href="index.php?page=renameplanet&session="+session+"&pl="+a}else{window.opener.document.location.href="index.php?page=renameplanet&session="+session+"&pl="+a}}function showFleetMenu(f,d,b,c,a){if(typeof window.opener=="undefined"||window.opener==null){document.location.href="index.php?page=flotten1&session="+session+"&galaxy="+f+"&system="+d+"&planet="+b+"&planettype="+c+"&target_mission="+a}else{window.opener.document.location.href="index.php?page=flotten1&session="+session+"&galaxy="+f+"&system="+d+"&planet="+b+"&planettype="+c+"&target_mission="+a}}function showMessageMenu(a){if(typeof window.opener=="undefined"||window.opener==null){document.location.href="index.php?page=writemessages&session="+session+"&messageziel="+a}else{window.opener.document.location.href="index.php?page=writemessages&session="+session+"&messageziel="+a}}function submitOnEnter(a){var b;if(window.event){b=window.event.keyCode}else{if(a){b=a.which}else{return true}}if(b==13){trySubmit();return false}else{return true}}function formSubmitOnEnter(b,a){var c;if(window.event){c=window.event.keyCode}else{if(a){c=a.which}else{return true}}if(c==13){document.forms[b].submit();return false}else{return true}}function show_hide_tr(a){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block"}else{document.getElementById(a).style.display="none"}}function setMaxIntInput(a){for(var b in a){if(!$("#ship_"+b).attr("disabled")){$("#ship_"+b).val(a[b]);checkIntInput("ship_"+b,0,a[b])}}}function clearInput(a){$("#"+a).val("")}function setTemplate(b,a){for(var c in b){if(!$("#ship_"+c).attr("disabled")){$("#ship_"+c).val(b[c])}if(typeof a[c]=="undefined"){a[c]=0}checkIntInput("ship_"+c,0,a[c])}}function checkIntInput(c,a,b){value=$("#"+c).val();if(value!=""){intVal=trimInteger(value);intVal=parseInt(value);intVal=(isNaN(intVal)||intVal==0)?a:intVal;intVal=Math.abs(intVal);if(b!=null){intVal=Math.min(intVal,b)}$("#"+c).val(intVal)}}function handlerToSubmitAjaxForm(b){var a="submit_"+String(b);if($.isFunction(window[a])){window[a]()}return false};