// Collapsing elements script
// hides a given table element
// Added by : Kamran Iqbal
// Added Date : 23.02.2006

// Alternates between visible and hidden states of a given e_table
function hide_show(e_table, e_img, alt_less, alt_more) {
   if(document.getElementById) {
      var id_table = document.getElementById(e_table).style;
      var id_img = document.getElementById(e_img);

      //Set the object to table-cell if the browser is
      //Firefox and block if it's anything else.
      if(navigator.userAgent.indexOf("Firefox") != -1){
         if(id_table.display == "none"){
			id_table.display = "table-cell";
            id_img.src = "/newimages/arrows/left.jpg";
            id_img.alt = alt_less;
         }
         else {
            id_table.display = "none";
            id_img.src = "/newimages/arrows/right.jpg";
            id_img.alt = alt_more;
         }
      }
      else {
         if(id_table.display == "none") {
            id_table.display = "block";
            id_img.src = "/newimages/arrows/left.jpg";
            id_img.alt = alt_less;
        }
         else {
            id_table.display = "none";
            id_img.src = "/newimages/arrows/right.jpg";
            id_img.alt = alt_more;
         }
      }
      return false;
   }
   else {
      return true;
   }
}

// Hides a given e_table
function hide(e_table, e_img) {
	if(document.getElementById) {
		var id_table = document.getElementById(e_table).style;
		var id_img = document.getElementById(e_img);
		id_table.display = "none";
		id_img.src = "/newimages/arrows/left.jpg";
		e_img.alt == "Show Details";
		return false
	} else {
		return true;
	}
}

// Shows the given content in a new window
function writeConsole(content) {
 top.consoleRef=window.open('','myconsole',
  'width=350,height=250'
   +',menubar=0'
   +',toolbar=1'
   +',status=0'
   +',scrollbars=1'
   +',resizable=1')
 top.consoleRef.document.writeln(
  '<html><head><title>Console</title></head>'
   +'<body bgcolor=white onLoad="self.focus()">'
   +content
   +'</body></html>'
 )
 top.consoleRef.document.close()
}