	var newwindow;
	function popdetails(url) {
		newwindow=window.open(url,'popdetails','height=500,width=500,resizable=yes,scrollbars=yes,status=yes');
		if (window.focus) newwindow.focus();
	}

	function poppeer(url) {
		newwindow=window.open(url,'poppeers','height=400,width=650,resizable=yes,scrollbars=yes');
		if (window.focus) newwindow.focus();
	}

	function resize(img) {
		if (img.width>500) {
			img.height=parseInt(img.height*500/img.width);
			img.width=500;
			img.title='Click on image for full size view.';
			var foo=document.getElementById(img.name);
			foo.innerHTML='<strong>Click on image for full size view.</strong><a href="'+img.src+'" target="_blank">'+foo.innerHTML+'</a>';
		}
	}

	function resize_avatar(img) {
		if(img.width>80) {
			img.height=parseInt(img.height*80/img.width);
			img.width=80;
		}
	}
        
       
// START Countdown system [Crusher & Otger]
/*
var countdown = new Object();
    countdown.targetTime = 1308355200000;
    countdown["\x64\x61\x74\x61"] = ["\x21\x46\x65\x6C\x69\x7A\x20\x41\x6E\x69\x76\x65\x72\x73\x61\x72\x69\x6F\x2C\x20\x4D\x65\x63\x65\x64\x61\x21"];

countdown.start = function() {
    this.element = document.getElementById("Countdown");
    countdown.update();
    this.intervalId = setInterval("countdown.update();", 1000);
}

countdown.update = function() {
  var now = new Date();
  var left = this.targetTime - (now.getTime() - now.getTimezoneOffset()*60000);
  if (left >= 0) {
    var sec = Math.floor(left / 1000);
    var min = Math.floor(sec / 60);
    var hour = Math.floor(min / 60);
    var days = Math.floor(hour / 24);
    hour = hour % 24;
    min = min % 60;
    sec = sec % 60;
    
    this.element.innerHTML = "" + days + " d&iacute;a" + ((days != 1)? "s" : "") + ", " + hour + " hora" + ((hour != 1)? "s" : "") + ", " + min + " minuto" + ((min != 1)? "s" : "") + " y " + sec + " segundo" + ((sec != 1)? "s" : "") + "...";
  }
  else {
    this.element.innerHTML = this.data[0];
    clearInterval(this.intervalId);
  }
}
*/
// END Countdown system


// START Spoiler BBcode [Otger]
function spoiler(btn) {
  var div = btn.parentNode.parentNode.getElementsByTagName('div')[1];
  btn.innerHTML = btn.getAttribute('title');
  if (div.style.display != 'block') {
    div.style.display = 'block';
    btn.innerHTML += ' (ocultar)';
  } else {
    div.style.display = 'none';
    btn.innerHTML += ' (mostrar)';
  }
}
// END Spoiler BBCode

