 /*
  function doPopup() 
  { 
    if (!document.getElementsByTagName) return; 
    var anchors = document.getElementsByTagName("a"); 
    for (var i=0; i<anchors.length; i++) 
    { 
      var anchor = anchors[i];
      //var windowAttributes = "width=300,height=300,left=50,top=50,location=no,resizable=no,scrollbars=no";
      var targetWindow = "_blank";
      if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "popupprint")
      {
	      anchor.onclick = function()
				{ 
					window.open(this.href,'Print deze pagina','width=400,height=400,scrollbars=no,resizable=no'); return false;
				}
      }
      else if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "popupmail")
      {
        anchor.target = targetWindow;
      }      
      //anchor.setAttribute(windowAttributes);     
    } 
  }
  */

function doPopup() {
  if (!document.getElementsByTagName) return false;
  var links = document.getElementsByTagName("a");
  for (var i=0; i < links.length; i++) {
    if (links[i].className.match("popupmail")) {
      links[i].onclick = function() {
        window.open(this.getAttribute("href"),'popupwindow','width=450,height=150,scrollbars=no,resizable=no');
        return false;
      }
    }
    if (links[i].className.match("popupprint")) {
      links[i].onclick = function() {
        window.open(this.getAttribute("href"),'popupwindow','width=600,height=600,scrollbars=yes,resizable=yes');
        return false;
      }
    }    
  }
}

/*
	function mailPopup()
	{
		if(!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for(var i=0; i<anchors.length; i++)
		{
			var anchor = anchors[i];
			if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "popupmail")
      {
				anchor.onclick = function()
				{ 
					window.open(this.href,'popupwindow','width=400,height=400,scrollbars=no,resizable=no'); return false;
				}
			}
		}
	}
*/
window.onload = function()
{
  doPopup();
}

