function printFunction(html, pageType){
  //var pageType = '';
  
  var goodHTML = escape(html);
// the url which you have to reload is this page, but you add an action to the GET- or POST-variable
var url="http://www.mafunet.com/dompdf/fairfieldpdf.php?html="+goodHTML+"&filename=Fairfield_"+pageType;

// Opens the url in the same window
   window.open(url, _self);
  }
  
  function printMe(url){
  	 window.open(url, _blank);
  }