function commentRating(toDiv,cID,cType) {
var url = 'modules/ajax/utils.php';
// var params = 'startCountry='+document.getElementById('startCountry').value;
var params = 'cID='+cID+'&cType='+cType;
var ajax = new Ajax.Updater(
{success: toDiv},
url,
{method: 'get', parameters: params, onFailure: reportError});
}

function reportError(request) {
$F('error') = "Error";
}

function editImage(id) {
	var url = 'modules/ajax/utils.php';
	var pars='editImageID='+id;
	var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: showResponseIE} );
}
function showResponseIE (originalRequest) {
	var newData = originalRequest.responseText;
	$('imagesDiv').style.display = 'none';
	$('editImage').innerHTML = newData;
}

function insertRub() {
	var url = 'modules/ajax/utils.php';
	var pars = Form.serialize('insertRubForm');
	document.getElementById('newRubrika').value='';
	// alert(pars);
	var myAjax = new Ajax.Request( url, {method: 'post', parameters: pars, onComplete: showResponseRub} );
}
function showResponseRub (originalRequest) {
	var newData = originalRequest.responseText;
	$('insertRub').style.display = 'none';			
	$('rub_radio').innerHTML = newData;
}

function starrating(id,r,c) {
	var url = 'modules/ajax/utils.php';
	var pars='rateID='+id+'&r='+r+'&c='+c;
	var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars, onComplete: 	function(originalRequest){
	var newData = originalRequest.responseText;
	$('ratingblock_'+id).innerHTML = newData;	
}} );
	
}