/**
* To whoever who reads this: 
* I have deleted all print functions from this file, as they have become obsolete. For backend printing, I have written the following (remaining) function "printPageBack()".
*
* Kind regards,
* Rick
*/

function printPageBack(){
	var win 	= window.open();
	
	// Check if there is a CV
	if(document.getElementById('cv')){
		var cvStat	= document.getElementById('cv').style.display;
	} else {
		var cvStat	= "none";
	}
	
	// Check if there is a displayed vacature
	if(document.getElementById('div_viewVacature')){
		var vcStat	= document.getElementById('div_viewVacature').style.display;
	} else {
		var vcStat = "none";
	}
	
	if (cvStat == "table"){
		// when a cv is displayed;
		var naw_header	= (document.getElementById('naw_header')).innerHTML;
		var naw 		= (document.getElementById('naw')).innerHTML;
		var notities	= (document.getElementById('notities')).innerHTML;
		var cv			= (document.getElementById('cv')).innerHTML;
		var obj			= "<h1>"+naw_header+"</h1>"+naw+notities+"<p class='nextpage' />"+cv;
	} else if(vcStat != "none") {
		// when a vacature is displayed;
		var naw_header	= (document.getElementById('naw_header')).innerHTML;
		var naw 		= (document.getElementById('naw')).innerHTML;
		var notities	= (document.getElementById('notities')).innerHTML;
		var vc			= (document.getElementById('vacatures')).innerHTML;
		var vc_view		= (document.getElementById('div_viewVacature')).innerHTML;
		// this will construct the printing view, "<p class='nexpage' />' is used to put information on the next page when printing...
		var obj			= "<h1>"+naw_header+"</h1>"+naw+notities+"<hr><table>"+vc+"</table>"+"<hr>"+"<p class='nextpage' />"+vc_view;
	} else {
		// default print view;
		var obj 		= (document.getElementById('main_middle_content')).innerHTML;	
	};
	// done declaring variables...
	
	self.focus();
	win.document.open();
	win.document.write('<html>');
	win.document.write('<head>');
	win.document.write('<style type="text/css">');	
	win.document.write('body{ font-family: verdana; font-size: 14px; width: 1000px; }');	
	win.document.write('.ajaxResultLoader img{ display: none !important;}');
	win.document.write('h1{font-size: 20px;}');
	win.document.write('.table-header{font-size: 20px; font-weight: bold}');
	win.document.write('.zoekHeader { background-color: #E6EEEE; height: 20px;}');
	win.document.write('.zoekHeader td { border-bottom: 1px solid gray;}');	
	win.document.write('.zoekHeader a:link {size: 8px; font-weight: bold; text-decoration: none; color: black;}');
	win.document.write('.zoekHeader img{display: none !important;}');
	win.document.write('tbody {	font-size: 12px; }');
	win.document.write('div.tab { display: none !important;	}');
	win.document.write('.hidefromprint { display: none !important; }');
	win.document.write('.hidefromfax { display: none !important; }');
	win.document.write('.formStep { display: none !important; }');
	win.document.write('input.btn_bewerken {display: none !important;}');
	win.document.write('.paginationNewSearch { float: right; margin-right: 50px; position: relative; width: 800px;}');
	win.document.write('.zoekenMargins {padding: 10px 0 0 10px;}');
	win.document.write('.zoekTable { border: 1px solid gray; border-radius: 10px 10px 10px 10px; float: right; margin-right: 10px; width: 980px;}');
	win.document.write('.oddNewSearch {background-color: #E7EEEE;}');
	win.document.write('.zoekTable uitgebreidZoeken {display: none !important;}');
	win.document.write('input.btn_bewerken { display: none !important; }');
	win.document.write('input.btn_vacature_verwijderen { display: none !important; }');
	win.document.write('input.btn_vacature_dupliceren { display: none !important; }');
	win.document.write('input.werkgever_btnDropdownMenu { display: none !important; }');
	win.document.write('input#viewVacature_annuleren {display: none !important; }');
	win.document.write('p.nextpage {page-break-before: always}');
	win.document.write('.paginationStyle {font-size: 10px;}');
	win.document.write('.btn_cvGoedkeuren {display: none !important;}');
	win.document.write('</style>');
	win.document.write('</head>');
	win.document.write('<body>');
	win.document.writeln(obj);
	win.document.write('</body>');
	win.document.write('</html>');
	win.document.close;	
	
	win.print();
}


