function popWindow(popURL, height, width) {
	theWindow=window.open( popURL, "theWindow", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=" + width + ",height=" + height + "");
	theWindow.opener=self;
	theWindow.moveTo=(200, 200); 
	setTimeout("theWindow.focus();",200);
};

var secNumber;
var setNum;
function popPhoto(section, num){
	secNumber = section;
	setNum = num;
	popWindow('/portfolio/photo_popup.asp','400','400');	
}


function preloadImages(preFix, sTart, fInish, pAth) {
	if (document.images) {
		for (var i=sTart; i<=fInish; i++) {
			//preload on images
			newImage = preFix + i + "on = new Image()";
			loCation = pAth + preFix + i + "on.gif";
			newImageSRC = preFix + i + "on.src = \"" + loCation + "\"";
			eval(newImage);
			eval(newImageSRC);

			//preload off images
			newImage = preFix + i + "off = new Image()";
			loCation = pAth + preFix + i + "off.gif";
			newImageSRC = preFix + i + "off.src = \"" + loCation + "\"";
			eval(newImage);
			eval(newImageSRC);
		};
	};
};

function change(Name,OnOff) {
	if (document.images) {
		document [Name].src = eval(Name + OnOff + ".src");
	};
};

preloadImages('m',1,4,'/images/');


