// Method for switching between thumbnails within layer or IFRAME
function thumbSwitch(t){
 if(document.layers){
  document.layers.thumbs.load(t,218);
  thumbPos();
 }
 else{
  e=document.getElementById('thumbs');
  alert('frame name=foo location='+foo.location);
  alert('frame id=thumbs location='+thumbs.location);
  alert('getElementById.src='+e.src);
  e.src=t;
 }
}

function findPos(d){
 if(d=='x'){r=((window.innerWidth-78)/2)+182;return r;}
 else{r=((window.innerHeight)/2)-220;return r;}
}

// Method to reposition NS thumbs
function thumbPos(){
 document.layers.thumbs.moveToAbsolute(findPos('x'),findPos('y'));
}

// Resizes thumbs when NS resizes
if(document.layers)onresize=thumbPos;

// Thumbnail layer for Netscape
function writeLayer(t){
 if(document.layers){
  document.write('<layer width="218" height="355" clip="218,355" left="'+findPos('x')+'" top="'+findPos('y')+'" src="'+t+'" id="thumbs"></layer>');
 }
}

// Main document generation
function writeChunk(n){

 if(n==1){
  document.write('<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><tr><td width="70" background="../img/pattern_sidebar.gif"><a href="../index.html"><img src="../img/sidebar1.gif" width="70" height="506" border="0"></a></td><td width="100%" background="../img/pattern_sidebar2.gif"><table width="100%" height="536" cellpadding="0" cellspacing="0" border="0"><tr><td width="100%" height="" align="center" background="../img/sidebar2.gif"><table width="674" cellpadding="0" cellspacing=0" border="0"><tr><td width="448" height="468" background="../img/photo_window.gif" colspan="3" rowspan="3" align="center" valign="middle"><span class="photo">');
 }
 else if(n==2){
  document.write('</span></td><td width="225" height="32" background="../img/px.gif"><img src="../img/px.gif"></td><td width="1" height="32" background="../img/px.gif"><img src="../img/px.gif"></td></tr><tr><td width="225" height="403" background="../img/thumbnail_window.gif" align="center" valign="middle">');
 }
 else if(n==3){
  document.write('</td><td width="1" height="403" background="../img/px.gif"><img src="../img/px.gif"></td></tr><tr><td width="225" height="32" background="../img/px.gif" rowspan="2" align="left" valign="middle"><a href="mailto:jim@newberryphotography.com"><img src="../img/contact1.gif" hspace="9" width="184" height="9" border="0"></a><br><img src="../img/contact2.gif" hspace="9" width="184" height="37" border="0"></td><td width="1" height="32" background="../img/px.gif"><img src="../img/px.gif"></td></tr>');
 }
 else if(n==4){
  document.write('<tr><td width="19" height="63" background="../img/px.gif"><img src="../img/px.gif"></td><td width="410 height="63" background="../img/links_window.gif" align="center"><a href="music.html" onmouseover=rollOver("music",1) onmouseout=rollOut("music",1)><img hspace="6" border="0" src="../img/link_music.gif" id="music" name="music"></a><a href="people.html" onmouseover=rollOver("people",1) onmouseout=rollOut("people",1)><img hspace="6" border="0" src="../img/link_people.gif" id="people" name="people"></a><a href="documentary.html" onmouseover=rollOver("documentary",1) onmouseout=rollOut("documentary",1)><img hspace="6" border="0" src="../img/link_documentary.gif" id="documentary" name="documentary"></a><a href="tearsheets.html" onmouseover=rollOver("tearsheets",1) onmouseout=rollOut("tearsheets",1)><img hspace="6" border="0" src="../img/link_tearsheets.gif" id="tearsheets" name="tearsheets"></a><a href="panoramic.html" onmouseover=rollOver("pano",1) onmouseout=rollOut("pano",1)><img hspace="6" border="0" src="../img/link_pano.gif" id="pano" name="pano"></a>');
 }
 else if(n==5){
  document.write('<a href="../info.html" onmouseover=rollOver("info",1) onmouseout=rollOut("info",1)><img hspace="6" border="0" src="../img/link_info.gif" id="info" name="info"></a></td><td width="19" height="63" background="../img/px.gif"><img src="../img/px.gif"></td><td width="1" height="63" background="../img/px.gif"><img src="../img/px.gif"></td></tr></table></td></tr></table></td></tr></table>');
 }
}