function showHide(ID, type)
{
  if ($(ID).visible() == false) {
    if (type == "slide")
      Effect.SlideDown(ID, { duration: 0.6 });
    else
      Effect.Appear(ID, { duration: 1.0 });
  } else {
    if (type == "slide")
      Effect.SlideUp(ID, { duration: 0.5 });
    else
      Effect.Fade(ID, { duration: 0.5 });
  }
}

function getVote(ID)
{
	var send = "";
	var allBoxes = document.body.getElementsByTagName("input");
	for(var i = 0; i < allBoxes.length; i++) {
		if (allBoxes.item(i).name == "vote" + ID) {
			if (allBoxes.item(i).checked == true) send += allBoxes.item(i).value + "|";
		}
  }
	new Ajax.Updater("poll" + ID, '/com_inquiry.php?voting=' + $F('voting' + ID)+ '&vote=' + send + '&sid=' + Math.random(), {method: 'GET'});
}

function articleVote(article_id, vote)
{
  new Ajax.Request("/com_article_vote.php?id=" + article_id + "&vote=" + vote, {
    onSuccess: function(transport) {
      Effect.BlindUp($('voting_vote'), { duration: 0.3 });
      Effect.Fade($('voting_vote'), { duration: 0.3 });
      $('voting').innerHTML = transport.responseText;
    }
  });
}

var now = new Date();
var day = ((now.getDate()<10) ? "0" : "")+ now.getDate();
var tem	= now.getMonth() + 1;
var mon = ((tem<10) ? "0" : "") + tem;
var yea = now.getFullYear();
var dou = yea + "-" + mon + "-" + day;
var dov = yea + mon + day;