// JavaScript Fnctions for www.bemarchitect.com
// bemarchitect.js
// Created by: Richard Kuhnel 2006-11-21

// Pop up larger version of thumbnail photos

var photos= new Array()
photos["parkcottages_0"]="Images/mfparklphsp01.jpg"
photos["parkcottages_1"]="Images/mfparklphsp02.jpg"
photos["parkcottages_2"]="Images/mfparklphsp03.jpg"
photos["parkcottages_3"]="Images/mfparklphh01.jpg"
photos["parkcottages_4"]="Images/mfparklphc01.jpg"
photos["parkcottages_5"]="Images/mfparklphc02.jpg"
photos["parkcottages_6"]="Images/mfparklphc03.jpg"
photos["parkcottages_7"]="Images/mfparklphc04.jpg"
photos["parkcottages_8"]="Images/mfparklphc05.jpg"

photos["greenlaneslide_0"]="Images/greenlaneslide02.jpg"
photos["greenlaneslide_1"]="Images/greenlaneslide03.jpg"
photos["greenlaneslide_2"]="Images/greenlaneslide01.jpg"
photos["greenlaneslide_3"]="Images/greenlaneslide06.jpg"
photos["greenlaneslide_4"]="Images/greenlaneslide07.jpg"
photos["greenlaneslide_5"]="Images/greenlaneslide08.jpg"
photos["greenlaneslide_6"]="Images/greenlaneslide05.jpg"
photos["greenlaneslide_7"]="Images/greenlaneslide04.jpg"

photos["faswallslide_0"]="Images/faswallslide01.jpg"
photos["faswallslide_1"]="Images/faswallslide02.jpg"
photos["faswallslide_2"]="Images/faswallslide03.jpg"
photos["faswallslide_3"]="Images/faswallslide04.jpg"
photos["faswallslide_4"]="Images/faswallslide05.jpg"
photos["faswallslide_5"]="Images/faswallslide06.jpg"
photos["faswallslide_6"]="Images/faswallslide07.jpg"
photos["faswallslide_7"]="Images/faswallslide08.jpg"
photos["faswallslide_8"]="Images/faswallslide09.jpg"
photos["faswallslide_9"]="Images/faswallslide10.jpg"
photos["faswallslide_10"]="Images/faswallslide11.jpg"
photos["faswallslide_11"]="Images/faswallslide12.jpg"
photos["faswallslide_12"]="Images/faswallslide13.jpg"
photos["faswallslide_13"]="Images/faswallslide14.jpg"
photos["faswallslide_14"]="Images/faswallslide15.jpg"
photos["faswallslide_15"]="Images/faswallslide16.jpg"
photos["faswallslide_16"]="Images/faswallslide17.jpg"
photos["faswallslide_17"]="Images/faswallslide18.jpg"
photos["faswallslide_18"]="Images/faswallslide19.jpg"
photos["faswallslide_19"]="Images/faswallslide20.jpg"
photos["faswallslide_20"]="Images/faswallslide21.jpg"
photos["faswallslide_21"]="Images/faswallslide22.jpg"
photos["faswallslide_22"]="Images/faswallslide23.jpg"
photos["faswallslide_23"]="Images/faswallslide24.jpg"
photos["faswallslide_24"]="Images/faswallslide25.jpg"
photos["faswallslide_25"]="Images/faswallslide26.jpg"
photos["faswallslide_26"]="Images/faswallslide27.jpg"


var captions=new Array()
captions["parkcottages_0"]="Park Cottages, Spruce St., photo 1"
captions["parkcottages_1"]="Park Cottages, Spruce St., photo 2"
captions["parkcottages_2"]="Park Cottages, Spruce St., photo 3"
captions["parkcottages_3"]="Park Cottages, Hickory St., photo 1"
captions["parkcottages_4"]="Park Cottages, court, photo 1"
captions["parkcottages_5"]="Park Cottages, court, photo 2"
captions["parkcottages_6"]="Park Cottages, court, photo 3"
captions["parkcottages_7"]="Park Cottages, court, photo 4"
captions["parkcottages_8"]="Park Cottages, aerial photo"

captions["greenlaneslide_0"]="Community Site Master Plan"
captions["greenlaneslide_1"]="Phase One Housing Court Cluster. Phase one Cluster accessed off of existing road"
captions["greenlaneslide_2"]="Housing Court Cluster Plan. Court Cluster of 6 Houses consisting of 2 detached units , 2 townhouse units, and 2 in a Duplex"
captions["greenlaneslide_3"]="Floor Plan Concept of Duplex and Townhouse"
captions["greenlaneslide_4"]="Floor Plan Concept of Detached Unit"
captions["greenlaneslide_5"]="Floor Plan Concept of Duplex with lower level option "
captions["greenlaneslide_6"]="Entry Elevation Concept of Detailed Unit (upper sketch). Entry Elevation Concept of Duplex Units (lower sketch) "
captions["greenlaneslide_7"]="Entry Elevation Concepts of Townhouse Units"

captions["faswallslide_0"]=""
captions["faswallslide_1"]=""
captions["faswallslide_2"]=""
captions["faswallslide_3"]=""
captions["faswallslide_4"]=""
captions["faswallslide_5"]=""
captions["faswallslide_6"]=""
captions["faswallslide_7"]=""
captions["faswallslide_8"]=""
captions["faswallslide_9"]=""
captions["faswallslide_10"]=""
captions["faswallslide_11"]=""
captions["faswallslide_12"]=""
captions["faswallslide_13"]=""
captions["faswallslide_14"]=""
captions["faswallslide_15"]=""
captions["faswallslide_16"]=""
captions["faswallslide_17"]=""
captions["faswallslide_18"]=""
captions["faswallslide_19"]=""
captions["faswallslide_20"]=""
captions["faswallslide_21"]=""
captions["faswallslide_22"]=""
captions["faswallslide_23"]=""
captions["faswallslide_24"]=""
captions["faswallslide_25"]=""
captions["faswallslide_26"]=""



function pop_photo(document_url,photo_url,photo_window_specs,page_name,photo_number)
{
 caption=captions[page_name+'_'+photo_number]
 photo=photos[page_name+'_'+photo_number]
 
 if(photo_window_specs == '')
 {	
	photo_window_specs="directories=no,fullscreen=no,height=500,left=330,location=no,menubar=no,"+
 	"resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no,top=100,width=600"
 }

 photo_window = window.open
	(document_url,
	 "Full_sized_photo",
	 photo_window_specs
	) 
  
 photo_window.document.writeln(
  '<html><head><title>'+'Full_sized_photo'+
  '</title><link rel="stylesheet" type="text/css" href="styles.css">'+
  '<script defer="defer" type="text/javascript" src="bemarchitect.js?version=1.02"><!-- //--></script></head>'+
  '<body id="full_size_photo" onBlur="self.focus()" onload="hide(\''+page_name+'\','+photo_number+')">'+
  '<div class="regulartext" style="text-align:center">'+
  '<table align="center"><tr>'+
  '<td style="width:200;text-align:center"><input id="previous" style="width:100;text-align:center" type="button"'+ 
  'value="<<<Previous" '+
  'onclick="previous(\''+document_url+'\',\''+photo_url+'\',\''+photo_window_specs+
  '\',\''+page_name+'\','+photo_number+')'+'"></td>'+
  '<td style="width:200;text-align:center"><input style="width:100;text-align:center" type="button" value="Close Window" '+
  'onclick="self.close()"></td>'+
  '<td style="width:200;text-align:center"><input id="next" style="width:100;text-align:center" type="button" value="Next>>>" '+
  'onclick="next(\''+document_url+'\',\''+photo_url+'\',\''+photo_window_specs+
  '\',\''+page_name+'\','+photo_number+')'+'"></td>'+ 
  '</tr></table>'+
  '<br /><br />'+
  '<img style="margin-top:5px;" border="0" src="'+photo+ 
  '" alt="'+caption+
  '"><br /><br />'+caption+
  '</div></body></html>'
   )
 photo_window.document.close()
}

 function next(document_url,photo_url,photo_window_specs,page_name,photo_number)
{
  check_next_photo=photo_number+1
  photo=photos[page_name+'_'+check_next_photo]
  if (photo)
  {
  	  photo_number=photo_number+1
  }
  photo_url=photos[page_name+'_'+photo_number]
  pop_photo(document_url,photo_url,photo_window_specs,page_name,photo_number)
}

 function previous(document_url,photo_url,photo_window_specs,page_name,photo_number)
{
  check_next_photo=photo_number-1
  photo=photos[page_name+'_'+check_next_photo]
  if (photo)
  {
   	  photo_number=photo_number-1
  }
  photo_url=photos[page_name+'_'+photo_number]
  pop_photo(document_url,photo_url,photo_window_specs,page_name,photo_number)
}

function hide(page_name,photo_number)
{
  
  check_next_photo=photo_number+1
  
  photo=photos[page_name+'_'+check_next_photo]
if (photo)
  {
 	  document.getElementById("next").style.display="inline"
  }
  else
  {
	  document.getElementById("next").style.display="none"
  }
  check_next_photo=photo_number-1
  
  photo=photos[page_name+'_'+check_next_photo]
if (photo)
  {
   	  document.getElementById("previous").style.display="inline"
  }
  else
  {
	  document.getElementById("previous").style.display="none"
  }		
}

