// $Header: /HBI Websites/websites/beta/BETA.HIREDIVERSITY.COM/_client/js/update_job_total.js 1     9/06/07 11:49a Ricardo.peinado $

function update_job_total(form)
{	var q = form.quantity.value;
	var s = document.getElementById("job_total");

	if (!s)
	{	alert("could not find job_total element");
	}

	var t = 0;

	if (!/^\d+$/.test(q))
	{	t = "??";
	} else if (q > 50 || q <= 0)
	{	t = "??";
	} else
	{	if (q >= 41)
		{	pricePerJob = 125;
		} else if (q >= 31)
		{	pricePerJob = 150;
		} else if (q >= 21)
		{	pricePerJob = 175;
		} else if (q >= 11)
		{	pricePerJob = 200;
		} else if (q >= 2)
		{	pricePerJob = 225;
		} else
		{	pricePerJob = 275;
		}

		t = "$" + (pricePerJob * q) + ".00";
	}

	s.innerHTML = t;	
}
