// JavaScript Document

function zar() {

	if(newWindow && !newWindow.closed && newWindow.open) {
		newWindow.close();
		newWindow=null;
	}
}

function nyit(URL, Width, Height, CegNev) {
/*
	zar();

	var Left = (screen.width-Width)/2;
	var Top = (screen.height-Height)/2;
	
	newWindow = window.open(URL,"nagyKepAblak","width="+Width+",height="+Height+",left="+Left+",top="+Top+", scrollbars=1");
	newWindow.focus();
*/
}


function nyit(Name, Width, Height, CegNev) {

	zar();

	var Left = (screen.width-Width)/2;
	var Top = (screen.height-Height)/2;
	
	newWindow = window.open("","nagyKepAblak","width="+Width+",height="+Height+",left="+Left+",top="+Top);
	newWindow.document.open();
	
	newWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n');
	newWindow.document.write('<html>\n\n');
	newWindow.document.write('<head>\n');
	newWindow.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">\n');
	newWindow.document.write('<meta http-equiv="imagetoolbar" content="no">\n');
	newWindow.document.write('<title>'+CegNev+'</title>\n'); 
	newWindow.document.write('</head>\n\n');
	newWindow.document.write('<body bgcolor="#000000" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">\n');
	newWindow.document.write('<img src='+Name+' width='+Width+' height='+Height+'>\n'); 
	newWindow.document.write('</body>\n\n');
	newWindow.document.write('</html>\n');
	
	newWindow.focus();
}
