function printIt(tableID) {
	var tableHTML="<tr><td colspan='2' valign='top'>"+document.getElementById(tableID).outerHTML+"</td></tr>";
	var tableHeight=parseInt(document.getElementById(tableID).offsetHeight);
	var tableWidth=parseInt(document.getElementById(tableID).offsetWidth);
	var exWidth=70;
	var exHeight=100;
	if(tableWidth+exWidth>650)
		tableWidth=650-exWidth;
	if(tableHeight+exHeight>600)
		tableHeight=600-exHeight;
	var topHTML="";
	var links=document.getElementsByTagName("LINK");
	var styles=""; 
	for(i=0;i<links.length;i++) {
		styles+=links[i].outerHTML+"\n";
	}
	topHTML+="<html>\n<head><style>.classchap{color:#333333;font-size:10px}\ntd, input, select, textarea, a { font-family:tahoma;}</style>\n<title>&#1605;&#1581;&#1583;&#1608;&#1583;&#1607; &#1662;&#1585;&#1610;&#1606;&#1578;</title>\n";
	topHTML+="<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>\n";
	topHTML+=styles;
	topHTML+="<scr"+"ipt language='javascript'>function makeSize(a,b,c){ return '';}</scr"+"ipt>\n";
	topHTML+="\n</head>\n<body dir=rtl><span id='FindStringLengthTool' style='position:absolute;z-index:101;left:0;top:0;font-family:tahoma;visibility:hidden'></span>\n";
	topHTML+="<table border='0' cellpadding='0' cellspacing='0' width='100%'>\n";
	topHTML+="<tr><td><table border='0' width='100%' cellspacing='0' cellpadding='0'><tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td><img border='0' src='/images/header/ver_2/logo.gif'></td></tr><tr><td height='5'></td></tr></table></td><td width='100%' valign='bottom'></td></tr></table></td></tr><tr><td background='/images/header/in/dot_horz_menu.gif' height='1'></td></tr><tr><td height='1' bgcolor='#FEF8E8'><table border='0' width='100%' cellspacing='0' cellpadding='0'><tr><td nowrap bgcolor='#868686' width='2'></td><td bgcolor='#DEDEDE' nowrap width='96' align='center'><img border=0' src='/images/header/in/site-title.gif'></td><td bgcolor='#E77512' nowrap width='2'></td><td width='100%'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td colspan='5' height='2'></td></tr><tr><td width='25' nowrap></td><td nowrap class='classchap'>"+current_date_time+"</td><td width='100%' align='left' valign='top'></td></tr></table></td></tr></table></td></tr><tr><td background='/images/header/in/dot_horz_menu.gif' height='1'></td></tr><tr><td height='10'></td></tr>";
	var botHTML="\n</table></body>\n</html>";
	
	var features="top=100,left=100,width="+(tableWidth+exWidth)+",height="+(tableHeight+exHeight)+",resizable=1,scrollbars=1";
	var printWindow= window.open('','przone',features);
	
	printWindow.document.open();
	printWindow.document.write(topHTML+tableHTML+botHTML);
	printWindow.document.close();
	
	printWindow.print();
}
