Assuming this all takes place in a .php file
onMouseOut="<? php code here ?>"
I'm not quite sure what you're trying to do on MouseOut though