// HOVERBUTTONS ROLLOVER SCRIPT  V1.0
// By: Brian Gosselin
// URL: www.scriptasylum.com

function hMse(){
this.className=this.cN+"hover";
if(typeof this.omv=="function")this.omv();
}

function oMse(){
this.className=this.cN;
if(typeof this.omt=="function")this.omt();
}

function uMse(){
this.className=this.cN+"hover";
if(typeof this.omp=="function")this.omp();
return false;
}

function dMse(){
this.className=this.cN+"press";
if(typeof this.omd=="function")this.omd();
return false;
}

function addW3CButtons(which){
if(document.getElementsByTagName){
var ea=document.getElementsByTagName(which);
for(i=0;i<ea.length;i++){
if(ea[i].getAttribute('hoverbuttons')){
if(document.all)ea[i].onselectstart=function(){return false;}
ea[i].cN=ea[i].className;
ea[i].style.cursor=(document.all)?'hand':'default';
ea[i].omv=ea[i].onmouseover;
ea[i].onmouseover=hMse;
ea[i].omt=ea[i].onmouseout;
ea[i].onmouseout=oMse;
ea[i].omp=ea[i].onmouseup;
ea[i].onmouseup=uMse;
ea[i].omd=ea[i].onmousedown;
ea[i].onmousedown=dMse;
}}}}

addW3CButtons('div');