function imgInit(baseDir,offName,onName,overName) {
	if (document.images) {
		imgName = new Array(3);
		imgName[0] = new Image();
		imgName[1] = new Image();
		imgName[2] = new Image();
		imgName[0].src = baseDir + offName;
		imgName[1].src = baseDir + onName;
		imgName[2].src = baseDir + overName;
		return imgName;
	} else {
		return null;
	}
}
function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval( imgName + "[1].src" );
		return true;
	}
}
function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = eval( imgName + "[0].src" );
		return true;
	}
}
function imgOver(imgName) {
	if (document.images) {
		document[imgName].src = eval( imgName + "[2].src" );
		return true;
	}
}
function imgSet(imgName,viewName)
{
	if (document.images) {
		document[viewName].src = eval( imgName + "[2].src" );
		return true;
	}
}
function winOpen(winName,url,W,H){
//サブウインドウオープン
	var WinD11=window.open(url,winName,'scrollbars=1,width='+W+',height='+H+'');
	WinD11.document.close()
}

function NewOrNot(start, term, type) {
	var today = new Date();
	var today_time = today.getTime();
	var start_year = start.substring(0, start.indexOf("/"));
	var start_month = start.substring((start.indexOf("/") + 1), start.indexOf("/", (start.indexOf("/") + 1)));
	var start_date = start.substring((start.indexOf("/", (start.indexOf("/") + 1)) + 1), start.length);
	var start_day = new Date(eval(start_year), (eval(start_month)-1), eval(start_date));
	var start_time = start_day.getTime();

	var	new_graph	= "image/new.gif";
	var	new_width	= "40";
	var	new_height	= "15";
	var	update_graph	= "image/update.gif";
	var	update_width	= "40";
	var	update_height	= "15";

	if ((today_time - start_time) < (eval(term) * 24 * 60 * 60 * 1000)) {
		if (type == "new") {
			graphic_name	= new_graph;
			graphic_width	= new_width;
			graphic_height	= new_height;
			graphic_alt	= "new!";
		} else {
			graphic_name	= update_graph;
			graphic_width	= update_width;
			graphic_height	= update_height;
			graphic_alt	= "update!";
		}
	
		document.write("<IMG SRC=" + graphic_name + " WIDTH=" + graphic_width + " HEIGHT=" + graphic_height + " ALT=" + graphic_alt + " BORDER=0>");
	}
}
