	
	
	function show_page(nr)
	{
		document.frmJobList.page.value = nr;
		document.frmJobList.submit();
	}
	
	
	function showdetail(id)
	{
		document.frmJobList.position_id.value = id;
		document.frmJobList.action = 'JobDetail.asp';
		document.frmJobList.submit();
	}
	
	function go_back_to_list()
	{
		document.frmJobList.action = 'SearchResults.asp';
		document.frmJobList.submit();
	}
	
	
	
	function toggleJob(strJID)
	{
		var txtref = document.frmJobList.sSelectedJobs;
		var myString = document.frmJobList.sSelectedJobs.value;
//alert(myString);
		var index = myString.indexOf(",");
		var counter = 0;

		var idx = myString.indexOf(strJID);
		if (idx >= 0)
		{
			counter--;
		}

		while (index != -1)
		{
//alert(index);
			index = myString.indexOf(",", index + 1);
			counter++;
		}
//alert(counter);

//Maybe make the 19 a variable in a bean or read it from the database.
		if (counter > 19)
		{
			var imgref = document.getElementById('jobMark' + strJID);
			imgref.checked = false;
			return;
		}

		if (txtref) {
			if ((txtref.value.length > 0) && (txtref.value.indexOf((strJID + ','), 0) >= 0))
			{
				document.frmJobList.sSelectedJobs.value = document.frmJobList.sSelectedJobs.value.replace(strJID + ',', '');
				if (document.frmJobList.sSelectedJobs.value == "")
				{
					//document.frmJobList.sSelectedJobs.value = " ";
				}
			}
			else
			{
				document.frmJobList.sSelectedJobs.value = document.frmJobList.sSelectedJobs.value + (strJID + ',');
			}
		}
	}
	function sendcv()
	{
		document.frmJobList.action = "SubmitCV.asp";
		document.frmJobList.submit();
	}
	
	function sendcv_job(id)
	{
		document.frmJobList.action = "SubmitCV.asp";
		document.frmJobList.sSelectedJobs.value = id + ',';
		document.frmJobList.submit();
	}
	
//-->


