<?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 "/homepages/19/d122429285/htdocs/agna/NewSite2010/cmsAdmin/lib/viewer_functions.php";

  list($calgaryRecords, $calgaryMetaData) = getRecords(array(
    'tableName'   => 'calgary',
  ));
  
  list($_incoming_mailRecords,$_incoming_mailMetaData)=getRecords(array(  
  'tableName'   =>  '_incoming_mail',  
  'where'       =>  "`to` LIKE 'Calgary@%'", 
  'debugSql'    => false, 
));
  
?> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <meta name="description" content="AGNA" />
  <meta name="keywords" content="Alberta,Gerontological,Nurses,Association,Calgary" />
  <meta name="author" content="AGNA" >
  <link rel="stylesheet" type="text/css" media="screen,projection" href="./css/style_screen.css" />
  <link rel="stylesheet" type="text/css" media="print" href="./css/style_print.css" />
  <link rel="stylesheet" type="text/css" media="screen" href="./css/anylinkcssmenu.css" />
  <title>Alberta Gerontological Nurses Association - Calgary Chapter</title>
  <style type="text/css">
<!--
.style1 {
	color: #009900;
	font-weight: bold;
}
-->
  </style>
 <style type="text/css">

#marqueecontainer{
position: relative;
width: 140px; /*marquee width */
height: 130px; /*marquee height */
background-color: white;
overflow: hidden;
border: 1px solid green;
padding: 2px;
padding-left: 4px;
}

</style>

<script type="text/javascript">

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee


</script> 
</head>

<body>
  <div class="page-container-1">

  	<!-- HEADER -->
		
    <!-- Navigation Level 1 -->
    
    <!-- Sitename -->
		<!-- Site slogan -->
        <!-- Header banner -->
<div><img class="img-header" src="./img/header.jpg" alt=""/></div>	
 <?php include("include_top_left_menus.php"); ?>   
    				
						
  	<!-- CONTENT -->
		<div class="content1">

  	  <!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
    
    <?php foreach ($calgaryRecords as $record): ?>
      
      <?php echo $record['content'] ?><br/>
         
    <?php endforeach ?>

    <?php if (!$calgaryRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
	
	<?php foreach ($_incoming_mailRecords as $record): ?>
      
      <?php echo $_incoming_mailRecord['subject'] ?><br/>
      <?php echo $_incoming_mailRecord['text'] ?><br/>
      <?php echo $_incoming_mailRecord['html'] ?><br/>
       
    <?php endforeach ?>
	<!-- STEP 2a: Display Uploads for field 'attachments' (Paste this anywhere inside STEP2 to display uploads) -->
        <!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
        <?php if(is_array($_incoming_mailRecord['attachments'])): ?>
		<?php foreach ($_incoming_mailRecord['attachments'] as $upload): ?>
          <?php if ($upload['hasThumbnail']): ?>
            <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

          <?php elseif ($upload['isImage']): ?>
            <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

          <?php else: ?>
            <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

          <?php endif ?>
        <?php endforeach ?>
		<?php endif ?>
      <!-- STEP2a: /Display Uploads -->
	  
    <hr/>
    <?php if (!$_incoming_mailRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>
  
	
  <!-- /STEP2: Display Records -->

	</div>  
<?php include("include_sidebar_footer.php"); ?>
			
</div>    
</body>
</html>