function loadImage() {

	var imgName = null;

	if (location.search.length > 0) {
	    	imgName = location.search.substring(1);
	
		document.images.targetImage.src = 'photos/'+imgName+'.jpg';

		changeObjectDisplay('oneMomentDiv','none');	
		setTimeout("showImage()",10)
	}	
	
	//document.forms.mainForm.imgCaption.size = imgName.length;
	//document.forms.mainForm.imgCaption.value = imgName.substr(3,imgName.length);
}

function showImage() {

	changeObjectDisplay('closeUpDiv','block');

}


function showPriceDiv() {

	changeObjectDisplay('priceDiv','none')
	changeObjectDisplay('priceOnDiv','block');
}

function hidePriceDiv() {

	changeObjectDisplay('priceOnDiv','none');
	changeObjectDisplay('priceDiv','block')
}

function getStyleObject(objectId) {
  // checkW3C DOM, then MSIE 4, then NN 4.

  if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
   }
   else if (document.all && document.all(objectId)) {
	return document.all(objectId).style;
   }
   else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId];
   } else {
	return false;
   }
}

function changeObjectDisplay(objectId, newDisplay) {
    // first get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.display = newDisplay;
	//alert(objectId+styleObject.display)
	return true;
    } else {
	return false;
    }
}

var message="All images © 2005 Betsy Cullen.  All rights reserved. \n Use of any image without permission is prohibited.";

function clickIE4(){
	if (event.button==2){
	alert(message);
	return false;
	}
}

function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
		alert(message);
		return false;
		}
	}
}

if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")