<HTML>
<TITLE>Sloane Weymouth Cassileth</TITLE> 
<A NAME="top">	
<HEAD>

<STYLE TYPE="text/css" MEDIA=screen>
<!--

	a.hoverme:link, a.hoverme:visited
	{
		text-decoration : none;
		color: black;
	}
	
	a.hoverme:hover
	{	
		color : #003399;
		text-decoration : underline;
	}

-->
</STYLE>
		
<?php
	include "/home/casshcom/public_html/common/datediff.php";
?>

</HEAD>
	<BODY bgcolor=#FAEBD7 >

	<TABLE WIDTH=750 CELLPADDING=0 CELLSPACING=0>
		<TR VALIGN=TOP BGCOLOR=#E9967A>
			<TD COLSPAN=2 STYLE="background: #E9967A ">
				<CENTER>
					<div Style="margin-bottom: 0px; padding-top: 8px; padding-bottom: 8px; verical-align: middle;">
							<span STYLE="font-size: 16pt; letter-spacing: 0.45em; color:white">
								Sloane Weymouth Cassileth<BR>	
							</span>
							<span STYLE="font-size: 10pt; letter-spacing: 0.1em; color:white">
								&middot; born June 20, 2006 at 3:26 am &middot; seven pounds, eleven ounces &middot; 20.5 inches long &middot; <BR>
							</span>
						
							<span STYLE="vertical-align: middle; font-size: 10pt; letter-spacing: 0.1em; color:white; color:yellow;">
								TODAY:
							<span STYLE="color:white;">
								<?php echo kids_age("Sloane", "6-20-2006") ?>
							</span>
					</div>
				</CENTER>
			</TD>
		</TR>
		<TR VALIGN=TOP>
			<TD COLSPAN=2 >
			</TD>
		</TR>
		<TR VALIGN=TOP>
			<TD WIDTH=150 VAlign=Top>

				
<?php
	$kid = "sloane";
	include $kid."_navs.php";
?>

			</TD>

<?php

	$w = 60; // thumbnail width
	$h = 45; // thumbnail height
	$curdir = getcwd();
	$cur_month = substr($curdir, -2);  // get month number
	
	if ($cur_month > 5)
	{
		$w = 68; // new camera, change thumbnail width!
			//	echo "<TD ALIGN=CENTER WIDTH=680>";

	}
	else
	{
		// echo "<TD ALIGN=CENTER WIDTH=680>";	
	}

	$td_w = $w * 10;
	echo "<TD ALIGN=CENTER WIDTH=$td_w>";
	

	if ($curdir != "/home/casshcom/public_html/$kid")
	{
		$imagesArray = array();  // init array to hold images for swapping
		$i = 0;  // init array counter

		$handle = fopen ("imgs.dat", "r");
		
		$title = fgets($handle);
		echo "<SPAN STYLE='font-size:16pt; font-family: Century Gothic, sans-serif;'>$title</span><br>";
		
		while (!feof ($handle)) 
		{
		    $buffer = fgets($handle);
		    
			if ($buffer != "")
			{	    
				$buffer = trim($buffer);
				list($fname,$caption) = explode("\t",$buffer);
				
				list($f, $ext) = explode(".", $fname);

			    if ($ext == "wmv")  // last 3 chars are "wmv" means it's a movie
			    {
			    	$imagesArray["wmv"][$i] = " <a href='/$kid/movies/$fname'>";  // anchor link tag for movie
			    	$imagesArray["end"][$i] = "</a>";  // end for the href tag
			    	$fname = "/$kid/movies/".$f.".jpg";  // add jpg

			    }

		    	$imagesArray["src"][$i] = $fname;
				$imagesArray["alt"][$i] = $caption;

				$i++;  // increment array counter

			}
		}

		$useImage=0; // set default image value (equal to array index number)
		if(isset($_REQUEST))
		{
			while(list($key,$val)=each($_REQUEST))
			{
				if(strstr($key,"_img_x"))
				{
					$useImage=str_replace("_img_x","",$key);
					break;
				}
			}
		}
		
?>

	<form method="post" action="<?=$_SERVER["PHP_SELF"]?>" id="imageSwapperForm" onsubmit="return false" >
	<div Style="text-align: left; ">

<?php

	for ($i=0; $i < count($imagesArray["src"]); $i++)
	{
		echo '<input type="image" width='.$w.' height='.$h.' name="'.$i.'_img" value="'.$i.'_img" src="'.$imagesArray["src"][$i].'" alt="'.$imagesArray["alt"][$i].'" onclick="document.getElementById(\'img\').src=this.src; document.getElementById(\'img\').alt=this.alt; document.getElementById(\'caption\').innerHTML=this.alt" />';
		echo '&nbsp;&nbsp;';
	}
?>

	</div>

<p><?php echo $imagesArray["wmv"][$useImage] ?><img id="img" src="<?=$imagesArray["src"][$useImage]?>" border="0" alt="<?=$imagesArray["alt"][$useImage]?>" /><?php $imagesArray["end"][$useImage] ?></p>
<p id="caption" Style="font-size:12pt; font-family: Century Gothic, sans-serif;"><?php echo $imagesArray["alt"][$useImage] ?></p>
</form>


<?php
		echo "</DIV>";
	

?>
			</TD>
		</TR>
		<TR>
			<TD COLSPAN=2>
<?php
	}
	else
	{
?>
		<SPAN STYLE='font-size:16pt; font-family: Century Gothic, sans-serif;'>Click on the links at the left to see pictures!<br><br></SPAN><SPAN STYLE='font-size:12pt; font-family: Century Gothic, sans-serif;'>If you want higher-quality images for printing, please email <a href="mailto:greg@cassileth.com">greg@cassileth.com</a>.</span><br><br>
		<IMG SRC="first week/L1000090.JPG">

	
<?php	
	}
	

?>
			</TD>
		</TR>
	</TABLE>
</BODY>
</HTML>

