function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			
			// _off‚ð•]‰¿
			if(images[i].getAttribute("src").match("_off."))
			{	
				// upyswitchz
				if(location.search.split("=")[1] == 1){
					if(images[i].getAttribute("src").indexOf("interview") != -1){
						images[i].setAttribute("src", images[i].getAttribute("src").replace("_off.", "_on."));
					}
				}
				else if(location.search.split("=")[1] == 2){
					if(images[i].getAttribute("src").indexOf("pickup") != -1){
						images[i].setAttribute("src", images[i].getAttribute("src").replace("_off.", "_on."));
					}
				}
				else if(location.search.split("=")[1] == 3){
					if(images[i].getAttribute("src").indexOf("special") != -1){
						images[i].setAttribute("src", images[i].getAttribute("src").replace("_off.", "_on."));
					}
				}
				else if(location.search.split("=")[1] == 4){
					if(images[i].getAttribute("src").indexOf("liverepo") != -1){
						images[i].setAttribute("src", images[i].getAttribute("src").replace("_off.", "_on."));
					}
				}
				
				// over
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_hv."));
				}
				
				// out
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_hv.", "_off."));
				}
				
			}
			/*
			if(images[i].getAttribute("src").match("_on."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_hv."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_hv.", "_on."));
				}
			}
			*/
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
