//move the UL inside the A in  IE6, avoiding fugly ie6 in comments ifdef
function inTable(menu) {
	if (!menu)
	  return;
	var links = menu.getElementsByTagName('a');

	for(var i=0;i<links.length;i++){
	  var link=links[i];
	  
	  if (link.href.lastIndexOf('#')==link.href.length-1){
	    if (link.getElementsByTagName('ul').length>0) {
		    continue;
		}
		  
		for(var e = link; e=e.nextSibling;){					
			if (e.nodeName=='UL'){
			  //work w/o table, i suppose IE 5.5 needs table but meh
			    e.parentNode.removeChild(e);

			    var table = e.ownerDocument.createElement('span');
			    table.appendChild(e);
			    link.appendChild(table);
			  
		  		break;
			}
		}
	  }
	}
}

var isIE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
if ( isIE6){
  inTable(document.getElementById('topMenu'));
}