<?php require_once('Connections/toftejendomme.php'); ?>
<?php
// Load the tNG classes
require_once('includes/tng/tNG.inc.php');

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_toftejendomme, $toftejendomme);
$query_rsBilleder = "SELECT * FROM billeder2 ORDER BY id DESC";
$rsBilleder = mysql_query($query_rsBilleder, $toftejendomme) or die(mysql_error());
$row_rsBilleder = mysql_fetch_assoc($rsBilleder);
$totalRows_rsBilleder = mysql_num_rows($rsBilleder);

// Show Dynamic Thumbnail
$objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1");
$objDynamicThumb1->setFolder("billeder/");
$objDynamicThumb1->setRenameRule("{rsBilleder.billede}");
$objDynamicThumb1->setResize(200, 0, true);
$objDynamicThumb1->setWatermark(false);
$objDynamicThumb1->setPopupSize(800, 600, true);
$objDynamicThumb1->setPopupNavigation(true);
$objDynamicThumb1->setPopupWatermark(false);
?><!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>Toft Ejendomme - Silkeborg</title>
<style type="text/css">
<!--
body {
	background-color: #E8E8E8;
}
a:link {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #531300;
}
-->
</style>
<script type="text/javascript">
<!--
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_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_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>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>

<body onload="MM_preloadImages('images/but_forside.gif','images/but_estrups.gif','images/but_bredgade.gif','images/but_ledige2.gif','images/but_billeder.gif','images/but_ledige.gif','images/but_lejrinfo2.gif','images/but_estrups2.gif','images/but_moellegade5_2.gif','images/but_drew18_2.gif','images/but_steen2.gif','images/but_toldbod23_2.gif','images/but_toldbod25_2.gif','images/but_skole38_2.gif','images/but_valdemar17_2.gif','images/but_valdemar19_2.gif','images/but_valdemar21_2.gif','images/but_sanatorie_2.gif','images/but_bredgade_2.gif','http://gamle.toftejendomme.dk/billeder.php','images/but_aktuelt2.gif','images/but_drew44_2.gif','images/but_drew46_2.gif','images/but_indeklima2.gif')">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="stroke">
  <tr>
    <td><img src="images/header.jpg" /></td>
  </tr>
  <tr>
    <td background="images/back.gif"><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="5" valign="top">&nbsp;</td>
        <td valign="top">&nbsp;</td>
        <td>&nbsp;</td>
        <td valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td width="8" valign="top">&nbsp;</td>
        <td width="180" valign="top"><ul class="menuul">
          <li><a class="menulink" href="http://gamle.toftejendomme.dk">Forsiden</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/ledigelejemaal.php">Ledige lejemål</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/lejeinfo.php">Lejeinfo</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/soendergade34.html">Søndergade 34</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/estrupsgade20.html">Estrupsgade 20</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/moellegade5.html">Møllegade 5</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/drewsensvej18.html">Drewsensvej 18</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/drewsensvej44.html">Drewsensvej 44</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/drewsensvej46.html">Drewsensvej 46</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/steenblichersgade5.html">Steen Blichersgade 5</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/toldbodgade23.html">Toldbodgade 23</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/toldbodgade25.html">Toldbodgade 25</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/skolegade38.html">Skolegade 38</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/valdemarsgade17.html">Valdemarsgade 17</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/valdemarsgade19.html">Valdemarsgade 19</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/valdemarsgade21.html">Valdemarsgade 21</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/sanatorievej19.html">Sanatorievej 19</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/bredgade14.html">Bredgade 14</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/richtersvej24.html">Richtersvej 24</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/billeder.php">Indendørs galleri</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/indeklima.html">Indeklima</a></li>
          <li><a class="menulink" href="http://gamle.toftejendomme.dk/aktuelt.php">Aktuelt</a></li>
        </ul></td>
        <td width="5">&nbsp;</td>
        <td valign="top"><table width="398" height="402" border="0" align="center" cellpadding="0" cellspacing="0" background="images/boxback_main.gif">
          <tr>
            <td><img src="images/h_billeder.jpg" width="545" height="62" /></td>
          </tr>
          <tr>
            <td height="368" valign="top" class="td"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td class="bodyHeader"><div align="center"><span class="body">Herunder ses forskellige interiøbilleder fra nogle af vores udlejningsejendomme.</span></div></td>
              </tr>
              <tr>
                <td class="bodyHeader">&nbsp;</td>
              </tr>
              <tr>
                <td class="bodyHeader"><table width="100%" border="0">
                  <tr>
                    <?php
  do { // horizontal looper version 3
?>
                      <td><table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td><div align="center" class="body"><?php echo $row_rsBilleder['titel']; ?></div></td>
                          </tr>
                          <tr>
                            <td><div align="center"><a href="<?php echo $objDynamicThumb1->getPopupLink(); ?>" onclick="<?php echo $objDynamicThumb1->getPopupAction(); ?>" target="_blank"><img src="images/spacer.gif" width="1" height="7" border="0" /><br />
                              <img src="<?php echo $objDynamicThumb1->Execute(); ?>" border="0" class="stroke" /></a><br />
                              <span class="body"><?php echo $row_rsBilleder['beskrivelse']; ?></span><br />
                              <br />
                              <a href="<?php echo $objDynamicThumb1->getPopupLink(); ?>" onclick="<?php echo $objDynamicThumb1->getPopupAction(); ?>" target="_blank"><img src="images/spacer.gif" width="1" height="7" border="0" /></a><br />
                            </div></td>
                          </tr>
                      </table></td>
                      <?php
    $row_rsBilleder = mysql_fetch_assoc($rsBilleder);
    if (!isset($nested_rsBilleder)) {
      $nested_rsBilleder= 1;
    }
    if (isset($row_rsBilleder) && is_array($row_rsBilleder) && $nested_rsBilleder++ % 2==0) {
      echo "</tr><tr>";
    }
  } while ($row_rsBilleder); //end horizontal looper version 3
?>
                  </tr>
                </table>
<br /></td>
              </tr>
              
            </table>
              </td>
          </tr>
          
        </table></td>
      </tr>
      <tr>
        <td valign="top">&nbsp;</td>
        <td valign="top">&nbsp;</td>
        <td>&nbsp;</td>
        <td valign="top">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="40" background="images/bottom.gif" class="copyright"><div align="center">Ladelundsvej 40  · 8600 Silkeborg · Email: <a href="mailto:info@toftejendomme.dk" class="copyright">info@toftejendomme.dk</a><br />
    Copyright 2007 · Toft Ejendomme · Designet af: <a href="http://www.renesejling.dk" target="_blank" class="copyright">René Sejling</a></div></td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($rsBilleder);
?>