Event.observe(document, "dom:loaded", function(){
  // initially hide all containers for tab content
  var options = {
    method:"post",
	script:true,
    postBody: 'showr='+ 1 + '&gid='+ gid,
    onComplete:showResponser
};

new Ajax.Request('http://www.loglod.com/NewM/rating.php',options);
});

function showResponser (originalRequestr) {
var newData = originalRequestr.responseText;
$$("#current-rating").invoke('setStyle',{width: '' + newData + '%'});
}
	
function ratinadd( value, gid )
{
var gid;
var options = {

    method:"post",
    script:true,
    postBody: 'value='+ value + '&gid='+ gid,
    onComplete:showResponse

};

new Ajax.Request('http://www.loglod.com/NewM/rating.php',options); 

}
function showResponse (originalRequest) {
var newData = originalRequest.responseText;
$("ratelinks").remove();
// get rating after click
$$("#current-rating").invoke('setStyle',{width: '' + newData + '%'});
}
