// JavaScript Document

<!-- scherm viewport uitlezen voor weergave foto's op achtergrond  vertikaal gecentreerd -->
var winW = 630, winH = 460; winVerplaatsing = 0;
if (document.body && document.body.offsetWidth) {
 winW = document.body.offsetWidth;
 winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
    document.documentElement &&
    document.documentElement.offsetWidth ) {
 winW = document.documentElement.offsetWidth;
 winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
 winW = window.innerWidth;
 winH = window.innerHeight;
}

// als schermverhouding te breed is, de bovenmarge aanpassen
// -------------------------------------------------------------
if (winW / winH > 1.5) 	{ 
	winVerplaatsing =   ( winW / 1.4  -  winH ) / 2  ;
	}
else
  {
  winVerplaatsing = -20 ;
  }
// maak css met aangepaste top-marge & write it
// -------------------------------------------------------------
var the_css = '.st_main img.st_preview{top: -' + winVerplaatsing + 'px;}';

//write it
document.write('<style>'+ the_css +'</style>');

