It's really simple to do this using jQuery. When the user clicks on an <img> tag, you'll have access to this inside the callback function. Simply take $(this).attr('src') and set the source of $('#main-photo') to it like so:
$('img').click(function(){
$('#main-photo').attr('src', $(this).attr('src'));
});
-
It looks like in your code, you're using .main-photo img, which should also work. I'm looking at it more now.
-
EDIT, after reviewing your code, you seem to have many missing </a>s along with other errors. Here is an updated and working version (minus the CSS and extra javascript):
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.slider-large-image a img').click(function() {
$('img#mainphoto').attr('src, $(this).attr('src'));
});
});
</script>
<div id="wrapper">
<div class="main-photo"><img id="mainphoto" src="" /></div>
<div class="main-slider">
<div class="window">
<ul class="slider-large-image">
<li><a href=""><img src="http://images.sneakhype.com/wp-content/uploads/2010/12/Miley-Cyrus-300x200.jpg" /></a></li>
<li><a href=""><img src="http://wa2.www.3news.co.nz/Portals/0-Articles/185340/miley-cyrus_reuters_420.jpg?width=300" /></a></li>
<li><a href=""><img src="http://cdn.buzznet.com/media/jjr/headlines/2009/03/miley-cyrus-ryan-seacrest.jpg" /></a></li>
<li><a href=""><img src="http://images.smh.com.au/2010/12/29/2112265/miley_cyrus_400-300x200.jpg" /></a></li>
</ul>
</div>
<div class="slider-pager"><a href="#" id="b">‹</a><a href="#" id="f">›</a></div>
</div>
<br class="cb" />
</div>