var flag = document.images;

if (flag) {
	var ButNo=1;
	var Buttons = new Array();
	Prefix = "images/";
	ExtOff = ".jpg";
	ExtOn = "b.jpg";
	for (i = 1; i < 8; i++) { MakeButtons("m" + i); }
}

function ButImages(Name) {
	this.Name = Name;
	this.Off = new Image();
	this.Off.src = Prefix + Name + ExtOff;
	this.On = new Image();
	this.On.src = Prefix + Name + ExtOn;
}

function MakeButtons(Name) {
	Buttons[ButNo] = new ButImages(Name);
	ButNo++;
}

function OnBtOver(No) {
	if(flag) {
		//alert(No);
		document.images[Buttons[No].Name].src = Buttons[No].On.src;
	}
}

function OnBtOut(No) {
	if(flag) {
		document.images[Buttons[No].Name].src = Buttons[No].Off.src;
	}
}
