function openLink(URI){
 win = window.open(URI,"secWin","width=800,height=600,left=10, top=10,menubar=yes, status=yes, toolbar=yes, directories=yes, scrollbars=yes,resizable=yes,location=yes");
 win.focus;
}

function OpenWin(url) {

    var sDefaultFeatures = "menubar=no,status=yes,toolbar=no,directories=no,scrollbars=yes,resizable=yes,location=no"; 
    var bAutoCenter = false;
    var xPosition = 10;
    var yPosition = 10;
    var xWindowPos;
	var yWindowPos;
    var cxWidth = 500;
    var cyHeight = 550;
    
	if (bAutoCenter)
		{
		var xScreenCenter = Math.floor(screen.availWidth / 2);
		var yScreenCenter = Math.floor(screen.availHeight / 2);
		xWindowPos = xScreenCenter - Math.floor(cxWidth / 2);
		yWindowPos = yScreenCenter - Math.floor(cyHeight / 2);
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	else
		{
		xWindowPos = xPosition;
		yWindowPos = yPosition;
		sFeatures = sDefaultFeatures + ",left=" + xWindowPos.toString() + ",top=" + yWindowPos.toString() + ",width=" + cxWidth.toString() + ",height=" + cyHeight.toString();
		}
	    popper = window.open(url,"thirdWin",sFeatures);
 	    popper.focus;
}



function viewImage(iname,icap,iht,wname,wsize,hsize) {
  var bldArg = 'width=' + wsize + ',height=' + hsize + ',left=10,top=10,screenX=10,screenY=10';
  bldArg = bldArg + ',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0';
     if(!(iname=="")) {
      popupWin=window.open('',wname,bldArg);
        if (!popupWin.opener) { 
            popupWin.opener = self;
        }
      popupWin.document.open();
      popupWin.document.writeln("<head>");
      popupWin.document.writeln("<title>Hondenproducten</title>");
      popupWin.document.writeln("<SCRIPT language='JavaScript'>");
//      popupWin.document.writeln("if (window.focus) {");
//      popupWin.document.writeln(" self.focus();");
//      popupWin.document.writeln("}");
      popupWin.document.writeln("function killWindow() {");
      popupWin.document.writeln("  killWin = window.close();");
      popupWin.document.writeln("}");
      popupWin.document.writeln("</SCRIPT>");
      popupWin.document.writeln("<LINK REL='stylesheet' HREF='../../stylesheet.css' TYPE='text/css'>");  
      popupWin.document.writeln("</head>");
      popupWin.document.writeln("<body text='black' marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 onLoad='javascript:self.focus();'>");
      popupWin.document.writeln("<center>");
      popupWin.document.writeln("<a href='' onClick='killWindow();'><img src='" + iname + "' border=0></a><br><font size=2>" + icap + "</font>");
      popupWin.document.writeln("</center>");
      popupWin.document.close();
      } else {
          popupWin=window.open('noimage.htm');
          if (!popupWin.opener) { 
            popupWin.opener = self;
            }
      }
   }
