<!--
function swapMe(img,state,isjpg) {
	var pre = "../images/";
	isjpg ? ext=".jpg" : ext=".gif";
	state ? pre+="on_" : pre+="off_";
	document.images[img].src = pre + img + ext;
}

//General function for creating a layer/div
function makeLay(name,wth,hgt,x,y,z,vis,content) {
	if (document.layers) {
		vis==1 ? vis='show' : vis='hide';
		document.write('<layer width='+wth+' height='+hgt+' name="'+name+'" z-index='+z+' visibility="'+vis+'">'+content+'</layer>');
	} else {
		vis==1 ? vis='visible' : vis='hidden';
		document.write('<div id="'+name+'" style="width:'+wth+';height:'+hgt+';left:'+x+';top:'+y+';z-index:'+z+';visibility:'+vis+';" >'+content+'<br /><br /><a href="http://thekitchen.org/auction2009/proxy.pdf">Place a proxy bid on this item</a></div>');
	}
}

//General function for writing to a div/layer
function writeLay(name,content) {
	if (document.layers) {
		document.layers[name].document.open();
		document.layers[name].document.write(content);
		document.layers[name].document.write(content);
	} else if (document.getElementById) {
		document.getElementById(name).innerHTML = content;
	} else {
		document.all[name].innerHTML = content;
	}
}

var imgs = new Array(); //holds all the info per image
var linecount = 0; //counts number of images to know when to drop br

//see below for info
function addImage(filename, line1, line2, line3, line4, line5, line6, line7, line8) {
	var i = imgs.length;
	imgs[i] = new Array();
	imgs[i].filename = filename;
	imgs[i].line1 = line1;
	imgs[i].line2 = line2;
	imgs[i].line3 = line3;
	imgs[i].line4 = line4;
	imgs[i].line5 = line5;
	imgs[i].line6 = line6;
	imgs[i].line7 = line7;
	imgs[i].line8 = line8;
	var out = '<a href="#artwork" onClick="loadImage('+i+')" ><img src="thumbs/t_'+filename+'.jpg" vspace="5" hspace="5" border="0" /></a>';
	
	linecount++;
	if (linecount == 4) {
		out += '<br />';
		linecount=0;
	}
	document.write(out);
}

//see below for info
function addImage2(filename, line1, line2, line3, line4, line5, line6, line7, line8) {
	var i = imgs.length;
	imgs[i] = new Array();
	imgs[i].filename = filename;
	imgs[i].line1 = line1;
	imgs[i].line2 = line2;
	imgs[i].line3 = line3;
	imgs[i].line4 = line4;
	imgs[i].line5 = line5;
	imgs[i].line6 = line6;
	imgs[i].line7 = line7;
	imgs[i].line8 = line8;
	var out = '<a href="#artwork" onClick="loadImage('+i+')">'+line1+' <br />';
	document.write(out);
}

function loadImage(index) {
	var out = '<img src="big/'+imgs[index].filename+'.jpg" border="0" alt ="" /><br /><br />';
	out = out + imgs[index].line1+'<br />'+imgs[index].line2+'<br />'+imgs[index].line3+'<br />'+imgs[index].line4+'<br />'+imgs[index].line5+'<br />'+imgs[index].line6+'<br />'+imgs[index].line7+'<br />'+imgs[index].line8+'<br /><br /><a href="http://thekitchen.org/auction2009/proxy.pdf">Place a proxy bid on this item</a>';
	writeLay('display',out);
}
//-->
