function openLayered(src) {
	$('popMain').innerHTML='<img src="'+src+'" alt="" border="0">';
	Element.show('popUp');
}

function openPicture(src, alt, width, height) {
	var img = "<img src='" + src + "' height='" + height + "' width='" + width + "' alt='" + alt + "'>";
	var body = "<html>\n<head>\n<meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>\n<title>" + alt + "</title>\n</head>\n\n<body leftmargin='0' topmargin='0' marginheight='0' marginwidth='0' onload='focus()' onclick='window.close()'>\n" + img + "\n</body>\n</html>";
	var params = "width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no,scrollbar=yes";
	PictureWindow = open("", "_blank", params);
	PictureWindow.document.write(body);
	PictureWindow.document.close();
}

function openPAGE(u,W,H,n) {
	var height = 0;
	var width = 0;
	if (self.screen) {     // for NN4 and IE4
		width = screen.width
		height = screen.height
	} else if (self.java) {   // for NN3 with enabled Java
		var jkit = java.awt.Toolkit.getDefaultToolkit();
		var scrsize = jkit.getScreenSize();       
		width = scrsize.width; 
		height = scrsize.height; 
	}
	
	if (width > 0 && height > 0 && width > 1000) {
		x = (width - 1000)/2;
		y = (height - 572)/2;
	} else {
		x = 0;
		y = 0;
	}

	param = "scrollbars=no,status=no,toolbar=no,channelmode=no,fullscreen=0,resizable=0,width=" + W + ",height=" + H + ",left=" + x + ",top=" + y;
	wID = window.open(u,n,param);
	return wID;
}

