function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='country.php?page="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
function change_lnk(div_id)
{
	document.getElementById(div_id).style.background = "#ffffff";
	document.getElementById("img_"+div_id).innerHTML = '<img src="images/arrow_1_on.gif" width="11" height="12" border="0" style="position:relative; top:2px;">';
}
function change_lnk_back(div_id)
{
	document.getElementById(div_id).style.backgroundImage = "url('images/left_in.jpg')";
	document.getElementById("img_"+div_id).innerHTML = '<img src="images/arrow_1.gif" width="11" height="12" border="0" style="position:relative; top:2px">';

}

function highlight_menu(place_id)
{
		$('place_'+place_id).style.background = '#ffffff';
		$('corner_'+place_id).innerHTML = '<img src="images/place/active_arrow.gif" border="0">';		
}

function highlight_default(place_id)
{
	$('place_'+place_id).style.background = 'transparent';
	$('corner_'+place_id).innerHTML = '<img src="images/place/arrow.gif" border="0">';
}

function loading(div_id)
{
	$(div_id).innerHTML = '<img src="images/place/loading.gif">';
}

function leave_comment()
{
	var url = 'classes/leave_comment.php';
	var params = Form.serialize("leave_comment_form");
	var target = 'form_result';
	var myAjax_email = new Ajax.Updater(target , url, {	method: 'get',	parameters: params, onComplete:show_one_comment});
}

function show_one_comment()
{
	
cur_id = $('show_one_com').value;
	if (cur_id != 0) 
	{
		$('leave_comment_form').style.display='none';
                $('write_you_feedback').style.display='none';
                loading('cur_comment_out');
		
		$('food_'+$('food').value).className = 'inactive_score';
		$('food').value = '';
		$('service_'+$('service').value).className = 'inactive_score';
		$('service').value = '';
		$('decor_'+$('decor').value).className = 'inactive_score';
		$('decor').value = '';
		$('price_'+$('price').value).className = 'inactive_score';
		$('price').value = '';
		
		document.leave_comment_form.reset();			
		var url = 'classes/show_one_comment.php';
		var params = "comment_id="+cur_id;
		var target = 'cur_comment_out';
		var myAjax_email = new Ajax.Updater(target , url, {	method: 'get',	parameters: params});
		$('be_first').style.display = 'none';			

	}
}

function next_action()
{
	nextaction = $('next_action').value;
	alert(nextaction);
}

function show_comments(place_id, cur_page)
{
	loading('all_comments');
	var url = 'classes/show_comments.php';
	var params = "place_id="+place_id+"&cur_page="+cur_page;
	var target = 'all_comments';
	var myAjax_email = new Ajax.Updater(target , url, {	method: 'get',	parameters: params});
}

function digits()
{
	var url = 'classes/change_digits.php';
	var params = '';
	var target = 'div_digits';
	var myAjax_email = new Ajax.Updater(target , url, {	method: 'get',	parameters: params});

}

function choose_score(score, option)
{
	current_value = $(option).value;
	if (current_value != '') $(option+'_'+current_value).className = 'inactive_score';
	$(option+'_'+score).className = 'active_score';
	$(option).value = score;
}
