p=document.getElementById("placeHolder");
k=0;
iconList=new Array();
function mouseOverIcons(){
	var divs=document.getElementsByTagName("DIV");
	for(var i=0, j=divs.length; i<j; i++){
		if (divs[i].className=="icon"){
			iconList.push(divs[i].getElementsByTagName("img")[0].src.replace("/a", "/b"));
			divs[i].onmouseover=function(){
				this.getElementsByTagName("img")[0].src=this.getElementsByTagName("img")[0].src.replace("img/a", "img/b");
			}
			divs[i].onmouseout=function(){
				this.getElementsByTagName("img")[0].src=this.getElementsByTagName("img")[0].src.replace("img/b", "img/a");
			}
		}
	}
	preload();
}

function preload(){
	if (p.complete){
		if (k < iconList.length){
			p.src=iconList[k];
			k++;
			setTimeout("preload()", 100);
		}
	}else{
		setTimeout("preload()", 100);
	}
}
window.onload=mouseOverIcons;