function torrentInfo(filename,id)
{
	var url = 'http://www.torrentcity.pl/ajax/torrentinfo/filename/'+filename+'/id/'+id;

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get'
		});
}

function klik(name)
{
	var url = 'http://www.torrentcity.pl/ajax/klik/name/'+name;

	var myAjax = new Ajax.Request(
		url,
		{
			method: 'get',
			onComplete: showResponse2
		});
}


function voteFunc(num, tid)
{
	var url = 'http://torrentcity.pl/ajax/glosuj/value/'+num+'/tid/'+tid;

	var myAjax2 = new Ajax.Request(
		url,
		{
			method:'get',
			onComplete: showResponse
		});
}

function showResponse(Request)
{
	alert(Request.responseText);
}

function showResponse2(Request)
{

}

function sendSB()
{
  var message = $('sbinput').value;
	var url = 'http://torrentcity.pl/shoutbox/dodaj';
	var data = 'message='+message;
	var myAjax3 = new Ajax.Request(
		url,
		{
			method:'post',
			parameters: data,
			onComplete: showSbmsg
		});
  $('sbinput').value = '';

 var f = window.$('sbmain');
 f.contentWindow.location.reload(true);
}

function showSbmsg(Request)
{
  if(Request.responseText==1 || Request.responseText==2) alert('W Shoutboxie pisać mogą jedynie osoby zalogowane, posiadające konto przynajmniej 3 dni');
}

