myprintVersion = function(print_type) {
	var wHeight=500;
	var wWidth=700;
	var w=window.open('','','height='+wHeight+',width='+wWidth+',toolbar=yes,scrollbars=yes')
	//Center popup window
	var sWidth = parseInt(gsW());
	var sHeight = parseInt(gsH());
	if( sWidth>0&&sHeight>0 ){w.moveTo(Math.round((sWidth-wWidth)/2),Math.round((sHeight-wHeight)/2))};
	if( w.focus ) { w.focus(); }

	// Create privacy footer
	var crs = _page.crsc_server;

	privacy_footer = _page.text["footer"];
	privacy_footer = privacy_footer.replace("{BR}", "<br />");
	privacy_footer = privacy_footer.replace("{COPYRIGHT}", _page.text["copyright"]);
	privacy_footer = privacy_footer.replace("{PRIVACY}", "<a href=\""+_page.link["privacy"]+"\">"+_page.text["privacy"]+"</a>");
	privacy_footer = privacy_footer.replace("{OWNER}", "<a href=\""+_page.link["owner"]+"\">"+_page.text["owner"]+"</a>");
	privacy_footer = privacy_footer.replace("{TERMS}", "<a href=\""+_page.link["terms"]+"\">"+_page.text["terms"]+"</a>");
	privacy_footer = privacy_footer.replace("{CAREERS}", "<a href=\""+_page.link["careers"]+"\">"+_page.text["careers"]+"</a>");
	privacy_footer = privacy_footer.replace("| {SITEMAP}", "");

	var printarea = document.getElementById("p-printarea");
	var mystyle = document.getElementById("customstyle");
	if (printarea == null) {
		alert("no print area defined");
	}
	else {
		//var button='<table class="p-button" cellspacing="0"><tr><td onclick="window.print()"><div>Print</div></td></tr></table>'
		w.document.open();
		w.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n');
		w.document.write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n');
		w.document.write('<html xmlns="http://www.w3.org/1999/xhtml">\n');
		w.document.write('<head>\n');
		w.document.write('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n');
		if(_page.headerType == "external_extranet") {
			// No global stylesheet when using external extranet
			var stylesheet_externalextranet = "	<link rel=\"stylesheet\" type=\"text/css\" href=\""+_page.crsc_server+"/crsc/styles/external_extranet.css\" />\n";
			w.document.write(stylesheet_externalextranet);
		} else {
			w.document.write('  <link href="'+_page.crsc_server + '/crsc/styles/global.css" type="text/css" rel="stylesheet" />\n');
		}
		w.document.write('  <link href="'+_page.crsc_server + '/crsc/styles/components.css" type="text/css" rel="stylesheet" />\n');
		w.document.write('  <link href="'+_page.crsc_server + '/crsc/styles/print.css" type="text/css" rel="stylesheet" />\n');
		w.document.write('  <link href="'+ mystyle.href + '" type="text/css" rel="stylesheet" />\n');
		if(_page.direction=="rtl"){
			w.document.write('  <link href="'+_page.crsc_server + '/crsc/styles/rtl.css" type="text/css" rel="stylesheet" />\n');
		}
		w.document.write('	<title>'+document.title+'</title>');
		w.document.write('</head>\n');
		w.document.write('<body style="direction:'+_page.direction+'" onload="window.print();setTimeout(\'window.close()\', 5000);">\n');
		w.document.write('	<div class="p-printcontainer">\n');
		w.document.write('  	<div class="p-print-logo"><img alt="Philips" src="'+_page.crsc_server + '/crsc/images/mainlogo.gif" /></div>\n');
		if(print_type=='press'){
			w.document.write('  	<div class="p-print-press"><img alt="Press information" src="'+_page.crsc_server + '/crsc/images/pressrelease_header.gif" /></div>\n');
		} else {
			w.document.write('  	<div class="p-line"><img alt="" src="'+_page.crsc_server + '/crsc/images/solidline.gif" /></div>\n');
		}
		w.document.write('  	<div id="p-grid-c">'+printarea.innerHTML+'</div>\n');
		w.document.write('  	<div class="p-line"><img alt="" src="'+_page.crsc_server + '/crsc/images/solidline.gif" /></div>\n');
		w.document.write('  	<div class="p-print-footer">\n');
		w.document.write('  	  ' + privacy_footer +'\n');
		w.document.write('		</div>\n');
		w.document.write('	</div>\n');
		w.document.write('<!-- Begin Sitestat4 code -->\n');
		w.document.write('<script language=\'JavaScript1.1\' type=\'text/javascript\'>\n');
		w.document.write('<!--');
		w.document.write('function sitestat(ns_l){ns_l+=\'&amp;ns__t=\'+(new Date()).getTime();ns_pixelUrl=ns_l;\n');
		w.document.write('ns_0=document.referrer;\n');
		w.document.write('ns_0=(ns_0.lastIndexOf(\'/\')==ns_0.length-1)?ns_0.substring(ns_0.lastIndexOf(\'/\'),0):ns_0;\n');
		w.document.write('if(ns_0.length>0)ns_l+=\'&amp;ns_referrer=\'+escape(ns_0);\n');
		w.document.write('if(document.images){ns_l=new Image();ns_1.src=ns_l;} else \n');
		w.document.write('{document.write(\'<img src="\'+ns_l+\'" width="1" height="1" alt="">\');} \n');
		w.document.write('sitestat("http://nl.sitestat.com/philips/philips/s?global.print_recipe");\n');
		w.document.write('//-->\n');
		w.document.write('</script>\n');
		w.document.write('<noscript>\n');
		w.document.write('<img src="http://nl.sitestat.com/philips/philips/s?global.print_recipe" width="1" height="1" alt="">');
		w.document.write('</noscript>');
		w.document.write('<!-- End Sitestat4 code -->');
		w.document.write('</body></html>\n');
		w.document.close();
	}
};

