function removeRowFromTable() {
  var tbl2 = document.getElementById('tblSample');
  // 11 from top
  var uu = 11;
  // total new + 1
  for(i = 0; i < 11; i++) {
    tbl2.deleteRow(uu);
  }
  
  var tb4 = document.getElementById('tblSample');
  // 11 from top
  rowb = tb4.insertRow(11);
  titleb = document.createElement('td');
  titleb.setAttribute('valign', 'middle');
  titleb.setAttribute('height', '16');
  titleb.className = "all3";

  titleb.innerHTML = "<a href='javascript:addRowToTable();' class=sidebar><img src='../images/plus.gif' width=9 height=9 border=0> More blast tools</a>";
  rowb.appendChild(titleb); 
  
  
}

function addRowToTable()
{

  var tbl2 = document.getElementById('tblSample');
  tbl2.deleteRow(11);

  var tb3 = document.getElementById('tblSample');
  rowa = tb3.insertRow(11);
  titlea = document.createElement('td');
  titlea.setAttribute('valign', 'middle');
  titlea.setAttribute('height', '16');
  titlea.className = "all3";

  titlea.innerHTML = "<a href='javascript:removeRowFromTable();' class=sidebar><img src='../images/minus.gif' width=9 height=9 border=0> Collapse blast tools</a>";
  rowa.appendChild(titlea);



  var tbl = document.getElementById('tblSample');
  // 0-9 (10 items)
  var blastname = new Array("short blastn", "short blastp", "discontiguous megablast", "enviro. samples blast", "human blast", "mouse blast", "rat blast", "fugu blast", "zebra blast", "eukaryotic blast")
  var title = new Array("a", "b", "c", "d", "e", "f", "g", "h", "i");
  var row = new Array("aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii");
  
  // add cells
  for(i = 0; i < 10; i++) {
  var u = 12 + i;
  row[i] = tbl.insertRow(u);
  title[i] = document.createElement('td');
  title[i].setAttribute('valign', 'middle');
  title[i].setAttribute('height', '20');
  title[i].className = "all2";

  var agt = navigator.userAgent.toLowerCase();
  if((agt.indexOf('msie')!=-1) && (agt.indexOf('win')!=-1)){
    title[i].setAttribute('onclick',function anonymous(){window.location.href="www.msn2.com"});
    title[i].setAttribute('onmouseover',function anonymous(){this.style.backgroundColor="#BBCCED"; this.style.cursor="hand";});
    title[i].setAttribute('onmouseout',function anonymous(){this.style.backgroundColor="#F5F5F5"; this.style.cursor="hand";});
  } else {
    title[i].setAttribute('onclick','window.location.href="www.msn2.com" ');
    title[i].setAttribute('onmouseover','this.style.backgroundColor="#BBCCED";this.style.cursor="hand" ');
    title[i].setAttribute('onmouseout','this.style.backgroundColor="#F5F5F5";this.style.cursor="hand" ');
  }
  title[i].innerHTML = "<a href=www.msn.com class=sidebar>" + blastname[i] + "</a>";
  row[i].appendChild(title[i]);
  }
}

////////////////////////////

function removeRowFromTable2() {
  var tb2a = document.getElementById('tblSample2');
  var uu2 = 7;
  // all new items + 1
  for(i = 0; i < 18; i++) {
    tb2a.deleteRow(uu2);
  }
  
  var tb2b = document.getElementById('tblSample2');
  row2b = tb2b.insertRow(7);
  title2b = document.createElement('td');
  title2b.setAttribute('valign', 'middle');
  title2b.setAttribute('height', '16');
  title2b.className = "all3";

  title2b.innerHTML = "<a href='javascript:addRowToTable2();' class=sidebar><img src='../images/plus.gif' width=9 height=9 border=0> More non-queue tools</a>";
  row2b.appendChild(title2b); 
  
  
}

function addRowToTable2()
{

  var tb2c = document.getElementById('tblSample2');
  tb2c.deleteRow(7);

  var tb2c = document.getElementById('tblSample2');
  row2c = tb2c.insertRow(7);
  title2c = document.createElement('td');
  title2c.setAttribute('valign', 'middle');
  title2c.setAttribute('height', '16');
  title2c.className = "all3";

  title2c.innerHTML = "<a href='javascript:removeRowFromTable2()' class=sidebar><img src='../images/minus.gif' width=9 height=9 border=0> Collapse non-queue tools</a>";
  row2c.appendChild(title2c);



  var tb2d = document.getElementById('tblSample2');
  // 0-8 (9 items)
  var toolname = new Array("JEMBOSS", "REBASE", "bioconductor", "translate", "GENESCAN", "MOTIF server", "PROSITE", "BLOCKS searcher", "ProDom", "ExPASy Proteomics", "Protein Prospector", "Protein Calculator", "BIND", "DIP", "MINT", "MIPS", "TIGR")
  var title2 = new Array("t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", "t10", "t11", "t12", "t13", "t14", "t15", "t16", "t17");
  var row2 = new Array("r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17");
  
  // add cells
  for(i = 0; i < 17; i++) {
  var u2 = 8 + i;
  row2[i] = tb2d.insertRow(u2);
  title2[i] = document.createElement('td');
  title2[i].setAttribute('valign', 'middle');
  title2[i].setAttribute('height', '20');
  title2[i].className = "all2";

  var agt6 = navigator.userAgent.toLowerCase();
  if((agt6.indexOf('msie')!=-1) && (agt6.indexOf('win')!=-1)){
    title2[i].setAttribute('onclick',function anonymous(){window.location.href="www.msn2.com"});
    title2[i].setAttribute('onmouseover',function anonymous(){this.style.backgroundColor="#BBCCED"; this.style.cursor="hand";});
    title2[i].setAttribute('onmouseout',function anonymous(){this.style.backgroundColor="#F5F5F5"; this.style.cursor="hand";});
  } else {
    title2[i].setAttribute('onclick','window.location.href="www.msn2.com" ');
    title2[i].setAttribute('onmouseover','this.style.backgroundColor="#BBCCED";this.style.cursor="hand" ');
    title2[i].setAttribute('onmouseout','this.style.backgroundColor="#F5F5F5";this.style.cursor="hand" ');
  }
  title2[i].innerHTML = "<span class=sidebar>" + toolname[i] + "</span>";
  row2[i].appendChild(title2[i]);
  }
}

///////////////////////////
var boo = 0;
function addCalendar()
{	
	if (boo == 0) {

  var tbc = document.getElementById('tbl');
  rowc = tbc.insertRow(2);
  titlec = document.createElement('td');
  titlec.setAttribute('colSpan', '2');
  titlec.setAttribute('height', '30');
	titlec.setAttribute('align', 'right');

  titlec.innerHTML = "<span class=style18>Password: </span><input type=text name=textfield>&nbsp;<input name=search type=button value=Go class=button_go onClick=www.msn.com >&nbsp;&nbsp;";
  rowc.appendChild(titlec);
	boo = 1;
	} else {
		var tbc2 = document.getElementById('tbl');
		tbc2.deleteRow(2);
		boo = 0;
	}
}