/*########################################################################*\

	

\*########################################################################*/

printArea = function(printareaId) {
	
	/* set popheight and width */
	var popup_height = 500;
	var popup_width = 650;
	var w = window.open('','','height=' + popup_height + ',width=' + popup_width + ',toolbar=yes,scrollbars=yes')
	
	/* Center popup window */
	var intwidt;
	var intheight;

	intwidth = screen.availWidth;
	intheight = screen.availHeight;
	intwidth = parseInt (intwidth);
	intheight = parseInt (intheight);

	if (intwidth > 0 && intheight > 0){
		w.moveTo ( ( ( intwidth-popup_width ) / 2 ), ( ( intheight - popup_height ) / 2) );
		w.focus();
	}
		
	var printarea = document.getElementById(printareaId);
	

	if (printarea == null) {
		
		alert("no print area defined");

	} else {
	
		var str = '<html>\n';
		str +=	'<head>\n';
		str += '<link href="cmnrcs/css/private.css" charset="utf-8" rel="stylesheet" type="text/css" />';
		str += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n';
		str += '<title>print</title>';
		str += '</head>\n';
		str += '<body onload="setTimeout(\'window.print()\', 250); ">\n';
		str += '<img src="/imgs/logo-1.gif" /><img src="/imgs/logo-2-a.gif" /><br /><div id="p-article">' + printarea.innerHTML;
		str += '<span style="margin-left:5px;color:#AAA;"><br />© 2007 SGS HORIZON BV | ALL RIGHTS RESERVED</span>';
		str += '</div></body></html>\n';
		
		//alert (str);
		
		w.document.open();
		
		w.document.write(str);
		
		w.document.close();


	}
	
};