var tab_bottom_selected = tab_bottom_selected;
var tab_selected = tab_selected;
var base_url = base_url;

if(tab_bottom_selected==undefined)
	tab_bottom_selected = "tab_wedding";

function tab_start() {
	if(tab_selected==1)tab_wojewodztwo();
		else tab_miasto();
}

function clear_box() {
    document.getElementById("city_td").setAttribute('value', '');
}

function tab_bottom_start() {
	document.getElementById(""+tab_bottom_selected+"").src = base_url + "gfx/" + tab_bottom_selected + "_on.gif";
}

function tab_wojewodztwo() {
	document.getElementById("tab-left-img").src = base_url + "gfx/wojewodztwo-on.gif";
	document.getElementById("tab-right-img").src = base_url + "gfx/miasto-off.gif";
}

function tab_miasto() {
	document.getElementById("tab-left-img").src = base_url + "gfx/wojewodztwo-off.gif";
	document.getElementById("tab-right-img").src = base_url + "gfx/miasto-on.gif";
}

function tab_on(id) {
	document.getElementById(tab_bottom_selected).src = base_url + "gfx/" + tab_bottom_selected + "_off.gif";
	document.getElementById(id).src = base_url + "gfx/" + id + "_on.gif";
}

function tab_off(id) {
	document.getElementById(id).src = base_url + "gfx/" + id + "_off.gif";
	tab_bottom_start();
}
