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];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		menu_01_over = newImage("images/menu_01-over.gif");
		menu_02_over = newImage("images/menu_02-over.gif");
		menu_03_over = newImage("images/menu_03-over.gif");
		menu_03_over = newImage("images/menu_04-over.gif");
		menu_05_over = newImage("images/menu_05-over.gif");
		menu_06_over = newImage("images/menu_06-over.gif");
		preloadFlag = true;
	}
}

function enlargePhoto(picURL, thisEnlargeFileSize) {
	newWindow=window.open(picURL,'EnlargePhoto','toolbar=no,width='+thisEnlargeFileSize[0]+',height='+thisEnlargeFileSize[1]+', resizable=yes');
	newWindow.moveTo(10, 10);
	newWindow.document.write('<html><head><\/head><body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"><img src="'+picURL+'"><\/body><\/html>');
	setSize(newWindow, thisEnlargeFileSize[0], thisEnlargeFileSize[1] + 10);
	newWindow.focus();	
}

function setSize(thisWindow, width, height) {
	if (thisWindow.outerWidth) {
		thisWindow.outerWidth = width;
		thisWindow.outerHeight = height;
	}
	else if (thisWindow.resizeTo) {
		thisWindow.resizeTo(width,height);
	}
	else {
		//alert("Not supported.");
	}
}

function init() {
	preloadImages();
}

window.onload = init;