/*
*   author: mike robotham, Jan-9-2003                              
*   email: mikerobotham@yahoo.com                                  
*                                                                  
*/

        var popupWin;                                   //the popup window for displaying large images
        var imgDir = "image_files/portfolio/";          // the path to all the large and small portfolio images

        /* opens a popup window and displays a specifed image and optional caption */
        function showBigPicture(img, title){
            
            closeWin();
            
            if(title == null){
                title = "";
            }
           
            popupWin = window.open("", "popupWin", "width=650,height=650,left=100,top=60,scrollbars=yes,resizable=yes");

            popupWin.document.write("<html><body onblur=\"self.close();\"><head><title>" 
                                    + title 
                                    + "</title><LINK href=\"includes/style.css\" type=\"text/css\" rel=\"stylesheet\"></head><center><h3>" 
                                    + title 
                                    + "</h3><img src=\"image_files/portfolio/" 
                                    + img 
                                    + "\"></center><BR><p align=right><a href=\"javascript:self.close();\">close window</a></p></body></html>");

            popupWin.focus();

        }

        /* closes the pop up window */
        function closeWin(){

            if(popupWin != null){

                popupWin.close();
                popupWin = null;  

            }

        }

        /* renders the html image tag for the thumbnails */
        function renderImage(img){

            document.write( "<img border=\"0\" src=\"" + imgDir + img + "\" width=\"160\" height=\"120\">" );
        }

