function initSec(){ var contentDiv = document.getElementById( 'mainBody' ); var lnks = $T('A', contentDiv); lnks.each( function(item){ item.onclick = function() { if ( this.href.match('&') ) { return true; } else{ if ( this.name.substring(1,1) == 's' ) { window.opener.GetSubmenuContent( this.href, this.name.substring(1,2), 'true', true ); } else { window.opener.GetSubmenuContent( this.href, this.name.substring(1,2) , false, true); } } //window.close(); return false; } } ); } window.onload = initSec;