var sheets = "";

sheets = '<LINK rel="stylesheet" type="text/css" href="/style.css" media="all">' + "\r" + '<LINK rel="stylesheet" type="text/css" href="/print.css" media="all">';

// document.write(sheets);

function replace(strGeheleString, strVervangDit, strVervangMet) {
  var strResult = "";
  while(strGeheleString.indexOf(strVervangDit) != -1) {
    if (strGeheleString.indexOf(strVervangDit) > 0) {
      strResult = strResult + strGeheleString.substring(0, strGeheleString.indexOf(strVervangDit)) + strVervangMet;
    }
    else {
      strResult = strResult + strVervangMet;
    }
    strGeheleString = strGeheleString.substring(trGeheleString.indexOf(strVervangDit) + strVervangDit.length, strGeheleString.length);     
  }
  return strResult + strGeheleString;
} 

function printPage() {
  var newWindow = null;
  var newBody   = null;
  newBody = new String(this.document.getElementsByTagName("body").item(0).innerHTML);  
  newBody = newBody.slice(newBody.indexOf("<!-- Start content -->"), newBody.indexOf("<!-- Einde content -->"));
  if (newWindow == null) {
    newWindow = window.open('', 'Title', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=750,height=600');
  }
  newWindow.document.open();
  newWindow.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
  newWindow.document.writeln('<HTML><HEAD>');
  newWindow.document.writeln( sheets );    
  newWindow.document.writeln('<TITLE>Printversie</TITLE>');
  newWindow.document.writeln('</HEAD><BODY onLoad="window.print()">');
  newWindow.document.writeln('<DIV style="width: 95%;">');
  if (newBody != null) { newWindow.document.writeln(newBody); }
	 newWindow.document.writeln('</DIV>');
  newWindow.document.writeln('<div class="modRight">');
  newWindow.document.writeln('<div class="roundcont">');
  newWindow.document.writeln('<div class="boxHeaderLightred">');
  newWindow.document.writeln('<div class="lightRed">Contact</div>');
  newWindow.document.writeln('</div>');
  newWindow.document.writeln('<div class="boxContent">');
  newWindow.document.writeln('<h3>Adresgegevens</h3>');
  newWindow.document.writeln('<p><b>PortalPlus BV</b><br/>');
  newWindow.document.writeln('Costerweg 5<br/>');
  newWindow.document.writeln('6702 AA Wageningen</p>');
  newWindow.document.writeln('<p>');
  newWindow.document.writeln('<b>T</b> 0317-497617<br/>');
  newWindow.document.writeln('<b>F</b> 0317-</p>');
  newWindow.document.writeln('<p>');
  newWindow.document.writeln('<b>E</b> info@portalplus.nl<br/>');
  newWindow.document.writeln('<b>w</b> www.portalplus.nl<br/>');
  newWindow.document.writeln('</p>');
  newWindow.document.writeln('</div>  </div> </div>');
  newWindow.document.writeln('</BODY></HTML>');
  newWindow.document.close();
  newWindow.focus();
}
