window.onload = rolloverInit;

function rolloverInit() {	
	
	for (var i=0; i<document.images.length; i++) {	
		if (document.images[i].parentNode.tagName == "A") {	
			setupRollover(document.images[i]);
			}	
	}
	
}
function setupRollover(thisImage) {
		
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;
	
	thisImage.onmouseup = rollUp;   
	
	thisImage.clickImage = new Image();	
	thisImage.clickImage.src = "buttons/" + thisImage.id + "_click.gif";		
	thisImage.onmousedown = rollClick;
	
	thisImage.overImage = new Image();	
	thisImage.overImage.src = "buttons/" + thisImage.id + "_on.gif";	
	thisImage.onmouseover = rollOver; 
}	

/*function whatBrow(){ 
if (navigator.appName == "Microsoft Internet Explorer"){ 
  alert("Stop 1");

   }
  else
  {
  rolloverInit;
  var currentpage = window.location.pathname;
  parts = currentpage.split(".");
  var newpage=parts[0] + "a.htm";
  window.location.href=newpage;
  
  }
 
  }*/
  


function rollOver() {
	this.src = this.overImage.src;
}

function rollOut() {
	this.src = this.outImage.src;
}

function rollClick() {
	this.src = this.clickImage.src;
}
function rollUp() {
    this.src = this.outImage.src;
}


