            var NS4 = (document.layers) ? 1 : 0;
            var IE = (document.all) ? 1 : 0;
            var DOM = 0; 
            if (parseInt(navigator.appVersion) >=5) {DOM=1};
            
            var lastHeader;
            var currShow;

            function closetab()
            {

                    currShow.style.visibility = 'hidden';
                    currShow.style.position = 'absolute';
                    if (lastHeader)
                    {
                        lastHeader.style.color = tab_off_txt;
                        lastHeader.style.background = tab_off;
                        lastHeader.style.fontWeight="normal";
                        lastHeader.style.cursor= "hand";
                    }


            }
            function changeCont(tgt,header) {

                target=('T' +tgt);
                
                if (DOM) {

                    // Hide the last one, and flip the tab color back.
                    currShow.style.visibility="hidden";
                    if ( lastHeader ) { 
                       lastHeader.style.background = tab_off; 
                       lastHeader.style.fontWeight="normal"; 
                    }
                
                    // Show this one, and make the tab silver
                    var flipOn = document.getElementById(target);                        
                    flipOn.style.visibility="visible";

                    var thisTab = document.getElementById(header);                        
                    thisTab.style.background = tab_on;
                    thisTab.style.fontWeight = "bold";

                    // Save for next go'round
                    currShow=document.getElementById(target);
                    lastHeader = document.getElementById(header);

                    return false;
                }

                else if (IE) {


                    // Hide the last one, and flip the tab color back.
                    currShow.style.visibility = 'hidden';
                    currShow.style.position = 'absolute';
                    if (lastHeader)
                    {
                        lastHeader.style.color = tab_off_txt;
                        lastHeader.style.background = tab_off; 
                        lastHeader.style.fontWeight="normal";
                        lastHeader.style.cursor= "hand";
                    }

                    // Show this one, and make the tab silver
                    document.all[target].style.visibility = 'visible';
                    document.all[target].style.position = 'relative';
                    
                    document.all[header].style.color = tab_on_txt;
                    document.all[header].style.background = tab_on;
                    document.all[header].style.fontWeight = 'bold';
                    document.all[header].style.cursor= "none";


                    // Save for next go'round
                    currShow=document.all[target];
                    lastHeader=document.all[header];

                    return false;
                }
                    
                else if (NS4) {

                    // Hide the last one, and flip the tab color back.
                    currShow.visibility = 'hide';
                    // if (lastHeader) { lastHeader.bgColor = tab_off; }

                    // Show this one, and make the tab silver
                    document.layers[target].visibility = 'show';
                    // document.layers[header].bgColor  = tab_on;

                    // Save for next go'round
                    currShow=document.layers[target];
                    // lastHeader=document.layers[header];

                    return false;
                }
                    
                // && (version >=4)
                else {
                    window.location=('#A' +target);
                    return true;
                }


            }

            function DrawTabs(rowid)
            {
               var output = '';
               for ( var x = rowid; x <= rowid; x++ )
               {
                  output += '<div id="tabstop" style="position:none;">\n';
                  output += '<table border="0" cellpadding="0" cellspacing="1" bordercolor="000000">\n';
                  output += '<tr valign="top">\n';
                  for ( var z = 1; z < rows[x].length; z++ )
                  {
                       var tid = "tab" + x + z;
                       var did = x + z;
                       output += '<td id="' + tid +'" class="tab-button" onmouseover="changeCont(\'' + x + z + '\', \'' + tid + '\'); return false;" onFocus="if(this.blur)this.blur()">' + rows[x][z] + '</td>\n';
                  }
                  output += '</tr>\n';
                  output += '</table>\n';
                  output += '</div>\n\n';
               }
               self.document.write(output);
            }
