function showElement(e) {
	document.getElementById(e).style.display="block";
}

function hideElement(e) {
	document.getElementById(e).style.display="none";
}

function hoverBox(box_num) {
	var b_id = "ab_"+box_num;
	var l_id = "ab_l_"+box_num;
	var p_id = "ab_p_"+box_num;
	
	document.getElementById(b_id).style.background='url(./design/bg_autobox_on.gif)';
	document.getElementById(l_id).style.color='#bb0403';
	document.getElementById(p_id).style.color='#000';
}

function unhoverBox(box_num) {
	var b_id = "ab_"+box_num;
	var l_id = "ab_l_"+box_num;
	var p_id = "ab_p_"+box_num;
	
	document.getElementById(b_id).style.background='url(./design/bg_autobox.gif)';
	document.getElementById(l_id).style.color='#838383';
	document.getElementById(p_id).style.color='#969696';
}

function hoverRow(row_num) {
	var l_id = "r_l_"+row_num;
	var p_id = "r_p_"+row_num;
	
	document.getElementById(l_id).style.color='#bb0403';
	document.getElementById(p_id).style.color='#000';
}

function unhoverRow(row_num) {
	var l_id = "r_l_"+row_num;
	var p_id = "r_p_"+row_num;
	
	document.getElementById(l_id).style.color='#000';
	document.getElementById(p_id).style.color='#646464';
}

function deleteCar(car) {
	if(confirm("Opravdu chcete smazat toto vozidlo?")) xajax_deleteCar(car);
}

function deleteCarImg(image) {
	if(confirm("Opravdu chcete smazat tuto fotografii?")) xajax_deleteCarImg(image);
}

function sendNesrovnalosti(car_id, url) {
	if(confirm("Opravdu chcete odeslat informaci o nesrovnalosti s tímto inzerátem?")) xajax_sendNesrovnalosti(car_id, url);
}

function setPlace(place_id) {
	var value = document.getElementById("kraj_"+place_id).value;

	if(value == 0) document.getElementById("kraj_"+place_id).value = 1;
	else document.getElementById("kraj_"+place_id).value = 0;
}
