function openIndex(oInput, title, index, url) {
 
   /* append arguments to URL */
   var s;
   if (url.indexOf("?") != -1) s=";"; else s="?";
   url = url + s + "field=" + escape(oInput.name) + ";index=" + escape(index) + ";title=" + escape(title);  
   if (oInput.value) url = url + ";start=" + escape(oInput.value);
   indicesWindow = window.open( url, "indices", "scrollbars=yes,resizable=yes,width=450,height=400" );
   indicesWindow.focus();
}

/* Added by Mohamed */
function addTr(url) {

  var MaxNrOfFieds = 7;
	if (document.getElementById){
		for ( f=1; f < MaxNrOfFieds+1; f++ ) {
		  if (testElem('tr'+f)) {
		    if (document.getElementById('tr'+f).style.display=='none') {
		      document.getElementById('tr'+f).style.display = '';
		      f=300; //exit loop
		    }
		  }
		}
	}
}

/* Added by Mohamed*/
function SimpleSearchSubmit() {
  // no collection is selection. Search the group
  if (document.Quicksearch.c.options[document.Quicksearch.c.selectedIndex].value == 'all') {
    document.Quicksearch.c.options[document.Quicksearch.c.selectedIndex].value = '';
    document.Quicksearch.g.value = 'ccc';
    document.Quicksearch.tpl.value = 'multireslist.tpl';
    document.Quicksearch.xc.value = '1';
  }
  return true;
}

/* toggle searchform/help */
function toggleHelp() {
	
	var oHelp = document.getElementById("tblHelp");
	var oForm = document.getElementById("tblForm");
	if (oHelp.style.display == 'none') {
		oHelp.style.display = 'block';
		oForm.style.display = 'none';
	} else {
		oHelp.style.display = 'none';
		oForm.style.display = 'block';
	}
}
