function trim(str)
{
	return str.replace(/(^\s+)|(\s+$)/g, "");
}

function highlight(id,act)
{
	var m = document.getElementById( 'menu' + id );
	if (act == 1)
		m.src = menus[id - 1].src;
	else
		m.src = menus[id + 9].src;
}

function showEditForm(form_name)
{
	document.getElementById(form_name).style.display = "";
}

function hideEditForm(form_name)
{
	document.getElementById(form_name).style.display = "none";
}

function on_star(art, id)
{
	for (var i = 1; i <= id; i++)
		document.getElementById('star_'+art+'_'+i).src = star_on.src;
}

function off_star(art)
{
	for (var i = 1; i <= 5; i++)
		document.getElementById('star_'+art+'_'+i).src = star_off.src;
}

function MySetCookie (name, value, path, domain, newurl) {
      document.cookie = name + '=' + escape(value) +
        ((path) ? '; path=' + path: '') +
        ((domain) ? '; domain=' + domain: '');
      window.location.href = newurl;
}
