
//
//  ###############  Javascript Functions for Creating Photo Pages #######################
//
//               Written by Robert James / Photographer for StudioJames.com
//
//  ######################################################################################
 

//  ######################################################################################
//   CurrentYear() function:  simpy returns the current year and is used to place the
//                            current year in the copyright notice at the bottom of each
//                            page.
//  ######################################################################################
//   
 	function CurrentYear(){
    var d = new Date();
    var s = d.getUTCFullYear();
    return(s);
  }  

//  ######################################################################################
//   OpenNewWindow() function:  Opens a new browser window to the size specified and
//                            sets each window to close simply by clicking on the 
//                            displayed photo.  
//       Parameters:
//           SModelName - Name of Model to be displayed at top of window
//           PhotoURL - the location of the photo to be displayed
//           PicWidth - the actual Width of the photo in pixels
//           PicHeight - the actual Height of the photo in pixels
//           PicWinWidth - The width of the Window to be opened
//           PicWinHeight - the Height of the Window to be opened
//           
//  ######################################################################################
//   
  function OpenNewWindow(sModelName, PhotoURL, PicWidth, PicHeight, PicWinWidth, PicWinHeight) 
  {
    var ThisYear = CurrentYear();
    var PicWindow = window.open('', 'PhotoViewer', 'location=0, directories=0, fullscreen=0, menubar=0, status=0, toolbar=0, width='  + PicWinWidth + ', height=' + PicWinHeight + ', scrollbars=1');
    PicWindow.document.writeln('<html>');
    PicWindow.document.writeln('<head>');
    PicWindow.document.writeln('  <LINK rel="stylesheet" type="text/css" href="css_main.css" title="main_style">');
    PicWindow.document.writeln('  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
    PicWindow.document.writeln('  <meta name="author" content="StudioJames.com © 2000 on / Robert James Photographer">');
    PicWindow.document.writeln('  <meta name="description" content="The Photography of Robert James / Studio James">');
    PicWindow.document.writeln('  <meta name="keywords" content="Photography, fine, art, male, nude, photograph, photo, model, modeling">');
    PicWindow.document.writeln('  <meta name="rating" content="Adult">');
    PicWindow.document.writeln('  <meta name="robots" content="ALL">');
    PicWindow.document.writeln('  <title>The Photography of Robert James / StudioJames.com © 2005 and after</title>');
    PicWindow.document.writeln('  <script language="javascript">');
    PicWindow.document.writeln('  	self.focus();');
    PicWindow.document.writeln(' 	</script>');
    PicWindow.document.writeln('</head>');
    PicWindow.document.writeln('<body style="margin: 10 10 10 20;">');
    PicWindow.document.writeln('<table border="0" cellspacing="0" cellpadding="0" cols="3">');
    PicWindow.document.writeln('');
    PicWindow.document.writeln('  <!--##############################>');
    PicWindow.document.writeln('  <---##########  HEADER  ##########>');
    PicWindow.document.writeln('  <---##############################-->');
    PicWindow.document.writeln('');
    PicWindow.document.writeln('  <tr>'); 
    PicWindow.document.writeln('  	<td>&nbsp &nbsp &nbsp &nbsp &nbsp</td>');
    PicWindow.document.writeln('    <td align="center"><font class="Titles">' + sModelName + '</font><br></td>');
    PicWindow.document.writeln('    <td align="right"><a href="javascript:window.close();">Close</td>');
    PicWindow.document.writeln('  </tr>');    
    PicWindow.document.writeln('');
    PicWindow.document.writeln('  <!--##############################>');
    PicWindow.document.writeln('  <---##########  PHOTO  ###########>');
    PicWindow.document.writeln('  <---##############################-->');
    PicWindow.document.writeln('');
    PicWindow.document.writeln('  <tr>');
    PicWindow.document.writeln('    <td align="center" colspan="3">');
    PicWindow.document.writeln('    <a href="javascript:window.close();"><img src="' + PhotoURL + '" width="' + PicWidth + '" height="' + PicHeight + '" border="0" alt="Click to close" id="bigImage"></a>');
    PicWindow.document.writeln('    </td>');
    PicWindow.document.writeln('  </tr>');
    PicWindow.document.writeln('');
    PicWindow.document.writeln('  <!--##############################>');
    PicWindow.document.writeln('  <---##########  FOOTER  ##########>');   
    PicWindow.document.writeln('  <---##############################-->');
    PicWindow.document.writeln('');
    PicWindow.document.writeln('  <tr>');
    PicWindow.document.writeln('    <td align="center" colspan="3">');
    PicWindow.document.writeln('      <font class=Copyright>');
    PicWindow.document.writeln('        <br>');
    PicWindow.document.writeln('        All Images in this site are Copyrighted by StudioJames.com © 2005-' + ThisYear + '<br>');
    PicWindow.document.writeln('        and may not be copied without prior written permission.<br><br>');
    PicWindow.document.writeln('        Robert James Photographer/Artist<br>');
    PicWindow.document.writeln('      </font>');
    PicWindow.document.writeln('    </td>');
    PicWindow.document.writeln('  </tr>');
    PicWindow.document.writeln('</table>');
    PicWindow.document.writeln('');
    PicWindow.document.writeln('</body>');
    PicWindow.document.writeln('</html>');
    PicWindow.document.writeln('');
    PicWindow.document.close();
  }  

//  ######################################################################################
//   CreatePicture() function:  Used in the main HTML page to write the code for displaying
//                            the thumbnails of each gallery.  Note:  This is setup to be
//                            Used with tables on the main page.  the function creates a
//                            single <td> entry within the table.  Note 2:  this code ONLY
//                            works with photos using a specific naming format and stored
//                            in a structured folder format.
//          Parameters:
//               sModelName - String: containing Models Name 
//               sGallery   - String: Name of the folder the photos are stored in
//               sPhotoName - String: Name of the photo minus the .jpg extension or _Thumb 
//               nTWidth    - Number: width of Thumbnail in pixels
//               nTHeight   - Number: Height of the thumbnail in pixels
//               nPicWidth  - Number: width of the photo in pixels
//               nPicHeight - Number: height of the photo in pixels
//               nPicWinWidth  - Number: Width to create the large display window for photo
//               nPicWinHeight - Number: height to create the large display window for photo 
//  ######################################################################################
//     
  function CreatePicture(sModelName, sGallery, sPhotoName, nTWidth, nTHeight, nPicWidth, nPicHeight, nPicWinWidth, nPicWinHeight)
  {
	  document.write('<td align="center" valign="middle">');        
	  document.write('<a href="photos/' + sGallery + '/900/' + sPhotoName + '.jpg", rel="lightbox[group1]", title="' + sModelName + '">');
//    document.write('<a href="#" onClick="OpenNewWindow(\'' + sModelName + '\',\'photos/' + sGallery + '/900/' + sPhotoName + '.jpg\', ' + nPicWidth + ', ' + nPicHeight + ', ' + nPicWinWidth + ', ' + nPicWinHeight + ');return false">');
    document.write('<img src="photos/' + sGallery + '/thumbs/' + sPhotoName + '_Thumb.jpg" width="' + nTWidth + '" height="' + nTHeight + '" border="0"></a>');
	  document.write('</td>');
  }

//  ######################################################################################
//   ChezGalleryMenu() function:  used at the top of the 100826 Chez Gallery pages for jumping to 
//                            different galleries (sets) quickly.

//          Parameters:
//               No parameters

//  ######################################################################################
//     
  function ChezGalleryMenu()
  {
	  document.write('<td align="center"><a href="Chez.html">Return to Portfolio</a></td>');
    document.write('<td colspan="3" align="right">');
    document.write('<a href="Chez.html">Set #: &nbsp&nbsp</a>');
    document.write('<a href="Chez_100826_Set01.html">1</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set02.html">2</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set03.html">3</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set04.html">4</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set05.html">5</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set06.html">6</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set07.html">7</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set08.html">8</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set09.html">9</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set10.html">10</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set11.html">11</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set12.html">12</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set13.html">13</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set14.html">14</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set15.html">15</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set16.html">16</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set17.html">17</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set18.html">18</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set19.html">19</a>&nbsp&nbsp');
    document.write('<a href="Chez_100826_Set20.html">20</a>&nbsp&nbsp');
	  document.write('</td>');
  }

//  ######################################################################################
//   ChezGalleryMenu() function:  used at the top of the 101003 Chez Gallery pages for jumping to 
//                            different galleries (sets) quickly.

//          Parameters:
//               No parameters

//  ######################################################################################
//     
  function ChezGalleryMenu02()
  {
	  document.write('<td align="center"><a href="Chez.html">Return to Portfolio</a></td>');
    document.write('<td colspan="3" align="right">');
    document.write('<a href="Chez.html">Set #: &nbsp&nbsp</a>');
    document.write('<a href="Chez_101003_Set01.html">1</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set02.html">2</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set03.html">3</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set04.html">4</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set05.html">5</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set06.html">6</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set07.html">7</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set08.html">8</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set09.html">9</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set10.html">10</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set11.html">11</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set12.html">12</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set13.html">13</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set14.html">14</a>&nbsp&nbsp');
    document.write('<a href="Chez_101003_Set15.html">15</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101003_Set16.html">16</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101003_Set17.html">17</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101003_Set18.html">18</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101003_Set19.html">19</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101003_Set20.html">20</a>&nbsp&nbsp');
	  document.write('</td>');
  }
  
//  ######################################################################################
//   ChezGalleryMenu() function:  used at the top of the 101120 Chez Gallery pages for jumping to 
//                            different galleries (sets) quickly.

//          Parameters:
//               No parameters

//  ######################################################################################
//     
  function ChezGalleryMenu03()
  {
	  document.write('<td align="center"><a href="Chez.html">Return to Portfolio</a></td>');
    document.write('<td colspan="3" align="right">');
    document.write('<a href="Chez.html">Set #: &nbsp&nbsp</a>');
    document.write('<a href="Chez_101120_Set01.html">1</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set02.html">2</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set03.html">3</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set04.html">4</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set05.html">5</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set06.html">6</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set07.html">7</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set08.html">8</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set09.html">9</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set10.html">10</a>&nbsp&nbsp');
    document.write('<a href="Chez_101120_Set11.html">11</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set12.html">12</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set13.html">13</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set14.html">14</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set15.html">15</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set16.html">16</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set17.html">17</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set18.html">18</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set19.html">19</a>&nbsp&nbsp');
    //document.write('<a href="Chez_101120_Set20.html">20</a>&nbsp&nbsp');
	  document.write('</td>');
  }
  
//  ######################################################################################
//   ChezGalleryMenu() function:  used at the top of the 101120 Chez Gallery pages for jumping to 
//                            different galleries (sets) quickly.

//          Parameters:
//               No parameters

//  ######################################################################################
//     
  function ChezGalleryMenu04()
  {
	  document.write('<td align="center"><a href="Chez.html">Return to Portfolio</a></td>');
    document.write('<td colspan="3" align="right">');
    document.write('<a href="Chez.html">Set #: &nbsp&nbsp</a>');
    document.write('<a href="Chez_110519_Set01.html">1</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set02.html">2</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set03.html">3</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set04.html">4</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set05.html">5</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set06.html">6</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set07.html">7</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set08.html">8</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set09.html">9</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set10.html">10</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set11.html">11</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set12.html">12</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set13.html">13</a>&nbsp&nbsp <br>');
    document.write('<a href="Chez_110519_Set14.html">14</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set15.html">15</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set16.html">16</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set17.html">17</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set18.html">18</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set19.html">19</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set20.html">20</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set21.html">21</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set22.html">22</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set23.html">23</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set24.html">24</a>&nbsp&nbsp');
    document.write('<a href="Chez_110519_Set25.html">25</a>&nbsp&nbsp');
	  document.write('</td>');
  }
  
//  ######################################################################################
//   ChezGalleryMenu() function:  used at the top of the 110917 Chez Gallery pages for jumping to 
//                            different galleries (sets) quickly.

//          Parameters:
//               No parameters

//  ######################################################################################
//     
  function ChezGalleryMenu05()
  {
	  document.write('<td align="center"><a href="Chez.html">Return to Portfolio</a></td>');
    document.write('<td colspan="3" align="right">');
    document.write('<a href="Chez.html">Set #: &nbsp&nbsp</a>');
    document.write('<a href="Chez_110917_Set01.html">1</a>&nbsp&nbsp');
    document.write('<a href="Chez_110917_Set02.html">2</a>&nbsp&nbsp');
    document.write('<a href="Chez_110917_Set03.html">3</a>&nbsp&nbsp');
    document.write('<a href="Chez_110917_Set04.html">4</a>&nbsp&nbsp');
    document.write('<a href="Chez_110917_Set05.html">5</a>&nbsp&nbsp');
	  document.write('</td>');
  }  
    
