//globals



var pic = new Array();
//thirdwatch
pic[0] = new MakePic("/images/photos/carol/carol13.jpg","Jason Wiles & Me outside laundry on East 14 Street where the show was being taped (December, 2001)",0,0,1,1,5);
pic[1] = new MakePic("/images/photos/carol/carol14.jpg","Kim Raver outside laundry on East 14 Street (Dec., 2001)", "Carol Rashleger", "carojack1@cs.com",1,2,5);
pic[2] = new MakePic("/images/photos/carol/carol23.jpg","Skipp Sudduth outside laundry on East 14 Street (Dec., 2001)","Carol Rashleger", "carojack1@cs.com",1,3,5);
pic[3] = new MakePic("/images/photos/carol/carol33.jpg","Me & Skipp outside laundry on East 14 Street (Dec., 2001)",0,0,1,4,5);
pic[4] = new MakePic("/images/photos/carol/carol43.jpg","Me & Coby Bell outside laundry on East 14 Street (Dec., 2001)",0,0,1,5,5);
//derobertis pastry shop
pic[5] = new MakePic("/images/photos/carol/carol15.jpg","Me, Paul & Anne", "Bill Leicht", "whiteleicht@earthlink.net",2,1,4);
pic[6] = new MakePic("/images/photos/carol/carol24.jpg","Anne & Bill", "Paul Leicht", "thebard@outofthebrokensky.com",2,2,4);
pic[7] = new MakePic("/images/photos/carol/carol34.jpg","Anne, Paul & Me","Bill Leicht", "whiteleicht@earthlink.net",2,3,4);
pic[8] = new MakePic("/images/photos/carol/carol44.jpg","Anne, Me & Bill","Paul Leicht", "thebard@outofthebrokensky.com",2,4,4);
//buffy our cat
pic[9] = new MakePic("/images/photos/carol/carol16.jpg","Buffy in our hallway","Paul Leicht", "thebard@outofthebrokensky.com",3,1,5);
pic[10] = new MakePic("/images/photos/carol/carol25.jpg","Buffy in our hallway","Paul Leicht", "thebard@outofthebrokensky.com",3,2,5);
pic[11] = new MakePic("/images/photos/carol/carol36.jpg","Me & Buffy","Paul Leicht", "thebard@outofthebrokensky.com",3,3,5);
pic[12] = new MakePic("/images/photos/carol/carol45.jpg","Paul & Buffy", "Carol Rashleger", "carojack1@cs.com",3,4,5);
pic[13] = new MakePic("/images/photos/carol/carol46.jpg","Buffy in our hallway","Paul Leicht", "thebard@outofthebrokensky.com",3,5,5);
//other pics
pic[14] = new MakePic("/images/photos/carol/carol22.jpg","Me in Central Park in the early 1970's",0,0,4,1,4);
pic[15] = new MakePic("/images/photos/carol/carol32.jpg","Me in California in the early 1970's",0,0,4,2,4);
pic[16] = new MakePic("/images/photos/carol/carol42.jpg","Bobby Sherman & Me outside Astor Towers Hotel in Chicago (December 27, 1969)",0,0,4,3,4);
pic[17] = new MakePic("/images/photos/carol/carol12.jpg","Eddie Brigati, Me & Felix Cavaliere of The Rascals inside Atlantic Studios (October 15, 1968)",0,0,4,4,4);

//jackson browne
pic[18] = new MakePic("/images/photos/carol/carol01.jpg","Jackson Browne at Washington Irving High School (October 1985)", "Carol Rashleger", "carojack1@cs.com",6,1,1);
//Days Of Our Lives Pics
pic[19] = new MakePic("/images/photos/carol/carolandwallykurth.jpg", "Carol posing with Wally Kurth in LA.",0,0,5,1,6);
pic[20] = new MakePic("/images/photos/carol/janeelliotandwallykurth.jpg","Jane Elliot (Angelica) and Wally Kurth (Justin Kiriakis) from <u>Days of our Lives</u>", "Carol Rashleger", "carojack1@cs.com",5,2,6);
pic[21] = new MakePic("/images/photos/carol/johnaniston.jpg","John Aniston (Victor Kiriakis) from <u>Days of our Lives</u>","Carol Rashleger", "carojack1@cs.com",5,3,6);
pic[22] = new MakePic("/images/photos/carol/judievans.jpg","Judi Evans (Adrienne Kiriakis) from <u>Days of our Lives</u>","Carol Rashleger", "carojack1@cs.com",5,4,6);
pic[23] = new MakePic("/images/photos/carol/stevenichols.jpg","Steve Nichols (Patch) from <u>Days of our Lives</u>","Carol Rashleger", "carojack1@cs.com",5,5,6);
pic[24] = new MakePic("/images/photos/carol/wallykurth.jpg", " Wally Kurth from <u>Days of our Lives</u>","Carol Rashleger", "carojack1@cs.com",5,6,6);

var picHash = new Array();
for (var p = 0; p < pic.length;p++)
{
	
	var hash = "g"+ pic[p].g + "o" + pic[p].o;
	picHash[hash] = pic[p];
}



//functions

function expandPic(id)
{
	document.getElementById("photoLarge").innerHTML = picHash[id].u;
	document.getElementById("caption").innerHTML = picHash[id].c;
	if(picHash[id].w)
	{
		document.getElementById("who").innerHTML = picHash[id].w;
	}
	else
	{
		document.getElementById("who").innerHTML = "";
	}
}


function swap(grp)
{
	var s = "";
	var oc = "";
	var id= "";
	var image="";	
	
	var size = picHash["g"+grp+"o1"].z;
	for(var i = 1; i <= size;i++)	
	{
		id = "g" + picHash["g"+grp+"o" + i].g + "o" + picHash["g"+grp+"o" + i].o;
		oc = "onClick=\"expandPic('"+id+"')\"";
		image = "/imgman/genimage.aspx?mode=Thumb&width=90&height=90&path=" + picHash[id].p;
		s += "<span class='imgWrap' id='"+id+"' "+oc+"><img src='"+image+"' alt='"+picHash[id].c+"' height='90px'></span>";
	}
	document.getElementById("thumbs").innerHTML= s;
}
function loadThumbs(num)
{
	var s = "";
	var oc = "";
	var id= "";
	var image="";
	for (var i = 1; i < 6;i++)
	{
		id = "g" + picHash["g1o" + i].g + "o" + picHash["g1o" + i].o;
		oc = "onClick=\"expandPic('"+id+"')\"";
		image = "/imgman/genimage.aspx?mode=Thumb&width=90&height=90&path=" + picHash[id].p;
		s += "<span class='imgWrap' id='"+id+"' "+oc+"><img src='"+image+"' alt='"+picHash[id].c+"' height='90px'></span>";
	}
	document.getElementById("thumbs").innerHTML= s;
}
function MakePic(url, caption,who,email, group,order, size)
{
	var p;
	var u;
	var c;
	var w;
	var e;
	var g;
	var o;
	var z;
	this.p = url;
	this.u = "<p align='center'><img src='"+url+"' alt='"+caption+"'></p>";
	this.c = caption;
	if (who)
	{
		if (email)
		{
			this.w ="Photographer: <a href='mailto:"+email+"'>"+who+"</a>"
		}
		else
		{
			this.w ="Photographer: "+who;
		}
	}
	else	
	{
		this.w = 0;
	}
	if(group) this.g = group;
	if(order) this.o = order;
	if(size) this.z = size;
}

function debug (string)
{
	var p = window.open("blah", "blah","toolbar=0,title=0,location=0,directories=0,status=0,menubar=0,scrollbars,copyhistory=0,width=100 height=600");
	p.document.open();
	p.document.write("<pre>"+ string+"</pre>");
	p.document.close();
}