function addLoadEvent(func){
  var oldf = window.onload;
  if(typeof window.onload != 'function'){
   window.onload =  func;
  }
  else{
   window.onload = function(){
    oldf();
    func();
   }
  }
}
function showDetail(){
 if(!document.getElementById||!document.getElementById("galleryItemb")) return false;
 var obj = document.getElementById("galleryItemb");
 var items = obj.childNodes;
 for(var i=0; i<items.length; i++){
  items[i].onmouseover=function(){
   for(var t=0; t<items.length; t++){
    items[t].className="";
   }
   this.className="now";
  }
 }
}
addLoadEvent(showDetail);
