// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
var addPrintLink = {
	init:function(sTargetEl,sLinkText) {
	if (!document.getElementById || !document.createTextNode) {return;} // Check for DOM support
	if (!document.getElementById(sTargetEl)) {return;} // Check that the target element actually exists
	if (!window.print) {return;} // Make sure the browser supports window.print
	var oTarget = document.getElementById(sTargetEl);
	var oLink = document.createElement('a');
	oLink.id = 'print-link'; // Give the link an id to allow styling
	oLink.href = '#'; // Make the link focusable for keyboard users
	oLink.appendChild(document.createTextNode(sLinkText));
	oLink.onclick = function() {window.print(); return false;} // Return false prevents the browser from following the link and jumping to the top of the page after printing
	oTarget.appendChild(oLink);
}
/* addEvent function removed from this listing*/
};
Event.observe(window, 'load', function(){addPrintLink.init('js_print_hook','Tip afdrukken');});
//addPrintLink.addEvent(window, 'load', function(){addPrintLink.init('js_print_hook','Afdrukken');});
