

function set_sector(sector)
{
	document.menu.SELECT_TYPE.value = "SECTOR";
	document.menu.SELECT_VALUE.value = sector;
	document.menu.submit();
}

function set_all_sectors()
{
	document.menu.SELECT_TYPE.value = "ALL_SECTORS";
	document.menu.SELECT_VALUE.value = 0;
	document.menu.submit();
}

function set_location(location)
{
	document.menu.SELECT_TYPE.value = "LOCATION";
	document.menu.SELECT_VALUE.value = location;
	document.menu.submit();

}

function get_more(vacancy)
{
	document.listJobs.VACANCY_ID.value = vacancy;
	document.listJobs.button.value = "More";
	document.listJobs.submit();
}

function register()
{
	document.listJobs.button.value = "Register";
	document.listJobs.submit();
}

function candidate_submit()
{
	document.cand_register.button.value = "Register";
	document.cand_register.submit();
}

function employer_submit()
{
	document.emp_register.button.value = "Register";
	document.emp_register.submit();
}

function alert_submit(response)
{
	document.cand_register.button.value = response;
	document.cand_register.submit();
}


function setVacancy(vacancy)
{
	document.listJobs.VACANCY_ID.value = vacancy;
}


function updateTable()
{
	var total = 0;
	var exec;

	for(var index=1; index <=6; index++)
	{
		if(typeof "count_" + index == 'undefined')
		{
			// alert("Variable count_" + index + " is undefined");
		}
		else
		{
			// alert("Variable count_" + index + " is defined");
				

			exec = "total += count_" + index;
			eval(exec);
		

			exec = "document.getElementById('cell_" + index + "').innerHTML = (count_" + index + " == 0)? ' ': count_" + index;
			eval(exec);

			document.getElementById('cell_total').innerHTML = total;

		}
	}

}


