window.onload = function smartRollover() {

	new Image().src = "/img/bg_header-menu01.gif";
	new Image().src = "/img/bg_header-menu02.gif";
	new Image().src = "/img/bg_header-menu03.gif";
	new Image().src = "/img/bg_header-menu04.gif";
	new Image().src = "/img/bg_header-menu05.gif";
	new Image().src = "/img/bg_header-menu06.gif";
	new Image().src = "/img/bg_header-menu07.gif";
	new Image().src = "/img/bg_header-menu08.gif";
	
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off\\."))
			{
				var nonRollCheck ;
				nonRollCheck = images[i].getAttribute('className');
				nonRollCheck = (nonRollCheck == null) ? images[i].getAttribute('class') : nonRollCheck;
				
				nonRollCheck = nonRollCheck ? nonRollCheck.match(/(^|\s)no_rollover(\s|$)/) : false;
				
				if (!nonRollCheck)
				{
					ImgSrc = images[i].getAttribute("src").replace("_off.", "_on.");
					new Image().src = ImgSrc;
					
					images[i].onmouseover = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
						
						if (document.all){
							document.all("header1").style.backgroundImage = 'url(/img/bg_header-' + this.getAttribute('id') + '.gif)';
						} else if(document.getElementById) {
							document.getElementById("header1").style.backgroundImage = "url(/img/bg_header-" + this.getAttribute("id") + ".gif)";
						}
					}
					images[i].onmouseout = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
						
						if (document.all){
							document.all("header1").style.background = "url(/img/bg_header.gif) no-repeat bottom";
						} else if(document.getElementById) {
							document.getElementById("header1").style.background = "url(/img/bg_header.gif) no-repeat bottom";
						}
					}
				}				
			}
		}
	}
}