includes/clientside/static/toolbar.js
changeset 86 c162ca39db8f
parent 1 fe660c52c48f
child 128 01955bf53f96
--- a/includes/clientside/static/toolbar.js	Thu Aug 09 12:26:16 2007 -0400
+++ b/includes/clientside/static/toolbar.js	Fri Aug 10 15:57:22 2007 -0400
@@ -40,7 +40,10 @@
 {
   if ( !document.getElementById('pagebar_main') )
     return false;
-  if(typeof(document.getElementById('mdgToolbar_'+which)) == 'object')
+  var dom = document.getElementById('mdgToolbar_'+which);
+  if ( !dom )
+    return false;
+  if(typeof(dom) == 'object')
   {
     unselectAllButtonsMajor();
     document.getElementById('mdgToolbar_'+which).className = 'selected';