function ShowProduct(id) {
	window.open('/katalog/' + id + '/', '_blank', '');
	return false;
}

function Open(url, target) {
	if (target == "_self")
		location.href = url;
	else
		window.open(url, '_blank', '');
	return false;
}

function Focus(element) {
	if (element)
	{
		element.focus();
		element.select();
	}
}


function AutoFocus(id) {
	element = document.getElementById(id);
	Focus(element);
}


/* Focus hack for IE */
if (window.attachEvent) 
{
	window.attachEvent("onload",  function() {
		try
		{
			var sfEls = document.getElementsByTagName("INPUT");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onfocus=function() {
					this.className+=" sffocus";
				}
				sfEls[i].onblur=function() {
					this.className=this.className.replace(new RegExp(" sffocus\\b"), "");
				}
			}
		} catch(e) {}
	});
}

	/*window.onload = function() {
		AutoFocus('autoselect');
	};*/

