function GetAllElementsByTagName( name ) {
   if (document.getElementsByTagName)
   	var x = document.getElementsByTagName(name);
   else if (document.all)
   	var x = document.all.tags(name);
   else
      return null;
   return x;
}

function InitializePage() {
   var x = GetAllElementsByTagName( 'TD' );
   if ( x )
      for (var i=0;i<x.length;i++) {
         switch( x[i].className ) {
            case 'radiobuttonsselected':
            case 'radiobuttons':
            	x[i].onmouseover = radio_button_mouseover;
            	x[i].onmouseout = radio_button_mouseout;
               break;
         }
      }
   var x = GetAllElementsByTagName( 'TR' );
   if ( x )
      for (var i=0;i<x.length;i++) {
         if ( x[i].className == 'list' || x[i].className == 'trnotify' ) {
         	x[i].onmouseover = list_mouseover;
         	x[i].onmouseout = list_mouseout;
         }
      }
   if ( window.InitializeRowFn )
      InitializeRowFn();
}
function FindNextInput(obj) {
   obj = obj.nextSibling;
   while( obj ) {
      if ( obj.nodeName == 'INPUT' )
         return obj;
      obj = obj.nextSibling;
   }
}

function radio_button_mouseover() {
	this.style.borderColor='#A2C7D6';
}

function radio_button_mouseout() {
	this.style.borderColor='';
}

function list_mouseover() {
   if ( this.sub_item ) {
      var current_row = this.previousSibling;
      while( current_row && current_row.sub_item ) {
         current_row.style.backgroundColor='#A6D5C5';
         current_row = current_row.previousSibling;
      }
      if ( current_row )
         current_row.style.backgroundColor='#A6D5C5';

      current_row = this.nextSibling;
      while( current_row && current_row.sub_item ) {
         current_row.style.backgroundColor='#A6D5C5'
         current_row = current_row.nextSibling;
      }
   }
   this.style.backgroundColor='#A6D5C5';
   current_row = this.nextSibling;
   while( current_row && current_row.sub_item ) {
      current_row.style.backgroundColor='#A6D5C5'
      current_row = current_row.nextSibling;
   }
}

function list_mouseout() {
   if ( this.sub_item ) {
      var current_row = this.previousSibling;
      while( current_row && current_row.sub_item ) {
         current_row.style.backgroundColor='';
         current_row = current_row.previousSibling;
      }
      if ( current_row )
         current_row.style.backgroundColor='';

      current_row = this.nextSibling;
      while( current_row && current_row.sub_item ) {
         current_row.style.backgroundColor=''
         current_row = current_row.nextSibling;
      }
   }
   this.style.backgroundColor='';
   current_row = this.nextSibling;
   while( current_row && current_row.sub_item ) {
      current_row.style.backgroundColor=''
      current_row = current_row.nextSibling;
   }
}


