//Generating Pop-up Print Preview page
function getPrint(print_area)
{	
	//Creating new page
	var pp = window.open("", "", "height=600, width=700, resizable=yes, menubar=no, location=no, scrollbars");
	//Adding HTML opening tag with <HEAD> … </HEAD> portion 
	pp.document.writeln('<HTML><HEAD><title>Print</title>')
	//Define the printing style here (should be in .css file... But what the heck
	pp.document.writeln('<STYLE type="text/css">@media screen {.NoPrint {display:none;}.GridHeading{color:black;}.NonExistent,a,a:link, a:visited, a:hover {color: black;text-decoration: none; cursor: default;font-style:normal;}.OnlyPrint{display:block;}}</STYLE>')
	pp.document.writeln('<STYLE type="text/css">@media print {#PRINT ,#CLOSE {display:none;}.NoPrint {display:none;}.GridHeading{color:black;}.NonExistent,a{text-decoration:none;color:black;font-style:normal;}.OnlyPrint{display:block;}}</STYLE>')
	pp.document.writeln('<link rel="stylesheet" href="/files/templates/LpModellen/css/lp_modellen.css" type="text/css" />');

	pp.document.writeln('<base target="_self"></HEAD>')
	//Adding Body Tag
	pp.document.writeln("<body MS_POSITIONING='GridLayout' bottomMargin='0' leftMargin='0' topMargin='0' rightMargin='0' class='print'>");
	//Adding form Tag
	pp.document.writeln('<form  method="post">');
	//Creating two buttons Print and Close within a table
	pp.document.writeln('<TABLE width="650"><TR><TD></TD></TR><TR><TD align=center><INPUT ID="PRINT" type="button" value="Print" onclick="javascript:location.reload(true);window.print();"><INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();"></TD></TR><TR><TD></TD></TR></TABLE>');
	//Writing print area of the calling page
	pp.document.writeln(document.getElementById(print_area).innerHTML);
	//Ending Tag of </form>, </body> and </HTML>
	pp.document.writeln('</form></body></HTML>');			
}
