defaultStatus = "Pamela Creevey Photography";

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function displayImage(URL, winName) {
	height = (navigator.appVersion.indexOf("Mac") != -1 && navigator.appName == 'Microsoft Internet Explorer') ? screen.availHeight : screen.availHeight-30;
	width = (navigator.appVersion.indexOf("Mac") != -1 && navigator.appName == 'Microsoft Internet Explorer') ? screen.availWidth : screen.availWidth-10;
	//window.status = height;
	winFeatures = 'resizable,screenX=0,screenY=0,top=0,left=0,width='+width+',height='+height;
	windowHandle = window.open (URL, winName, winFeatures);
	windowHandle.focus();
}

function displayPricing(URL, winName) {
	y = screen.availHeight/5;
	x = screen.availWidth/5;
	//window.status = screen.availHeight;
	winFeatures = 'resizable,scrollbars,screenX='+x+',screenY='+y+',top='+y+',left='+x+',width=496,height=300';
	windowHandle = window.open (URL, winName, winFeatures);
	windowHandle.focus();
}

function right(e) {
	var msg = "Right-clicking images has been disabled to discourage their unauthorized use.\nFeel free to ask permission by calling 503.222.3752 or emailing pamela@pamelacreevey.com.";
	if (navigator.appName == 'Netscape' && e.which == 3) {
		alert(msg);
		return false;
	}
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		alert(msg);
		return false;
	}
	else return true;
}

function trap() {
  if(document.images) {
    for(i=0; i<document.images.length; i++) {
      document.images[i].onmousedown = right;
      document.images[i].onmouseup = right;
		}
	}
}
  
function validateImageFile() {
	var legalTypes = "";
}