<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/hsphere/local/home/c307025/cogancameras.com/cmsAdmin/lib/viewer_functions.php";
  

  list($common_informationRecords, $common_informationMetaData) = getRecords(array(
    'tableName'   => 'common_information',
    'allowSearch'=> false,
    'limit'       => '1',
  ));
  $common_informationRecord = @$common_informationRecords[0]; // get first record
  
 
  // load records
  list($bookRecords, $bookMetaData) = getRecords(array(
    'tableName'   => 'book',
    'where'       => whereRecordNumberInUrl(1),
    'limit'       => '1',
	
  ));
  $bookRecord = @$bookRecords[0]; // get first record
  

?>

<?php include_once "/hsphere/local/home/c307025/cogancameras.com/spambot-email-protector.php" ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="Scripts/thumbnailviewer3revised.js" defer="defer">

/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

  </script>		
<title>Cogan Cameras - <?php echo $common_informationRecord['book_page_title'] ?></title>

<link rel="stylesheet" type="text/css" href="css/cogan.css" />
<script type="text/javascript" src="Scripts/css3-multi-column.js"></script>
<meta name="description" content="<?php echo $common_informationRecord['site_description'] ?>">
  <meta name="keywords" content="<?php echo $common_informationRecord['book_page_keywords'] ?>">
<style type="text/css">
<!--
body { color:#<?php echo $common_informationRecord['font_color'] ?>;
	 <?php if ($common_informationRecord['all_page_background_image']): ?>background-image: url(<?php foreach ($common_informationRecord['all_page_background_image'] as $upload): ?><?php echo $upload['urlPath'] ?><?php endforeach ?>);<?php endif ?> 
	 <?php if ($common_informationRecord['all_page_background_color']): ?>background-color:#<?php echo $common_informationRecord['all_page_background_color'] ?>;<?php endif ?> 
	background-repeat: <?php echo $common_informationRecord['repeat_all_page_background'] ?>;
}
-->
</style>
<link rel="shortcut icon"  href="http://173.83.154.86/favicon.ico" >
<?php if ($common_informationRecord['use_menu_images'] == "1"): ?>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}
//-->
</script><?php endif ?> 
</head>

<body <?php if ($common_informationRecord['use_menu_images'] == "1"): ?>onload="MM_preloadImages('<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][0]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][1]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][2]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][3]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][4]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['thumbUrlPath'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][5]['thumbUrlPath'] ?>')"<?php endif ?>>

<?php 
	require 'emailcode.class.php'; 
	$emailcode = new ClassEmailcode();?>
<div align="center" ><?php foreach ($common_informationRecord['masthead_image'] as $upload): ?><img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt='' /><?php endforeach ?></div>
<?php if ($common_informationRecord['use_menu_images'] == "1"): ?>
<table width="40%" border="0" align="center" cellpadding="3">
  <tr>
    <td width="17%" align="center"><a href="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['info1'] ?>" target="_top" onclick="MM_nbGroup('down','group1','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['thumbUrlPath'] ?>',1)" onmouseover="MM_nbGroup('over','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][0]['thumbUrlPath'] ?>','',1)" onmouseout="MM_nbGroup('out')"><img name="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['info2'] ?>" src="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['thumbUrlPath'] ?>" border="0" alt="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][0]['info2'] ?>" onload="" /></a></td>
    
    <td width="16%" align="center"><a href="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['info1'] ?>" target="_top" onclick="MM_nbGroup('down','group1','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['thumbUrlPath'] ?>',1)" onmouseover="MM_nbGroup('over','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][1]['thumbUrlPath'] ?>','',1)" onmouseout="MM_nbGroup('out')"><img name="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['info2'] ?>" src="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['thumbUrlPath'] ?>" border="0" alt="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][1]['info2'] ?>" onload="" /></a></td>
    
    <td width="17%" align="center"><a href="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['info1'] ?>" target="_top" onclick="MM_nbGroup('down','group1','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['thumbUrlPath'] ?>',1)" onmouseover="MM_nbGroup('over','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][2]['thumbUrlPath'] ?>','',1)" onmouseout="MM_nbGroup('out')"><img name="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['info2'] ?>" src="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['thumbUrlPath'] ?>" border="0" alt="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][2]['info2'] ?>" onload="" /></a></td>
    
    <td width="17%" align="center"><a href="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['info1'] ?>" target="_top" onclick="MM_nbGroup('down','group1','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['thumbUrlPath'] ?>',1)" onmouseover="MM_nbGroup('over','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][3]['thumbUrlPath'] ?>','',1)" onmouseout="MM_nbGroup('out')"><img name="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['info2'] ?>" src="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['thumbUrlPath'] ?>" border="0" alt="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][3]['info2'] ?>" onload="" /></a></td>
    
    <td width="16%" align="center"><a href="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['info1'] ?>" target="_top" onclick="MM_nbGroup('down','group1','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['thumbUrlPath'] ?>',1)" onmouseover="MM_nbGroup('over','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][4]['thumbUrlPath'] ?>','',1)" onmouseout="MM_nbGroup('out')"><img name="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['info2'] ?>" src="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['thumbUrlPath'] ?>" border="0" alt="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][4]['info2'] ?>" onload="" /></a></td>
    
    <td width="17%" align="center"><a href="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['info1'] ?>" target="_top" onclick="MM_nbGroup('down','group1','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['thumbUrlPath'] ?>',1)" onmouseover="MM_nbGroup('over','<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['info2'] ?>','<?php echo @$common_informationRecord['navigation_menu_item_1_hover'][5]['thumbUrlPath'] ?>','',1)" onmouseout="MM_nbGroup('out')"><img name="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['info2'] ?>" src="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['thumbUrlPath'] ?>" border="0" alt="<?php echo @$common_informationRecord['navigation_menu_item_1_normal'][5]['info2'] ?>" onload="" /></a></td>
    
  </tr>
</table>
<?php else: ?><!-- #BeginLibraryItem "/Library/main nav.lbi" --><table width="910"  align="center">
  <tr>
     <td align="center" valign="top"><a class="special" href="http://173.83.154.86">Home</a></td>
     <td align="center" valign="top"><a class="special" href="http://173.83.154.86/book.php">Photo Book and<br />Price Guide</a></td>
        <td align="center" valign="top"><a class="special" href="http://173.83.154.86/catalog.php">Items<br />
        For 
        Sale</a></td>
     <td align="center" valign="top"><a class="special" href="http://173.83.154.86/faq.php">FAQ</a></td>
    <td align="center" valign="top"><a class="special" href="http://173.83.154.86/forum.php">Discussion<br />Forum</a></td>
    <td align="center" valign="top"><a class="special" href="http://173.83.154.86/about.php">About<br />Us</a></td>
     <td align="center" valign="top"><a class="special" href="http://173.83.154.86/contact.php">Contact</a></td>
    <td align="center" valign="top"><div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en'
  }, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script></td>
  </tr>
</table><!-- #EndLibraryItem --><?php endif; ?>
<table style="background-color:#151515" width="90%" border="0" align="center" cellpadding="3">
  <tr><td><div align="center"><br />
  
  
   <?php foreach ($common_informationRecord['book_masthead'] as $upload): ?>
          
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" <?php echo $upload['info2'] ?>" border="0" align="top" />
  <?php endforeach ?></div></td></tr><tr>
    <td >
                 <span class="heading-text-bold-824A00-13"><?php echo $bookRecord['topic'] ?></span><br/><br/>

<span class="body-text-9"><?php echo $bookRecord['content'] ?></span>

		  </td>  </tr>
				</tbody>
</table>
 
 
<table width="975" border="0" align="center" cellpadding="5">
  
  <tr>
    <td width="474" valign="top"><div align="center"><br /><?php if ($bookRecord['detail_page_images']): ?><span class="body-text-bold-9">
	<?php echo $common_informationRecord['book_image_thumbnails_instructions'] ?></span><?php endif ?> <br /><br>
        </div>
     </td></tr></table>

<table width="950" border="0" align="center">
  <tr>
    <td valign="top">
         <?php  
$photosPerPage = 5;  
$photoPage = @$_REQUEST['photoPage'] ? $_REQUEST['photoPage'] - 1 : 0;  
$firstIndex = $photoPage * $photosPerPage; 
$lastIndex = min($firstIndex + $photosPerPage, sizeof($bookRecord['detail_page_images'])) - 1;  
?>     

<?php if ((ceil(sizeof($bookRecord['detail_page_images']) / $photosPerPage)) > 1): ?><form action="?num=<?php echo $bookRecord['num'] ?>" method="post"> 
<?php if ($firstIndex > 0): ?>  
<a href="?photoPage=<?php echo $photoPage; ?>&=<?php echo $bookRecord['num'] ?>"><?php echo $common_informationRecord['previous_message'] ?></a>  
<?php endif ?>  

<span class="body-text-bold-9">Page  <input type="text" name="photoPage" value="<?php echo($photoPage + 1); ?>" style="width: 25px;" /> of <?php echo(ceil(sizeof($bookRecord['detail_page_images']) / $photosPerPage)); ?></span>

<?php if ($lastIndex < sizeof($bookRecord['detail_page_images']) - 1): ?>  <input type="submit" value="Go" />
<a href="?photoPage=<?php echo $photoPage+2; ?>&=<?php echo $bookRecord['num'] ?>"><?php echo $common_informationRecord['next_message'] ?></a><br />  
<?php endif ?> 
</form> 
<?php endif ?>    
    
    <table  border="0" cellspacing="3" cellpadding="3"> 
<tr>
  

<?php

if ($firstIndex > sizeof($bookRecord['detail_page_images'])-1 || $firstIndex < 0) { $firstIndex = 0; $photoPage = 0; } 
 
foreach (range($firstIndex, $lastIndex) as $photoIndex):  
@$upload = $bookRecord['detail_page_images'][$photoIndex]  
?>  


<td align="left"  valign="bottom">

<a href="<?php echo $upload['urlPath'] ?>"  name="<?php echo $upload['thumbUrlPath2'] ?>"" 

rel="enlargeimage::mouseover::"

rev="loadarea" > <img src="<?php echo $upload['thumbUrlPath'] ?>" alt=""  width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight']?>" border="0" style="margin-bottom: 5px" /> </a>

</td>
<?php $maxCols=3; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>
<?php endforeach ?>
</tr>
</table>

<p></td>
    <td width="400"><table border="0" cellpadding="5" cellspacing="0" width="25%">
          
<tr>
<td align="left" valign="top" ><div align="left">
             
     
<div align="center" id="loadarea"  style="width: 400px; height: 500px;">
   
   
 

   
  
     <?php $upload = @$bookRecord['detail_page_images'][$firstIndex] ?>
             
              <img src="<?php echo $upload['thumbUrlPath2'] ?>" alt="" border="0" /><br /><br />
            
            
</div> </td>
    
  </tr>
</table></td>
  </tr>
</table>

<br/>  
    
         
        
<br /><br /><br /><br />
  



<table width="644" border="0" align="center" cellpadding="3">
  <tr>
    <td>
      <div align="left" class="body-text-small-8">&copy; <?php echo date("Y") ?> Cogan Cameras - All Rights Reserve</div>
    </td>
    <td><div align="center">&nbsp;</div></td>
    <td><div align="center">&nbsp;</div></td>
    <td>
    <div align="right" ><?php if ($common_informationRecord['disclaimer']): ?><a class="body-text-small-8" href="disclaimer.php">Read This First</a><?php endif ?></div>
    </td>
  </tr>
</table>
<br /><br /><br /><br />
<span class="body-text-small-8"><?php showExecuteSeconds() ?> seconds </span>
</body>
</html>
