
var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		html += '<link href="/print.css" rel="stylesheet" type="text/css" />'
		html += '\n</HE' + 'AD>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("content");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the content section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}






function posalji()
{




var head1 = '<p id="printHdr" style="font-size:14px;"><strong>Vlada Federacije Bosne i Hercegovine</strong>  </p>';
	
var foot = '<div align="right"><hr><a href="http://www.fbihvlada.gov.ba/">www.fbihvlada.gov.ba</a></div>';


var content
content = head1 + document.getElementById("content").innerHTML + foot


	if (document.getElementById != null)
	{
	
	
	
		var html = '<HTML>\n<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />\n<HEAD>\n';
		var hdr = head1 + '<form action="" method="post" style="border:1px solid #cccccc; padding:20px; background:#f1f1f1"><label>Vaš e-mail:<input type="text" name="_subject" id="_subject" /></label><label>&nbsp;&nbsp;E-mail primaoca:<input type="text" name="_recipients" id="_recipients" /></label>&nbsp;&nbsp;<input type="submit" name="Submit" value="PO&Scaron;ALJI" /><textarea name="tekst" id="tekst" style="display:none;">'  + content +  '</textarea></form>';
		
		var ftr = foot;

		//if (document.getElementsByTagName != null)
//		{
//			var headTags = document.getElementsByTagName("head");
//			if (headTags.length > 0)
//				html += headTags[0].innerHTML;
//		}
		html += '<link href="/print.css" rel="stylesheet" type="text/css" />'
		html += '\n</HE' + 'AD>\n<BODY bgcolor="#ffffff">\n';
		
		var printReadyElem = document.getElementById("content");
		
		if (printReadyElem != null)
		{
				html += ( hdr + printReadyElem.innerHTML + ftr);
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

