var noInit = true;

// ## set Menu
var setMenu = new Array('top', 'green', 'white', 'access', 'link', 'bbs');
// ## preload IMG files
var imgPRL = new Array();
function setImgFile() {
	for (i in setMenu) {
		imgPRL[setMenu[i] + '_out'] = 'common_img/' + setMenu[i] + '_ou.gif';
		imgPRL[setMenu[i] + '_ovr'] = 'common_img/' + setMenu[i] + '_ov.gif';
		imgPRL[setMenu[i] + '_clk'] = 'common_img/' + setMenu[i] + '_ov.gif';
	}

	noInit = false;
}
// ## Mouse Out Method
function setMusOut(init) {
	if (this.status != 'clk' || init) {
		document.images[this.name].src = imgPRL[this.name + '_out'];
		this.status = 'out';
	}
	return true;
}
// ## Mouse Over Method
function setMusOvr() {
	if (this.status != 'clk') {
		document.images[this.name].src = imgPRL[this.name + '_ovr'];
		this.status = 'ovr';
	}
	return true;
}
// ## Mouse Click Method
function setMusClk() {
	if (this.status != 'clk') {
		document.images[this.name].src = imgPRL[this.name + '_clk'];
		this.status = 'clk';
		for (i in setMenu) imgObj[setMenu[i]].rst(this.name);
	}
	return true;
}
// ## Mouse Reset Method
function setMusRst(init) {
	if (this.status == 'clk' && this.name != init) {
		document.images[this.name].src = imgPRL[this.name + '_out'];
		this.status = 'out';
	}
	return true;
}
// ## IMG's Object Constructor
function imgCls(obj) {
	this.name = obj;
	this.out = setMusOut;
	this.ovr = setMusOvr;
	this.clk = setMusClk;
	this.rst = setMusRst;
	this.status = 'out';
}
// ## set IMG's Object
var imgObj = new Array()
function setImgObj() {
	for (i in setMenu) {
		imgObj[setMenu[i]] = new imgCls(setMenu[i]);
	}
}
