//-----------------------------------------------------------------------------
function place_cursor()
{
	try {
		if (document.forms[0] && document.forms[0][0])	document.forms[0][0].focus();
	} catch(err) {}
}
//-----------------------------------------------------------------------------
function print(form_id)
{
	var print_form=document.forms[form_id];
	if (print_form)
	{
		print_form.elements["print_button"].click();
	}
	else alert("Form "+form_id+" not found.");
}
//-----------------------------------------------------------------------------
function change_form_action(form_id,new_value)
{
	var form=document.forms[form_id];
	if (form)
	{
		form.elements["action"].value=new_value;
		form.submit();
	}
	else alert("Form "+form_id+" not found.");
}
//-----------------------------------------------------------------------------
function show_hide(layer,value){
	blok=document.getElementById(layer);
	if(blok){
		if(blok.style.display == 'none' || value=='inline'){
			blok.style.display = 'inline';
		}else{
			blok.style.display = 'none';
		}
	}

	// Bug for hiding selects
	//	if (mg) {
	//		var NewState='';
	//		if (value=='inline') NewState='hidden';
	//		general.ShowHideElement(NewState);
	//	}
}
