<?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 "/services/webpages/a/x/axislighting.com/public/cmsAdmin/lib/viewer_functions.php";

   list($brandsRecords, $brandsMetaData) = getRecords(array(
    'tableName'   => 'brands',
    'where'       => whereRecordNumberInUrl(1),
   
  ));
  $brandsRecord = @$brandsRecords[0]; // get first record
  
  
  list($downloadsRecords, $downloadsMetaData) = getRecords(array(
    'tableName'   => 'downloads',
  ));

?>
<!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" />
<title>Welcome to Axis Lighting!</title>
<style type="text/css">
<!--
body {
	background-color: #2e353e;
}
-->
</style>
<link href="axis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="stmenu.js"></script>
<script type="text/javascript" src="stlib.js"></script>
<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_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("header.php"); ?><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="18"></td>
  </tr>
  <tr>
    <td height="30" bgcolor="#16191e"><div class="breadcrumbs">DOWNLOADS</div></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="216" align="left" valign="top" bgcolor="#2d343d"><div class="tree">
          <?php if ($brandsRecord['menutree']): ?>
          <script type="text/javascript" src="http://www.axislighting.com/CMS/<?php echo $brandsRecord['menutree'] ?>.js"></script>
          <?php endif ?>
        </div></td>
        <td valign="top" bgcolor="#2d343d"><BR />

  

  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
  <table width="800" align="center" cellpadding="2" cellspacing="2">
  <tr> <?php $index=1; ?> <?php foreach ($downloadsRecords as $record): ?>      
      <td width="400" align="left" valign="top">  
    
         <div id="CollapsiblePanel<?php echo $index;?>" class="CollapsiblePanel"> 	  <?php $index++; ?>

  <div class="CollapsiblePanelTab" > 
         <?php foreach ($record['brand_logo'] as $upload): ?>
         
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
         
        <?php endforeach ?></div> 
       <div class="CollapsiblePanelContent">
              
      <B> <?php echo $record['item1'] ?></B><br/>
       <?php foreach ($record['brochure_item_1'] as $upload): ?>
          
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        
        <?php endforeach ?>  
      
       <?php foreach ($record['spec_sheet_for_item_1'] as $upload): ?>
          
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        
        <?php endforeach ?>    

        <?php foreach ($record['ies_files_for_item_1'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
        <?php foreach ($record['revit_files_for_item_1'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
        <?php foreach ($record['inst_sheet_for_item_1'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
         <?php foreach ($record['light_app_for_item_1'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
        
        <br/><br/>
        
        
      <B><?php echo $record['item2'] ?></B><br/>
      
        <?php foreach ($record['brochure_item_2'] as $upload): ?>
          
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        
        <?php endforeach ?>  
      
       <?php foreach ($record['spec_sheet_for_item_2'] as $upload): ?>
          
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        
        <?php endforeach ?>    

        <?php foreach ($record['ies_files_for_item_2'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
        <?php foreach ($record['revit_files_for_item_2'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
        <?php foreach ($record['inst_sheet_for_item_2'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
         <?php foreach ($record['light_app_for_item_2'] as $upload): ?>
            <a href="<?php echo $upload['urlPath'] ?>"><?php echo $upload['info1'] ?></a><br/>

        <?php endforeach ?>
        
        <br/><br />
      
     
       </div>
</div>
<script type="text/javascript"> 
<!-- 
var CollapsiblePanel<?php echo $index; ?> = new Spry.Widget.CollapsiblePanel("CollapsiblePanel<?php echo $index; ?>",{contentIsOpen:false}); 
//--> 
</script> 

    
   </td>  
          <?php $maxCols=2; if (@++$count % $maxCols == 0): ?>       </tr><tr>      <?php endif ?>   
<?php endforeach ?>    
           </tr>
            </table>

    <?php if (!$downloadsRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  <!-- /STEP2: Display Records -->

  <br/></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table> <?php include("footer.php"); ?>
</body>
</html>
