// JavaScript Document

var descr=new Array()
var title=new Array()
var catalog=new Array()

//PICS IN CATALOG
//catalog[1000] = "Catalog Title"
//title[catalog number times 1000 + image number] = "Image Title (no html)"
//descr[catalog number times 1000 + image number] = "Image Description (html ok)"

catalog[1000] = "Exposed"

title[1000+100] = "No Title Yet"
descr[1000+100] = ""

title[1000+101] = "No Title Yet"
descr[1000+101] = ""

title[1000+102] = "No Title Yet"
descr[1000+102] = ""

title[1000+103] = "No Title Yet"
descr[1000+103] = ""

title[1000+104] = "On Broadway"
descr[1000+104] = "NYC 1972<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+105] = "Portrait of the Artist"
descr[1000+105] = "7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+106] = "Statue of Liberty at Sunset"
descr[1000+106] = "7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+107] = "Statue of Liberty Ferry"
descr[1000+107] = "NYC 1973<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+108] = "Battery Park"
descr[1000+108] = "NYC 1971<br>7.9 x 10 Black & White<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+109] = "Long Island"
descr[1000+109] = "NYC 1970<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+110] = "East 26th St."
descr[1000+110] = "NYC 1968<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+111] = "Long Beach"
descr[1000+111] = "NYC 1974<br>7.9 x 10 Tinted<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+112] = "Long Island"
descr[1000+112] = "NYC 1975<br>7.9 x 10 Black & White<br>Catalog; Exposed<br>Signed & Dated on Verso"

title[1000+113] = "No Title Yet"
descr[1000+113] = ""

title[1000+114] = "No Title Yet"
descr[1000+114] = ""

title[1000+115] = "No Title Yet"
descr[1000+115] = ""

title[1000+116] = "Series: Found"
descr[1000+116] = "West 170 St., NYC 1974<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+117] = "Coney Island"
descr[1000+117] = "NYC 1970<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+118] = "Sydney Australia"
descr[1000+118] = "1961<br>7.9 x 10 Black & White<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+119] = "France"
descr[1000+119] = "1971<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+120] = "Women's Lib"
descr[1000+120] = "Maine, 1972<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+121] = "Staten Island Ferry"
descr[1000+121] = "NY 1970<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+122] = "Home Plate"
descr[1000+122] = "Twin City, GA1982<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+123] = "Riverside Dr."
descr[1000+123] = "NYC 1974<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+124] = "New Jersey 1975"
descr[1000+124] = "7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+125] = "Big Louis' Last Ride"
descr[1000+125] = "W. 170 St., NYC 1971<br>7.9 x 10 Black & White<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+126] = "Cobwebs in the Chapel"
descr[1000+126] = "France, 1966<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+127] = "Our Elevator"
descr[1000+127] = "W. 170 St., NYC1977<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed & Dated on Verso"

title[1000+128] = "South Street Seaport"
descr[1000+128] = "NYC 1973<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed  & Dated on Verso"

title[1000+129] = "Found Kiss"
descr[1000+129] = "NYC 1979<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed  & Dated Verso"


//Shy Behind The Camera
//catalog[2000] = "Shy Behind The Camera"

//title[2129] = "Found Kiss"
//descr[2129] = "NYC 1979<br>7.9 x 10 Color<br>Catalog: Exposed<br>Signed  & Dated Verso"


// Provision for older IE browsers
if (!document.getElementById && document.all) { document.getElementById = new Function('id', 'return document.all[id]') }
	
function loadpic(number) {
	
	var thiscatalognum = Math.round(number/1000) * 1000;
	var imagenum = number;
	
	document.getElementById("mainpic").innerHTML = "<img src='catalogs/"+thiscatalognum+"/400/" + imagenum + ".png'>";
	//document.getElementById("mainpicdescr").innerHTML = "<div class='title'>" + title[imagenum] + "</div>" + descr[imagenum];	
}

function displaycatalog(catalognum) {
	
	var thishtml;
	
	thishtml = "<h3>Click an Image to View</h3>";
	thishtml = thishtml + "<div class='thumbnails'>";
	
	for (var i in title) {
		if (title[i] !== '') { 
			if (i>=catalognum) { 
				if (i<=(catalognum+1000)) { 
					thishtml = thishtml + " <div class='thumbnail'><img src='/catalogs/"+catalognum+"/50/"+i+".png' onclick='loadpic("+i+");' /></div> "; 
				}
			}
		}

	}
	
	thishtml = thishtml + "</div>";
	
	// Replace innerHTML with cataog
	document.getElementById("catalog").innerHTML = thishtml;
						
}


function ajaxGetHTML(url,id, header) {
	
	if (header !== '') { if (id !== '' ) { document.getElementById(id).innerHTML = "<span class='loading'>"+header+"...</span>"; } }
	var myConn = new XHConn();
	var fnWhenDone = function (oXML) { if ( id !== '' ) { document.getElementById(id).innerHTML = oXML.responseText; } };
	myConn.connect(url, "GET", "", fnWhenDone);
} 
