
function onchangeHintedInput(formname, fieldname)
{
	var		fld = document.getElementById(formname+"_"+fieldname);
	var		hinter = document.getElementById(formname+"_"+fieldname+"_hint");
	fld.value		= hinter.value;
}


function onchangeFilter(sel_id)
{
	var		fil_id = sel_id + "_filter";
	$("#"+fil_id).bind("keyup", function (e) {
		var		vl = $("#"+fil_id).val();
		$("#"+sel_id+" > option").each(function () {
			if (($(this).text().toLowerCase().indexOf(vl.toLowerCase()) >= 0) || (vl.length == 0)) { $(this).show(); } else 
			{ 
				if ($(this).attr("selected")) { $(this).removeAttr("selected"); };
				$(this).hide(); 
			};
		});
	});
}


function enableShowHideForm(formid, showhideval)
{
	$("#"+formid+"_show").bind("click", function () { 
		$("#"+formid).toggle();
		$("#"+formid+"_show").toggle();
	});

	$("#"+formid+"_hide").bind("click", function () { 
		$("#"+formid).toggle();
		$("#"+formid+"_show").toggle();
	});
	
	if (showhideval == 1)
	{
		$("#"+formid).show();
		$("#"+formid+"_show").hide();
	}
	else
	{
		$("#"+formid).hide();
		$("#"+formid+"_show").show();
	}
}



