// $Header: /HBI Websites/websites/beta/BETA.HIREDIVERSITY.COM/_client/js/update_search_and_post_total.js 1     9/06/07 11:49a Ricardo.peinado $
function update_search_and_post_total(form)
{
	var m = form.productid[0].options[form.productid[0].selectedIndex].value;
	var r = form.quantity[1].value;
	var s = document.getElementById("search_and_post_total");

	if (!s)
	{	alert("could not find search_and_post_total element");
	}

	if (!/^\d+$/.test(m) || !/^\d+$/.test(r) || r < 0)
	{	t = "??";
	} else
	{	// base price
		if (m == 165) { t = 1900; } // 5 job slots
		if (m == 166) { t = 2850; } // 10 job slots

		t += 150 * r;
		t = "$" + t + ".00";	
	}

	s.innerHTML = t;	

	return true;
}
