function openIT(u,W,H,X,Y,n,b,x,m,r,S,title) {
var myChromeless = new ChromelessWindow();
/////////////////////////////////////////////
//This are the attributes you can customize//
/////////////////////////////////////////////
myChromeless.URL = u;
myChromeless.title = title;
myChromeless.titlebarHeight = 20;
myChromeless.titleFont = "Verdana";
myChromeless.titleSize = 11;
myChromeless.titleColor = "#FFFFFF";
myChromeless.scrollbars = S; 
myChromeless.w = W; //width
myChromeless.h = H; //height
myChromeless.centered = "no";
myChromeless.xPos = X;
myChromeless.yPos = Y;
myChromeless.borderColor = "#003366";
myChromeless.borderSize = 2;
//myChromeless.minimizeBottom = "image/popup/min_up.gif";
myChromeless.closeBottom = "image/popup/close_ovr.gif";
myChromeless.openChromeless();
return myChromeless;
}
var mytimer = '';
var myimg;
var counter = 0;
var maxcounter = 5;
function checksize() {
  var width = myimg.width;
  var height = myimg.height;
  counter++;
  if (((width > 0) || (height > 0)) || (counter > maxcounter)) {
    clearInterval(mytimer);
	if (counter > maxcounter) {
	  width = 350;
	  height = 350;
	}
	if (width >  screen.availWidth) {
	  width = screen.availWidth;
	  scrollbars = "yes";
	} else {
	  scrollbars = "no";
	}
	if (height > screen.availHeight) {
	  height = screen.availHeight;
      scrollbars = "yes";
	} else {
	  scrollbars = "no";
	}
    is_mac = navigator.platform.toString().toLowerCase().indexOf('mac')==-1 ? false:true;
	if (is_mac) {
	  OpenVenster('image.php?img=' + myimg.src,width,height);
	} else {
 	  width = width + 3;
 	  height = height + 22;
	  openIT('image.php?img=' + myimg.src,width,height,((screen.availWidth/2) - (width/2)),((screen.availHeight/2) - (height/2)),'popup',false,false,false,false,scrollbars,'Routekaartje');
	}
  }
}
function viewimage(afbeelding) {
  myimg = new Image();
  myimg.src = afbeelding;
  mytimer = setInterval("checksize();",500);
}
function popup(url,width,height,scrollbars,title) {
  if (scrollbars == true) {
    scrollbars = "yes";
  } else {
    scrollbars = "no";
  }
  if (!isset(title)) {
    title = "";
  }
  openIT(url,width,height,((screen.availWidth/2) - (width/2)),((screen.availHeight/2) - (height/2)) + 40,'popup',false,false,false,false,scrollbars,title);
}
document.write('<script language="javascript" src="include/js/chromeless.js"></scr'+'ipt>');
document.write('<script language="javascript" src="include/js/browsercheck.js"></scr'+'ipt>');

function isset(myVar) { 
  var undefined; 
  if (myVar != undefined) { 
    return true; 
  } else { 
    return false; 
  } 
} 
