<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*
The name referenced by swapBigImg() and previewBigImgOver() needs to match one of the
names defined in this array. The order names are defined in this array does NOT matter.

The variable firstImage below references the image you want to appear on the page when it loads.
*/

var firstImage = "peaked_floor";

var pictures = {
	peaked_floor: {
		filename: "ca1-peaked-floor-full.jpg",
		description: "Peaked Floor [Room Constructions], 1967 18x24 in. Blueprint",
		preview_filename: "ca1-peaked-floor-pre.jpg"
	},
	earth_mound: {
		filename: "ca2-earth-mound-full.jpg",
		description: "Earth Mound for Kidney Shaped Swimming Pool [Earth Works], 1967 22x30 in. Pen on vellum",
		preview_filename: "ca2-earth-mound-pre.jpg"
	},
	modern_draperies: {
		filename: "ca3-modern-draperies-full.jpg",
		description: "Artist's Canvas to be arranged by Collector [Modern Draperies], 1967 3x12 ft. Artist's canvas",
		preview_filename: "ca3-modern-draperies-pre.jpg"
	},
	conc_waterfall: {
		filename: "ca13-conc-waterfall-full.jpg",
		description: "Concentric Waterfall, 1996 32x40 in. Pastel",
		preview_filename: "ca13-conc-waterfall-pre.jpg"
	},
	blood_money: {
		filename: "ca5-blood-money-full.jpg",
		description: "Blood Money, 1968 3x3 in. Artist's blood",
		preview_filename: "ca5-blood-money-pre.jpg"
	},
	moma_time_capsule: {
		filename: "ca6-moma-time-capsule-full.jpg",
		description: "Museum of Modern Art Time Capsule, 1968 2.25x10 in. Steel",
		preview_filename: "ca6-moma-time-capsule-pre.jpg"
	},
	nothing_is_revealed: {
		filename: "ca7-nothing-is-revealed-full.jpg",
		description: "Nothing is Revealed [Graffiti Stencil], 1968 9x12 in. Stencil card",
		preview_filename: "ca7-nothing-is-revealed-pre.jpg"
	},
	mirrored_contacts: {
		filename: "ca8-mirrored-contacts-full.jpg",
		description: "Mirrored Contacts [Personal Appearance Manipulation], 1968  18x24 in. Photo collage",
		preview_filename: "ca8-mirrored-contacts-pre.jpg"
	},
	stellated_moon: {
		filename: "ca9-stellated-moon-full.jpg",
		description: "Stellated Moon [Bad Ideas], 2008 22x30 in. Acrylic",
		preview_filename: "ca9-stellated-moon-pre.jpg"
	},
	joy_img: {
		filename: "ca10-joy-full.jpg",
		description: "Joy [Nuclear Project], 1994 48x34 in. Acrylic on black velvet",
		preview_filename: "ca10-joy-pre.jpg"
	},
	blasted_luna: {
		filename: "ca11-blasted-luna-full.jpg",
		description: "Blasted Luna Seas [Nuclear Project], 2004 22x30 in. Acrylic",
		preview_filename: "ca11-blasted-luna-pre.jpg"
	},
	art_works: {
		filename: "ca12-art-works-full.jpg",
		description: "Art Works [Sidewalk Plaque] 1968 5x8 in. Bronze",
		preview_filename: "ca12-art-works-pre.jpg"
	},
};

function preload() {
	if (document.images) {
		var p_cont = document.createElement("div");
		p_cont.style.display = "none";
		document.body.appendChild(p_cont);

		var a = preload.arguments;
		if (a.length > 0) {
			for (var i = 0, len = a.length;i < len;i++) {
				var img = document.createElement("img");
				img.src = a[i].toString();
				p_cont.appendChild(img);
			}
		}
		else {
			for (var pic in pictures) {
				var pic_obj = pictures[pic];

				var p_full = document.createElement("img");
				p_full.src = pic_obj.filename;
				p_cont.appendChild(p_full);

				var p_prev = document.createElement("img");
				p_prev.src = pic_obj.preview_filename;
				p_cont.appendChild(p_prev);
			}
		}
	}
}

function getElem(item) {
	if (document.getElementById) { // this is the way the standards work
		return document.getElementById(item);
	}
	else if(document.all) { // this is the way old msie versions work
		return document.all[item];
	}
	else if(document.layers) { // this is the way nn4 works
		return document.layers[item];
	}
}

var preview_timer;

function swapBigImg(pic) {
	var pic_data = pictures[pic];
	if (!pic_data) return;

	var img = getElem("picture_img");
	img.src = pic_data.filename.toString();
	//img.width = pic_data.width ? pic_data.width : null; //parseInt(pic_data.width);
	//img.height = pic_data.height ? pic_data.height : null; //parseInt(pic_data.height);
	img.alt = pic_data.description.toString();

	getElem("picture_desc").innerHTML = pic_data.description.toString();
	previewBigImgOut(true);
}

function previewBigImgOver(pic) {
	eval("var pic_data = pictures." + pic + ";");
	if (!pic_data) return;

	getElem("picture_preview_img").src = "../../gfx/spacer.gif";
	getElem("picture_preview_img").src = pic_data.preview_filename.toString();
	getElem("picture_preview").style.display = "block";

	clearTimeout(preview_timer);
}

function previewBigImgOut(no_timer) {
	if (no_timer)
		getElem("picture_preview").style.display = "none";
	else
		preview_timer = setTimeout(function() {
			getElem("picture_preview").style.display = "none";
		}, 150);
}

function loadFirst() {
	swapBigImg(firstImage);
}
//-->
