function createPopUps(){
for(var n = 0; n < document.anchors.length; ++n)
if (document.anchors[n].name == "popup")
{
  document.anchors[n].onclick=function() {
        var img = new Image;
        var title = this.title + this.text + ' (klik voor sluiten)'; // CHROME voor die gevallen waar nog text staat ipv title 
        if (this.text==undefined) {title = this.title + ' (klik voor sluiten)';}  //IE
        img.onload = function() {
            var win = window.open('', '', 'width='+this.width+',height='+this.height);
            win.document.open('text/html', 'replace');            
            win.document.write('<html><head><title>'+title+'</title></head><body style="margin:0;padding:0" onBlur="self.close()" onclick="self.close()">'+ 
                 '<img src="'+this.src+'" title="'+title+ '"></body></html>' );
            win.document.close();
        }
        img.src = this.href;
        return false;
    }
};

//new truc avs 2010
for(var n = 0; n < document.images.length; ++n)
if (document.images[n].name == "popup")
{
 document.images[n].height=160;
 document.images[n].style.cursor="hand";

  document.images[n].onclick=function() {
        var title = this.title + this.text + ' (klik voor sluiten)'; // CHROME voor die gevallen waar nog text staat ipv title 
        if (this.text==undefined) {title = this.title}  //IE
        this.src=this.src.replace(/-tn/g,"");
        image= new Image();
        image.src = this.src;
        var win = window.open('', '', 'width='+image.width+',height='+image.height);
        win.document.open('text/html', 'replace');            
        win.document.write('<html><head><title>'+title+'</title></head><body style="margin:0;padding:0" onBlur="self.close()" onclick="self.close()">'+ 
             '<img src="'+this.src+'" title="'+title+ '"></body></html>' );
        win.document.close();
    }
}
};	


