// Attach the functions below to the relevant links on the page
$(function(){
		   
	$('div.button_print a').click(function(e){
		e.preventDefault();
		metadataPrint();
	});
	
//	$('div.button_email a').click(function(e){
//		e.preventDefault();
//		metadataEmail();
//	});	

});

// Print current page
function metadataPrint() {
	
	// To do: PREP PRINT.CSS for this to work correctly	
	window.print();
	
}

// Send page via mail
function metadataEmail() {
	document.location = "mailto:aaaa@metadata.gr?subject=Naftomar - an article for you&Body=" + escape(window.location.href);
}

function openCenteredWindowNoScroll(url, height, width) {
	var left = Math.floor((screen.width - width) / 2);
	var top = Math.floor((screen.height - height) / 2);
	var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
	winParms += "," + "titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,alwaysRaised=yes,AlwaysOnTop=yes";
	popupWindow = window.open(url, "", winParms);
}
