var globID;

function handleHttpResponse()
{
	if (http.readyState == 4)
	{
		document.getElementById( 'votesNum' + globID ).innerHTML = http.responseText;
	}
}

function VotesPlus( id )
{
    globID = id;
    http.open("GET", rootUrl + "?act=vote/plus&id="+id , true);
	http.onreadystatechange = handleHttpResponse;
	http.send(null);
}

function VotesMinus( id )
{
	globID = id;
    http.open("GET", rootUrl + "?act=vote/minus&id="+id , true);
	http.onreadystatechange = handleHttpResponse;
	http.send(null);
}

function getHTTPObject()
{

  var xmlhttp;

  /*@cc_on

  @if (@_jscript_version >= 5)

    try {

      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

    } catch (e) {

      try {

        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {

        xmlhttp = false;

      }

    }

  @else

  xmlhttp = false;

  @end @*/

  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {

    try {

      xmlhttp = new XMLHttpRequest();

    } catch (e) {

      xmlhttp = false;

    }

  }

  return xmlhttp;

}

var http = getHTTPObject(); // We create the HTTP Object


if (document.all)
{
	document.getElementsByName = function (params)
	{
		var _elementsByName = new Array ();

		for (var i in document.all)
		{
			try
			{
				if (document.all [i].getAttribute ("name") == params) _elementsByName [_elementsByName.length] = document.all [i];
				//document.body.innerHTML += i;
			}
			catch (e){};
		}

		return _elementsByName;
	}
}


function uMail(name,domain,obj)
{
	if (obj.href=='mailto:'){
	var email = name+'@'+domain;
	obj.href = 'mailto:'+email;
	obj.title = email;
	obj.innerHTML = email;
	}
return true;
}