faf=null;mso=null;int1=null;var dss_num=0;draggedleft=null;nowX=0;CountDownNextSpanId=0;function gas(){faf=window.setTimeout('eni2()',1000);}function objx(objj){var curleft=0;if (objj.offsetParent){while(objj.offsetParent){curleft+=objj.offsetLeft;objj=objj.offsetParent;}}else if (objj.x)curleft+=objj.x;if (navigator.userAgent.indexOf('MSIE')>=0){curleft+=10}return curleft;}function objy(objj){var curtop=0;if (objj.offsetParent){while (objj.offsetParent){curtop+=objj.offsetTop;objj=objj.offsetParent;}}else if (objj.y)curtop+=objj.y;if (navigator.userAgent.indexOf('MSIE')>=0){curtop+=14}return curtop;}function getmouseX(e){return (e.clientX)||(e.pageX)||(event.x);}function getmouseY(e){return (e.clientY)||(e.pageY)||(event.y);}function getscrolledLeft(){if (navigator.userAgent.indexOf('MSIE')>=0){return window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft||document.documentElement.clientLeft||0;}else{return 0;}}function getscrolledTop(){if (navigator.userAgent.indexOf('MSIE')>=0){return window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop||document.documentElement.clientTop||0;}else{return 0;}}function eni(e,txt,wht,txt2){if (document.getElementById("a")){if (wht){dd="onmouseout=';gas()' onmouseover='window.clearTimeout(faf);' onclick='eni2()' ";heightd=wht.offsetHeight||wht.style.height||15;gX=objx(wht);gY=objy(wht)+heightd;}else{dd="";scrolledLeft=getscrolledLeft();scrolledTop=getscrolledTop();gX=getmouseX(e)+11+scrolledLeft;gY=getmouseY(e)+11+scrolledTop;}if ((wht)&&(document.getElementById("a").innerHTML!=="")){document.getElementById("a").innerHTML="";}else{tx2="";if ((txt2!=="")&&(txt2!==undefined)){tx2='<div '+dd+'style="border:1px solid #CC1A00; position:absolute; left:'+gX+'px; top:'+(gY+23)+'px;background-color:#EAA6A6"><p align="left" style="margin: 1px"><font face="Tahoma" color="#881100" size="2">'+txt2+'</font></div>';}document.getElementById("a").innerHTML='<div '+dd+'style="border:1px solid #4A457A; position:absolute; left:'+gX+'px; top:'+gY+'px;background-color:#4A457A"><div style="border:1px solid #868BBB;background-color:#4A457A;"><p align="left" style="margin: 1px"><font face="Tahoma" color="#BCBED3" size="2">'+txt+'</font></div></div>'+tx2;}}}function eni2(){if (document.getElementById("a")){document.getElementById("a").innerHTML="";}}function dragleft(whtg,e){if (whtg==draggedleft){antX=nowX;nowX=getmouseX(e);tos=0;if (antX<nowX){tos=nowX-antX;}else{tos=nowX-antX;}if ((antX==nowX)||(antX==0)){tos=0;}whtg.style.left=objx(whtg)+tos;}}function resetIt(){if (document.getElementById('avsdiv')){scrolledTop=getscrolledTop();document.getElementById('avsdiv2').style.margin=scrolledTop+'px 0px 0px 0px';}else{if (int1==null){clearInterval(int1);int1=null;}}}function avs(title,txt,buttons,closable,confirmtxt,onconfirmgoto){if (document.getElementById('avsdiv')){document.body.removeChild(document.getElementById('avsdiv'));document.body.removeChild(document.getElementById('avsdiv2'));if (int1==null){clearInterval(int1);int1=null;}}else{var div = document.createElement('div');div.id='avsdiv';div.className='avsdiv';if (navigator.userAgent.indexOf('MSIE')>=0){var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;}else{var width=window.innerWidth;var height=window.innerHeight;}div.style.zIndex=500;div.style.overflow='hidden';if (navigator.userAgent.indexOf('MSIE 6.0')>=0){document.body.style.width='100%';document.body.style.height='100%';div.style.width=document.body.offsetWidth+'px';div.style.height=document.body.offsetHeight+'px';div.style.position="absolute";}else{div.style.position='fixed';div.style.width='100%';div.style.height='100%';}div.style.display='block';div.style.left='0px';div.style.top='0px';document.body.appendChild(div);var div2 = document.createElement('div');div2.id='avsdiv2';div2.className='avsdivb';div2.style.zIndex=520;div2.style.overflow='hidden';if (navigator.userAgent.indexOf('MSIE')>=0){div2.style.width='100%';div2.style.height='100%';div2.style.position="absolute";scrolledTop=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop||document.documentElement.clientTop||0;div2.style.margin=scrolledTop+'px 0px 0px 0px';int1=setInterval('resetIt()',30);}else{div2.style.position='fixed';div2.style.width='100%';div2.style.height='100%';}div2.style.display='block';div2.style.left='0px';div2.style.top='0px';comm="'";butt='onclick="avs();location.href='+comm+onconfirmgoto+comm+'"';if (closable){cancel='<a style="CURSOR:pointer" onclick="avs()"><b><font style="float:right;margin:-1px 1px;" face="Copperplate Gothic Bold" size="4" color="#800000"><span style="text-decoration:none">X</span></font></b></a>';}else{cancel='';}if (buttons){butt='<table width=100%><tr><td width=50% align=center><input class=boton type=button value="'+confirmtxt+'" '+butt+'></td><td width=50% align=center><input class=boton type=button value="Cancelar" onclick=avs()></td></tr></table>';}else{butt='';}div2.innerHTML='<table border=0 width="100%" height="100%" style="position:absolute"><tr><td><center><div class=avsdiv2><div class=avsdiv3><font style="float:left;margin-left:3px;" size=2><b>'+title+'</b></font>'+cancel+'</div><center><font size=2><b>'+txt+'</b></font>'+butt+'</center></div></center></td></tr></table>';document.body.appendChild(div2);}}function CountDown(secs,whi,sts,onEnd,onEndWith,onEndWhat){if (whi==undefined){document.write("<span id=\"CntDw"+CountDownNextSpanId+"\"></span>");whi=document.getElementById("CntDw"+CountDownNextSpanId);thisSessionSpanName="CntDw"+CountDownNextSpanId;CountDownNextSpanId++;}else{thisSessionSpanName=whi;whi=document.getElementById(whi);}nextmins=Math.floor(secs/60);nextsecs=secs-(nextmins*60);nexthours=Math.floor(nextmins/60);nextmins=nextmins-(nexthours*60);days=Math.floor(nexthours/24);nexthours=nexthours-(days*24);if (nextmins < 10){nextmins="0"+nextmins;}if (nextsecs < 10){nextsecs="0"+nextsecs;}if (days > 0){nextdays=days+" día ";}else{nextdays="";}if (secs<0){whi.innerHTML="0:00:00";if (onEnd==undefined){document.location=document.location}else{if (onEnd=="write"){setTimeout("document.getElementById('"+onEndWith+"').innerHTML='"+onEndWhat+"'")}}}else{if (sts==undefined){document.title=nextdays+nexthours+":"+nextmins+":"+nextsecs+" - War Start";}else{sts='""'}whi.innerHTML=nextdays+nexthours+":"+nextmins+":"+nextsecs;if (onEnd==undefined){setTimeout("CountDown("+(secs-1)+",'"+thisSessionSpanName+"',"+sts+")",1000)}else{setTimeout("CountDown("+(secs-1)+",'"+thisSessionSpanName+"',"+sts+",'"+onEnd+"','"+onEndWith+"','"+onEndWhat+"')",1000)}}}function validar(e){tcl=(document.all)?e.keyCode:e.which;if (tcl==8){return true;}exr=/\d/;te=String.fromCharCode(tcl);return exr.test(te);}function CP(hy){hy=""+hy+"";if (hy.length>3){num="";while (hy.length>0){if (hy.length==2){num=hy+"."+num;hy=""}else{num=hy.substr(hy.length-3,hy.length)+"."+num;hy=hy.substr(0,hy.length-3);}}num=num.substr(0,num.length-1);}else{num=hy;}return num;}function addo(msx){oro_act++;if (!(oro_act>=msx)){document.getElementById("rec_oro").innerHTML=CP(String(oro_act));}else{document.getElementById("rec_oro").style.color="#FFDDBB";document.getElementById("rec_oro").innerHTML=CP(String(msx));oro_act=msx;}}function addm(msx){metal_act++;if (!(metal_act>=msx)){document.getElementById("rec_metal").innerHTML=CP(String(metal_act));}else{document.getElementById("rec_metal").style.color="#FFDDBB";document.getElementById("rec_metal").innerHTML=CP(String(msx));metal_act=msx;}}function addt(msx){tritio_act++;if (!(tritio_act>=msx)){document.getElementById("rec_tritio").innerHTML=CP(String(tritio_act));}else{document.getElementById("rec_tritio").style.color="#FFDDBB";document.getElementById("rec_tritio").innerHTML=CP(String(msx));tritio_act=msx;}}function dss_goon(dss_num,r,GoTo){r--;if (r<1){document.getElementById("dss"+dss_num+"_sub").innerHTML="";document.getElementById("dss"+dss_num+"_img").style.background="url('amp_akt.gif')";document.getElementById("dss"+dss_num+"_prin").style.cursor="pointer";document.getElementById("dss"+dss_num+"_prin").GoTo=GoTo;document.getElementById("dss"+dss_num+"_prin").onclick=function(){location.href=document.getElementById("dss"+dss_num+"_prin").GoTo};document.getElementById("dss"+dss_num+"_prin").onmouseover=function(){document.getElementById("dss"+dss_num+"_img").style.backgroundPosition="0px 44px"};document.getElementById("dss"+dss_num+"_prin").onmouseout=function(){document.getElementById("dss"+dss_num+"_img").style.backgroundPosition="0px 0px"};}else{if (r==Infinity){document.getElementById("dss"+dss_num+"_sub").innerHTML="<font color=darkred>Producción insuficiente.</font>";return;}nextmins=Math.floor(r/60);nextsecs=r-(nextmins*60);nexthours=Math.floor(nextmins/60);nextmins=nextmins-(nexthours*60);days=Math.floor(nexthours/24);nexthours=nexthours-(days*24);if (nextmins < 10){nextmins="0"+nextmins;}if (nextsecs < 10){nextsecs="0"+nextsecs;}if (days > 0){if (days==1){nextdays=days+" día "}else{nextdays=days+" días "};}else{nextdays="";}if (days>9){document.getElementById("dss"+dss_num+"_sub").style.fontSize="12px"}else{document.getElementById("dss"+dss_num+"_sub").style.fontSize="13px"}if (days>9999){document.getElementById("dss"+dss_num+"_sub").style.fontSize="11px"}document.getElementById("dss"+dss_num+"_sub").innerHTML="Disponible en: "+nextdays+nexthours+":"+nextmins+":"+nextsecs;setTimeout("dss_goon("+dss_num+","+r+",'"+GoTo+"')",1000);}}function dss(c1,c2,c3,lvl,GoTo){document.write('<div id="dss'+dss_num+'_prin" style="background-image:url(\'amp.gif\');width:178px;height:72px;background-repeat:no-repeat;"><div style="width:178px;height:45px;"><div style="float:left; width:81px; height:44px; font-size:4px"><center>&nbsp;<br></font><b><font size="6" face="Arial Black" color="#008000">');document.write((lvl+1) + '</font></b></center></div><div id="dss'+dss_num+'_img" style="float:right;width:62px;height:44px;background-image:url(\'amp_akt_inaktive.gif\');"></div></div>');document.write('<div id="dss'+dss_num+'_sub" style="width:178px;height:27px;text-align:center;font-size:13px;font-family:\'Palatino Linotype\';color:#B5B7C4"></div>');document.write('</div>');r1=(c1-oro_act)/oro_por||0;r2=(c2-metal_act)/metal_por||0;r3=(c3-tritio_act)/tritio_por||0;r=r1;if ((r1>r2)&&(r1>r3)){r=r1};if ((r2>r1)&&(r2>r3)){r=r2};if ((r3>r1)&&(r3>r2)){r=r3};dss_goon(dss_num,Math.floor(r+1),GoTo);dss_num++;}