﻿function window.onbeforeprint() { 
	window.F1.style.borderBottom = '1px solid white';
	window.F2.style.borderTop = '1px solid white';

}

function window.onafterprint() { 
	window.F1.style.borderBottom = '1px solid gainsboro;';
	window.F2.style.borderTop = '1px solid gainsboro;';
}


function DisplayImage(ImgLocation, WindowTitle, ImgDesc, x ,y) {


	var topX = window.screen.width/2  - x/2
	var topY = window.screen.availHeight/2 - (y/2 + 40)

	y=y+65;
	x=x+22;


	msg=window.open("","_blank","height="+y+",width="+x+",left="+topX+", top="+topY+", toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes");
	
	msg.document.write('<html><HEAD><title>'+WindowTitle+'</title>');
	msg.document.write('<STYLE> TABLE {width:100%; height:100%; border-collapse:collapse; }</STYLE>');
	msg.document.write('</HEAD>');



	msg.document.write("<body bgcolor='black' leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 align=center>");

	msg.document.write('<TABLE cellpadding="0" cellspacing="0"><TR><TD cellpadding="0" cellspacing="0" STYLE="border-top:10px solid black; border-left:10px solid black; border-right:10px solid black;">');
	msg.document.write('<img src="' + ImgLocation +'" STYLE="border:1px solid gray; ">');


	msg.document.write('</TD></TR><TR><TD valign="center" height="100%" STYLE=" font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9pt; font-weight: normal; color: gray;  text-align:center; padding:10px; ">');


	msg.document.write(ImgDesc);

	msg.document.write('</TD></TR></TABLE>');

	msg.document.write("</body></html>");
}



function DisplayLargeImage(ImgLocation, LargeImgLocation, ImgDesc, x ,y) {

	var topX = window.screen.width/2  - x/2
	var topY = window.screen.availHeight/2 - (y/2 + 40)

	y=y+65;
	x=x+22;

	msg=window.open("","_blank","height="+y+",width="+x+",left="+topX+", top="+topY+", toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes");
	
	msg.document.write('<html><HEAD><title>BalkánBivak</title>');
	msg.document.write('<STYLE> A {COLOR: gray; TEXT-DECORATION: none; font-weight:bold; } A:visited {COLOR: gray; font-weight:bold; } A:hover {COLOR: white; TEXT-DECORATION: underline} TABLE {width:100%; height:100%; border-collapse:collapse; } </STYLE>');
	msg.document.write('</HEAD>');



	msg.document.write("<body bgcolor='black' leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 align=center>");

	msg.document.write('<TABLE cellpadding="0" cellspacing="0"><TR><TD ALIGN="center" VALIGN="center" cellpadding="0" cellspacing="0" STYLE="border-top:10px solid black; border-left:10px solid black; border-right:10px solid black;">');
	msg.document.write('<img src="' + ImgLocation +'" STYLE="border:1px solid gray; ">');


	msg.document.write('</TD></TR><TR><TD valign="center" height="100%" STYLE=" font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9pt; font-weight: normal; color: gray;  text-align:center; padding-left:10px; padding-right:10px; padding-top:4px; ">');
	msg.document.write(ImgDesc);

	msg.document.write('</TD></TR><TR><TD align="center" STYLE=" font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9pt; color: gray;  text-align:center; padding-left: 10px; padding-right: 10px; padding-bottom: 4px; ">');	msg.document.write('<a href="' + LargeImgLocation + '" TARGET="_new">Nagyításhoz kattintson ide</a>');
	msg.document.write('</TD></TR></TABLE>');

	msg.document.write("</body></html>");
}

function DateName_Magyar(Datum){
	var dt = new Date(Datum);	

	var HonapNeve = Array('január','február','március','április','május','június','július','augusztus','szeptember','október','november','december')[dt.getMonth()];
	var EvNeve = dt.getFullYear();
	var NapNeve = dt.getDate();

	return EvNeve + '. ' + HonapNeve + ' ' + NapNeve +'.'
}

