function openWin(sourceFile,winWidth,winHeight,scroll)
{
   if (winWidth>800) 
   {
     winWidth=800;
     scroll="yes";
   }
   if (winHeight>600) 
   {
     winHeight=600;
     scroll="yes";
   }
   
     
   var win=window.open(sourceFile,"PopUp","height="+(winHeight)+",width="+(winWidth)+",innerWidth="+winWidth+",innerHeight="+winHeight+",toolbar=no,location=no,status=no,menubar=no,scrollbars="+scroll+",resizable=no");  
    
      win.document.open();
      win.document.write('<html><head><style type="text/css">body {padding:0px; margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px}</style></head><body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" margin-left="0" margin-right="0" margin-top="0" margin-bottom="0"marginleft="0" marginright="0" margintop="0" marginbottom="0" marginwidth="0" marginheight="0">');
      win.document.write('<img src="'+sourceFile+'"');
      win.document.write('</body></html>');
      win.document.close();
}

function resetFields() {
  var form = document.getElementById('eventsform');
  for (var i=0; i< form.elements.length; i++) {
  	var element = form.elements[i];
    if (element.type != 'button' && element.type != 'submit') form.elements[i].value = "";
	if (element.type == 'checkbox') element.checked = false;
  }
  document.getElementById('datum').selectedIndex = 0;
}

function pageScroll (y) {
 window.scrollBy(0,y); // horizontal and vertical scroll increments
}
