<!--
var now = new Date();
var year = now.getYear();
if (year < 1900) {
	year += 1900;
}
var now = new Date();
var day = now.getDate();
//var day=day;
var day = 31;
var now = new Date();
var month = now.getMonth();
month= month+1;

var end = new Date("Dec" + day +", " + year + " 18:00:00 GMT");

document.write('<td style="text-align: left; position:absolute; top: 393px;	left: 477px;">');
document.write('<span id="c2" style="font: bold 17px arial; color: #990000"></span><br />');
document.write('</td>');



function toSt2(n) {
  s = "";
  if (n < 10) s += "0";
  return (s + n).toString();
}
function toSt3(n) {
  s = "";
  if (n < 10) s += "00";
  else if (n < 100) s += "0";
  return (s + n).toString();
}
function countdown() {
  d = new Date();
  count = Math.floor(end.getTime() - d.getTime());
  if(count > 0) {
    miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
    seconds = toSt2(count%60); count = Math.floor(count/60);
    minutes = toSt2(count%60); count = Math.floor(count/60);
    hours = toSt2(count%24); count = Math.floor(count/24);
    days = count;
  
  if (count > 0) {
    // last 15 min //
    if (hours==0 && minutes <= 15) {
	document.getElementById('c2').innerHTML =  '<span style="font: bold 16px arial; color: #990000">Join the war system in</span><br />' + minutes + ' min :  ' + seconds + ' sec ';
    setTimeout("countdown()", 50);}
	// higher 15 min //
	if (hours==0 && minutes > 15) {
	document.getElementById('c2').innerHTML = '<span style="font: bold 16px arial; color: #990000">Next Nation War in</span><br />' + hours + ' h :  ' + minutes + ' m :  ' + seconds + ' s ';
    setTimeout("countdown()", 50);}
	
	if (hours==23 && minutes > 20) {
	document.getElementById('c2').innerHTML =  '<span style="font: bold 16px arial; color: #990000">You can enter <br /> Tierra Gloriosa, now !</span>';
    setTimeout("countdown()", 50);}

	if (hours==23 && minutes <= 20) {
	document.getElementById('c2').innerHTML = '<span style="font: bold 16px arial; color: #990000">Next Nation War in</span><br />' + hours + ' h :  ' + minutes + ' m :  ' + seconds + ' s ';
    setTimeout("countdown()", 50);}
	
	if (hours >0 && hours < 23 ) {
	document.getElementById('c2').innerHTML = '<span style="font: bold 16px arial; color: #990000">Next Nation War in</span><br />' + hours + ' h :  ' + minutes + ' m :  ' + seconds + ' s ';
    setTimeout("countdown()", 50);}
	
  }else { document.getElementById('c2').innerHTML = '<span style="font: bold 16px arial; color: #990000">You can enter <br /> Tierra Gloriosa, now !</span>'; }
}}
//-->