function goImgWin(myImage,myWidth,myHeight,origLeft,origTop,capt) {
	var mh = myHeight + 44;
	var mw = myWidth + 24;

	TheImgWin = window.open('','image','height=' + mh + ',width=' + mw + ',toolbar=no,directories=no, status=no,' + 'menubar=no,scrollbars=no,resizable=no');
	
	TheImgWin.resizeTo(mw+2,mh+30);

	TheImgWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http:\/\/www.w3.org\/1999\/xhtml">');

	TheImgWin.document.write('<head><title>Popup<\/title><\/head>');

	TheImgWin.document.write('<body style="overflow:hidden" bgcolor="#ffffff" onclick="self.close()">');

	TheImgWin.document.write('<img src="'+myImage+'"width="'+myWidth+'" height="'+myHeight+'" ');

	TheImgWin.document.write('border="0" alt="'+capt+'"\/><p align="center">'+capt+'<\/p>');

	TheImgWin.document.write('<\/p><\/body><\/html>');
	
	TheImgWin.moveTo(origLeft,origTop);
	
	TheImgWin.focus();
}

// here is my version combining the above and the below
function myPop(imgURL,wname,img_h,img_v,caption,title){
 	 img_h_space  = 20;
    	 img_v_space  = 75;
    	 window_h     = parseInt(img_h) + img_h_space;
    	 window_v     = parseInt(img_v) + img_v_space;
	 var left = (screen.availWidth-window_h)/2;
         var top = (screen.availHeight-window_v)/2;
         var settings = "height="+window_v+",width="+window_h+",top="+top+
            ",left="+left+",scrollbars=no,toolbar=no,"+
            "location=no,status=no,menubar=no,resizable=yes,"+
            "dependent=no,fullscreen=no";
         popup = window.open(imgURL,wname,settings);
         	if (parseInt(navigator.appVersion) >= 4) popup.window.focus();	popup.document.write("<html>\n"+"\t<head>\n"+"\t\t<title>"+title+"</title>\n"+"\t</head>"+"<body style=\"background-color:#ffff;font-size:10px;font-family:verdana;margin:5px auto;\">\n"+"<img src="+imgURL+" border=0 />"+"<p>"+caption+"</p>\n"+"</body>\n"+"</html>");
      }


      // opens a pop-up window to the webpage of your choice.
      // "url" is the URL and filename of the page to be opened.
      // "wname" is the object name of the new window that will
      // be created. This is not the title, it will not be visible
      // anywhere on the window. This name merely represents the 
      // new window object so that it can be manipulated via any
      // pursuant JavaScripts.
      // "w" is the width, in pixels, to make the new window.
      // "h" is the height, in pixels, to make the new window.
      // Be aware that "w" and "h" will be the outer dimemsions
      // of the new window. So if you enable any of the other
      // window features (toolbar, statusbar, scrollbars, etc),
      // they will reduce the content area within the window.
      function urlWin(url,wname,w,h) {
         // "winl" and "wint" determine the users available 
         // screen size (minus the taskbar and such), then
         // subtract the specified window dimensions, and
         // then divide those by 2 to find the center of the
         // user's screen.
         var left = (screen.availWidth-w)/2;
         var top = (screen.availHeight-h)/2;
         // "settings" specifies how and where the window
         // will be displayed. You can choose "yes" or "no" to
         // decide if certain window elements will be displayed.
         var settings = "width="+w+",height="+h+",top="+top+
            ",left="+left+",scrollbars=yes,toolbar=no,"+
            "location=no,status=no,menubar=no,resizable=no,"+
            "dependent=no,fullscreen=no";
         // this opens the window, using the above information.
         popup = window.open(url,wname,settings);
         // if this is a version 4+ browser, the focus will be
         // placed on the window after it has opened to make
         // sure it doesn't fall behind another window.
         if(parseInt(navigator.appVersion) >= 4) popup.window.focus();
      }
      // opens a pop-up window which displays an image and a caption.
      // "imgUrl" is the url and filename of the image to be opened.
      // "wname", "w", and "h" are the same as for the previous function.
      // "caption" is any additional text you would like to have
      // displayed below the image. If you do not want a caption, you
      // just need to leave the argument blank as in the following:
      //    imgWin('file.gif','newWin','320','240','');
      function imgWin(imgURL,wname,w,h,caption){
         var left = (screen.availWidth-w)/2;
         var top = (screen.availHeight-h)/2;
         var settings = "height="+h+",width="+w+",top="+top+
            ",left="+left+",scrollbars=no,toolbar=no,"+
            "location=no,status=no,menubar=no,resizable=yes,"+
            "dependent=no,fullscreen=no";
         popup = window.open(imgURL,wname,settings);
         if (parseInt(navigator.appVersion) >= 4) popup.window.focus();
         // this writes a quick html page to place your image in. you
         // can give your window a title, specify a background color,
         // font properties, all sorts of stuff. the image is placed
         // in an anchor tag so that the user can close the window by
         // clicking the image.
         popup.document.write(
            "<html>\n"+
            "\t<head>\n"+
            "\t\t<title>Your Title Here</title>\n"+
            "\t</head>"+
            "<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor=\"#c7ccd3\">\n"+
            "<center>\n"+
            "<a href=\"javascript:window.close();\">"+
            "<img src="+imgURL+" border=0>"+
            "</a><br>\n"+
            "<font color=\"#575f6c\" size=2>"+caption+"</font>\n"+
            "</center><br>\n"+
            "</body>\n"+
            "</html>"
         );
      }
      // opens a pop-up window which displays a Macromedia Flash movie.
      // "swfUrl" is the URL and filename of the Flash movie to be opened.
      // "wname", "w", and "h" are the same as for the previous functions.
      function swfWin(swfURL,wname,w,h){
         var top = (screen.availHeight-h)/2;
         var left = (screen.availWidth-w)/2;
         var settings = "height="+h+",width="+w+",top="+top+
            ",left="+left+",scrollbars=no,toolbar=no,"+
            "location=no,status=no,menubar=no,resizable=yes,"+
            "dependent=no,fullscreen=no";
         popup = window.open(swfURL,wname,settings);
         if (parseInt(navigator.appVersion) >= 4) popup.window.focus();
         // this writes a quick html page to place your movie in. You
         // can give your window a title, specify a background color,
         // movie properties, all sorts of stuff.
         popup.document.write(
            "<html>\n"+
            "\t<head>\n"+
            "\t\t<title>Your Title Here</title>\n"+
            "\t</head>\n"+
            "<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>\n"+
            "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' "+
            "codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' "+
            "id=movie WIDTH="+w+" HEIGHT="+h+">\n"+
            "\t<param name=movie value="+swfURL+">\n"+
            "\t<param name=loop value=true>\n"+
            "\t<param name=quality value=high>\n"+
            "\t<embed src="+swfURL+" name=movie quality=high "+
            "bgcolor='#fffff' WIDTH="+w+" HEIGHT="+h+
            " TYPE='application/x-shockwave-flash'"+
            "PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>"+
            "</embed>\n"+
            "</object>\n"+
            "</body>\n"+
            "</html>"
         );
      }


function popup(url,img_h,img_v,caption)
{
    img_h_space  = 20;
    img_v_space  = 75;
    window_h     = parseInt(img_h) + img_h_space;
    window_v     = parseInt(img_v) + img_v_space;
    options      = 'toolbar=0' +
                   ',status=0' +
                   ',menubar=0' +
                   ',scrollbars=0' +
                   ',resizable=0' +
                   ',width=' + window_h +
                   ',height=' + window_v;
    img_tag      = '<img src="'+url+'" width="'+img_h+'" height="'+img_v+'">';
    //if (!title) 
    //    title = caption;
    content      =
      '<html>\n'+
      '<head><title>Images from Call of Dudy<\/title><\/head>\n' +
      '<body bgcolor="#ffffff"><div class="popup">' + img_tag +
      '<p style="font:10px verdana;margin:4px;color:#333;">' + caption +'<br>' + 
      '<\/div><\/body>\n' +
      '<\/html>';
  
    if (typeof(viewImg) == 'object' && !viewImg.closed)
        viewImg.close();
    viewImg  = window.open('','viewImg',options);
    if (!viewImg.opener) 
        viewImg.opener = self;
    viewImg.document.open();
    viewImg.document.write(content);
    viewImg.document.close();
    viewImg.focus();
}
