function Pop(gall,photoSrcNum) {

  //alert('hi');
  
  var scr_width = 400;   // Initial size; will be resized
  var scr_height = 490;  // Initial size; will be resized
  var img_dir = "gallery/";

  photosrc = {'gallery1':['ROAD_ TO_ PACKER\'S BAY.jpg','BEACH_ NORTH_OF CHILLI BEACH.jpg','BAY_ NORTH_ OF_ CHILLI.jpg','LOOKING NORTH_ UP CHILLI.jpg','NEWLY_ GRADED_ ROAD.jpg','RESTORATION_ISLAND2.jpg','RESTORATION_ ISLAND.jpg','RESTORATION_ IS_ FROM _M.jpg','BEACH_ ROAD.jpg','SOUTH _CHILLI_BEACH HEADLAND.jpg','THE_TIDE_ IS COMING_ IN.jpg','TURNOFF_ HERE.jpg'],
              'gallery2':['p-the-deck.jpg','p-deck-setting.jpg','p-table-chairs.jpg','p-looking-towards-amenities.jpg','p-looking-in-from-deck.jpg','p-interior-from-doorway.jpg','p-interior-from-shutter.jpg','p-frangapannies.jpg','p-inside-looking-out.jpg','p-northern-aspect.jpg','p-beach-from-penthouse.jpg','p-looking-westward.jpg','p-view-from-loo.jpg','p-sunset-2.jpg','house4bldsupAylenhill.jpg','WEYMOUTH_BAY_SUNSET.jpg','Portland_Roads.jpg','THE_STAIRS_FROM_THE_BOTTOM.jpg','the_beach.jpg','LOOKING_NORTH_WEST_FROM_LIVING_ROOM.jpg'],
              'gallery3':['spear fishing.jpg','lockhart river gallery.jpg','restoration island.jpg','chilli beach.jpg','prospecting.jpg','success.jpg','kite flying.jpg','2 only.jpg','beach combing.jpg','restoration rock.jpg','andrew-1.jpg','kathy-1.jpg','andrew-2.jpg','kathy-2.jpg','kathy-3.jpg', 'andrew-3.jpg','andrew-4.jpg','kathy-4.jpg','kathy-5.jpg','andrew-5.jpg','kathy-6.jpg', 'andrew-6.jpg']              
              };  
  imgTitle = {'gallery1':['Road to Packers Bay','Beach North of Chilli Beach','Bay North of Chilli','Looking Noth up Chilli Beach','Road to Chilli Beach','Resoration Island','Restoration Island & Old Man Rock','Resoration Island','Chilli Beach Foreshore','South of Chilli Beach','The tide is coming in','Turnoff here'],
              'gallery2':['The Deck','Deck Setting','Table and Chairs','Looking Towards the Amenities','Looking in from the Deck','Interior from Doorway','Interior from Front Shutter','Frangapannies','Inside Looking Out','Northern Aspect','View of the Beach from the Penthouse','Looking Westward','View from the Loo','Sunset','House Up Aylen Hill','Weymouth Bay Sunset','Portland Roads','The Stairs From The Bottom','The Beach','Looking North West From Living Room'],
              'gallery3':['Spear Fishing','Lockhart River Gallery','Restoration Island','Chilli Beach','Prospecting','Success','Kite Flying','2 Only','Beach Combing','Restoration Rock','Andrew holding a Trevally','Kathy holding a Coral Trout','Andrew holding a Barramundi','Kathy holding a Barramundi', 'Kathy holding a fish', 'Andrew holding a fish', 'Andrew holding a fish', 'Kathy holding a fish', 'Kathy holding a fish', 'Andrew holding a fish', 'Kathy holding a fish', 'Andrew holding a fish']              
              };
  imgSrc = img_dir + photosrc[gall][photoSrcNum];
  
  var picts = (photosrc[gall].length);
    
  
  
 



  var newWin = null;
  newWin = window.open("","","width=" + scr_width + ",height=" + scr_height + ",scrollbars=no,resizable=yes");
  if (newWin != null) {
    newWin.focus();
    var htmlCode = "\n";
    htmlCode +=    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
    htmlCode +=    "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    htmlCode +=    "   <head>\n";
    htmlCode +=    "    <title>" + imgTitle + "</title>\n";
    htmlCode +=    "      <link rel=\"stylesheet\" type=\"text/css\" href=\"css/pop2.css\">\n";
    htmlCode +=    "    <script src=\"scripts/new_pop.js\" type=\"text/javascript\"></script>\n";
    htmlCode +=    "     </head>\n";    
    htmlCode +=    "   <body>\n";
    htmlCode +=    "   <div id=\"Pop\">\n";
    (document.layers) ? htmlCode += "<layer id=\"Loading\" class=\"Loading\" visibility=\"visible\" z-index=\"1\">\n" :
                htmlCode += "<div id=\"Loading\" class=\"Loading\" z-index=\"1\">\n";
    htmlCode +=     "      Please wait, loading...\n";
    (document.layers) ? htmlCode += "</layer>\n" :
                htmlCode += "</div>\n";
    htmlCode +=    "     <img id=\"Photo\" src=\"" + imgSrc + "\" border=\"1\" alt=\"" + imgTitle + "\" onload=\"javascript:(document.layers) ? document.layers['Loading'].visibility='hidden' : document.getElementById('Loading').style.display='none'; resizeWindow();\">\n";
    htmlCode +=    "     <div id=\"Caption\">" + imgTitle[gall][photoSrcNum] + "</div><br>\n";
    htmlCode +=    "     <div id=\"scroller\"><a href=\"javascript:nextBtnClicked()\" id=\"next\">Next &raquo;</a><a href=\"javascript:prevBtnClicked()\" id=\"prev\">&laquo; Previous</a></div>";
    htmlCode +=    "     <br /><br /><a class=\"Footer\" href=\"javascript:window.close();\" title=\"Close this window and return to website\">Close Window</a>\n";
    htmlCode +=    "   </div>\n";
    htmlCode +=    "   </body>\n";
    htmlCode +=    "</html>";
    newWin.document.write(htmlCode); 
    newWin.photosrc =  photosrc[gall];  
    newWin.phototitle =  imgTitle[gall];  
    newWin.num =  photoSrcNum;  
    newWin.document.close();
  }
  
  
  
 
}

  

