var navobject = new Object();
navobject.mouseControl = function(topimg,bottomimg,imgpath)
{
	var navlist = document.getElementById(topimg).getElementsByTagName("img");
	var navlistother = document.getElementById(bottomimg).getElementsByTagName("img");
	var navyeatoprbox = document.getElementById(topimg);
	var navyearbottombox = document.getElementById(bottomimg);
	navcount = navlist.length;
	for(i = 0;i<navcount;i++)
	{
		navlist[i].onmouseover = function()
		{
			for(j=1;j<=navcount;j++)
			{
				document.getElementById(topimg+j).src = imgpath+j+".jpg";
				document.getElementById(bottomimg+j).src = imgpath+j+".jpg";
			}
				document.getElementById(this.id).src = imgpath+(this.id).substr(topimg.length)+"_1.jpg";
				document.getElementById(bottomimg+(this.id).substr(topimg.length)).src = imgpath+(this.id).substr(topimg.length)+"_1.jpg";
		}
		navlistother[i].onmouseover = function()
		{
			for(j=1;j<=navcount;j++)
			{
				document.getElementById(bottomimg+j).src = imgpath+j+".jpg";
				document.getElementById(topimg+j).src = imgpath+j+".jpg";
			}
				document.getElementById(this.id).src = imgpath+(this.id).substr(bottomimg.length)+"_1.jpg";
				document.getElementById(topimg+(this.id).substr(bottomimg.length)).src = imgpath+(this.id).substr(bottomimg.length)+"_1.jpg";
		}
		navyeatoprbox.onmouseout = function()
		{
			for(j=1;j<=navcount;j++)
			{
				document.getElementById(bottomimg+j).src = imgpath+j+".jpg";
				document.getElementById(topimg+j).src = imgpath+j+".jpg";
			}
		}
		navyearbottombox.onmouseout = function()
		{
			for(j=1;j<=navcount;j++)
			{
				document.getElementById(bottomimg+j).src = imgpath+j+".jpg";
				document.getElementById(topimg+j).src = imgpath+j+".jpg";
			}
		}
		
	}
}
navobject.imgreg = /([a-z_]+)([0-9]+)[.]jpg/;
navobject.imgreg1 = /([a-z_]+)([0-9]+)[_][1][.]jpg/;
navobject.listbutton = function(imgid,imgpath)
{
	listimg = document.getElementById(imgid).getElementsByTagName('img');
	listcount = listimg.length;
	for(i=0;i<listcount;i++)
	{
		listimg[i].onmouseover = function()
		{
			strname = (this.src).match(navobject.imgreg)[1];
			strid = (this.src).match(navobject.imgreg)[2];
			this.src = imgpath+strname+strid+"_1.jpg";
		}
		listimg[i].onmouseout = function()
		{
			strname = (this.src).match(navobject.imgreg1)[1];
			strid = (this.src).match(navobject.imgreg1)[2];
			this.src = imgpath+strname+strid+".jpg";
		}
	}
}