// increment rating of message
function plus(id, page,lang){
	$.post('/void/ajax/incrating.php',{'id':id, 'page':page, 'lang':lang}, function(data){
		r = document.getElementById('r'+id);
		g = document.getElementById('g'+id);
		rat = document.getElementById('rat'+id);

		r.setAttribute('style','');
		r.setAttribute('onClick','');

		g.setAttribute('style','');
		g.setAttribute('onClick','');

		rat.innerHTML = data;

		if(data<=-5){
			$('#hide'+id).hide();
			$('#comment'+id).hide();
			$('#show'+id).show();
			}else{
				$('#show'+id).hide();
				$('#hide'+id).hide();
				$('#comment'+id).show();
			}

	},'text');
}

// decrement rating of message
function minus(id, page, lang){
	$.post('/void/ajax/decrating.php',{'id':id, 'page':page, 'lang':lang}, function(data){
		r = document.getElementById('r'+id);
		g = document.getElementById('g'+id);
		rat = document.getElementById('rat'+id);

		r.setAttribute('style','');
		r.setAttribute('onClick','');

		g.setAttribute('style','');
		g.setAttribute('onClick','');

		rat.innerHTML = data;

		if(data<=-5){
			$('#hide'+id).hide();
			$('#comment'+id).hide();
			$('#show'+id).show();
			}else{
				$('#show'+id).hide();
				$('#hide'+id).hide();
				$('#comment'+id).show();
			}

	},'text');
}

//show hidden comment
function show_comm(id, op){	if(op==1){		$('#show'+id).hide();
		$('#comment'+id).show();
		$('#hide'+id).show();
		}else{			$('#hide'+id).hide();
			$('#comment'+id).hide();
			$('#show'+id).show();		}}

// sound off/on
function sound(play){
    $.post('/void/ajax/sound.php',{'to_do':play});
    $('#start').hide();

    if(play==1){
   		$('#player_play').hide();    	$('#player_pause').show();    	}else{    		$('#player_pause').hide();    		$('#player_play').show();    	}
}

// delete comments
function delcom(id, page, lang){
	$.post('/void/ajax/deletecomment.php',{'id':id, 'page':page, 'lang':lang});
	$('#tr_'+id).hide();
	$('#tr2_'+id).hide();
	$('#tr3_'+id).hide();
}
