// JavaScript Document
function fPrintCont()
{
	var winW=468;
	
	if(document.getElementById("logo"))
	{
		logo = document.getElementById("logo").innerHTML;
	}
	
	if(document.getElementById("insideContent") || document.getElementById("insideContent1"))
	{
		if(document.getElementById("subtemplate1_block1"))
		{
			contDiv1=document.getElementById('subtemplate1_block1');
		}
		if(document.getElementById("subtemplate2_block1"))
		{
			contDiv1=document.getElementById('subtemplate2_block1');
		}
		if(document.getElementById("subtemplate1_block2"))
		{
			contDiv2=document.getElementById('subtemplate1_block2');
		}
		if(document.getElementById("subtemplate2_block2"))
		{
			contDiv2=document.getElementById('subtemplate2_block2');
		}
		if(document.getElementById("txtCont"))
		{
			var curTxtDiv=document.getElementById("txtCont");
			var allDivs=curTxtDiv.getElementsByTagName("h1");
			for(var i=0; i<allDivs.length; i++)
			{
				if(allDivs[i].id=="sC")
				{
					return;
					break;
				}
												   
			}
		}
		if(contDiv1.innerHTML.length<2 && contDiv2.innerHTML.length<2)
		{
			return;
		}
		contDiv="<div id='logo'>" + logo + "</div><div id='middle'><div id='subtemplate1_block1'>" + contDiv1.innerHTML + "</div><div id='subtemplate1_block2'>" + contDiv2.innerHTML + "</div></div>";
		winFinal=winW+16;
		var a = window. open('', '', 'scrollbars=yes, width=' + winFinal + ', height=600');
		a.document.open("text/html");
		a.document.write("<html><head><script type='text/javascript'>function initAll(){ document.getElementById('finalDiv').style.display = 'block'; } window.onload=initAll;</script><link rel='stylesheet' href='fileadmin/template/main/css/style_print.css' media='all' /></head><body class='body2'><div id='finalDiv' style='display: none;'>" + contDiv + "</div></body></html>");
		a.document.close();
		a.print();
	}
	else
	{
		alert("This content is not provided for printing");
	}
	
}
