
/* ______________________________________________________________*/
/* funkcja otwiera obrazek w nowym oknie o określonych wymiarach */
/*																 */
/* ______________________________________________________________*/
function image_open_new_window(img, alt, width, height)
{
	newWindow = open("", "", "width="+width+", height="+height);
	newWindow.document.write("<title>"+alt+"</title>");
	newWindow.document.write("<body bgcolor=##FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");
	newWindow.document.write("<table width=100% border=0 cellspacing=0 cellpadding=0 height=100%><tr><td align=center valign=middle><a href=\"javascript:window.close();\"><img src="+img+" alt="+alt+" border=0></a></td></tr></table>");
	newWindow.document.write("</body>");
	newWindow.document.close();
}

function update_img(block, file )
{
	$( block ).src = file ;
}

function menu_list() {
	sfHover = function() {
		var sfEls = document.getElementById("menu").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
}


/*
	funkcja otwierająca popUp
*/
function windowOpen ( url, width, height )
	{
		var w = !width ? 650 : width;
		var h = !height ? 500 : height;
		var l = parseInt( screen.width/2 - w/2 );
		var t = parseInt( screen.height/2 - h/2 );
		//var winID = url.replace(/[\/\.\,=?\&\-/gi, "");
		var winID = Math.ceil(100*Math.random());
		var winObj = window.open(url, winID, "left=" + l + ",top=" + t + ",width=" + w + ",height=" + h + ",resizable=yes,status=no,scrollbars=yes,dependent=no");
		return winObj;
	}