function menuchange(tabContainerId, language, path) {

	[].indexOf || (Array.prototype.indexOf = function(v,n){
	  n = (n==null)?0:n;
	  var m = this.length;
	  for(var i = n; i < m; i++)
		if(this[i] == v)
		   return i;
	  return -1;
	});


 // --- initialization ---
    var menuBar = document.getElementById(tabContainerId);
    if (! menuBar) {
        return;
    }
	
    this.targetIds = new Array();
    this.picturebuttonoff=new Array();
    this.picturebuttonon=new Array();
    var group = this;

// Find anchor elements.
   var Elems = menuBar.getElementsByTagName('a');
    for (var i in Elems) {

//Add event handler to link.
	var obj=Elems[i];
    if (!obj.id) {
            continue;
    }

	 this.targetIds.push(obj.id);

	//loading off and on images
	tmpimage = new Image;
	tmpimage.src =path+'/images/'+obj.id+language+'.gif';
	this.picturebuttonoff.push(tmpimage);
	  
	tmpimage = new Image;
	tmpimage.src =path+'/images/'+obj.id+language+'on.gif';
	this.picturebuttonon.push(tmpimage);
		

		tmpindex=this.targetIds.length;
		
	    obj.onmouseover= function () {
		group.show(this.id, tmpindex);
       }
	   
	    obj.onmouseout= function () {
		group.hide(this.id, tmpindex);
       }
 	}
	
    this.show = function (targetId, ind) {
		var obj=document.getElementById('img'+targetId);
		obj.src = this.picturebuttonon[this.targetIds.indexOf(targetId)].src;
    }
	
    this.hide = function (targetId, ind) {
		var obj=document.getElementById('img'+targetId);
		obj.src = this.picturebuttonoff[this.targetIds.indexOf(targetId)].src;
    }

}
