function submitPoll()
{
	params = Form.serialize( $('pollform') );
  	var url ='/php/poll/poll.php';
  	$('pollform').disabled=true;
  	new Ajax.Request(  url ,{ postBody:params, method:'post', asynchronous:true, onSuccess:updatePoll } );
    return false;
}

function viewPoll(url)
{
	new Ajax.Request( url , { parameters:'' , method:'get', asynchronous:true, onSuccess:updatePoll });
  	return false;
}

function updatePoll(req)
{
	var html= jQuery(req.responseText);

	jQuery('#real-poll').empty().append(html.find('.pollanswers'));

	new Effect.Appear('ajaxGeneratedPoll');
}

function submitRating(theform)
{
	var params = Form.serialize( theform );
  	new Ajax.Request( self.location.protocol+"//"+self.location.host + '/php/rating/rate.php' , 
   		 {	 method:'post' , asynchronous:true, postBody:params , onSuccess:updateRating } );
	return false;
}

function updateRating(req)
{
	var html= req.responseText;
	$('ajaxRatingResult').innerHTML=html;
	new Effect.Fade('ajaxRating');
	new Effect.Appear('articleRatingblock');
}
