
function SwapImage_Person() {
var link = new Array(12) ; 
ImageCount = 12;
img = Math.floor(Math.random() * ImageCount)+1;
 document.write("<img src='top_img/images/linkbanner/banner_person_"+img+".gif' border='0'></a>"); 
}

function SwapImage_Life() {
var link = new Array(12) ; 
ImageCount = 12;
img = Math.floor(Math.random() * ImageCount)+1;
 document.write("<img src='top_img/images/linkbanner/banner_life_"+img+".gif' border='0'></a>"); 
}

function SwapImage_Class() {
var link = new Array(5) ; 
ImageCount = 5;
img = Math.floor(Math.random() * ImageCount)+1;
 document.write("<img src='top_img/images/linkbanner/banner_class_"+img+".gif' border='0'></a>"); 
}

function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
