
//check the radio button that has a given value
function selectRadioButton( rb, sSelectionValue )
    {
    for( var i = 0; i < rb.length ; i++ )
      if( rb[i].value == sSelectionValue )
    	{
    	rb[i].checked = 1
    	break
    	}
    }

//select the item with the given value in a listbox
function selectListboxItem( lbx, sSelectionValue )
    {
    for( var i = 0; i < lbx.length ; i++ )
        if( ( lbx.options[i].value && lbx.options[i].value == sSelectionValue )
	    || lbx.options[i].text == sSelectionValue )
    	    {
    	    lbx.selectedIndex = i
    	    break
    	    }
    }


//check the string valid or not
function valString( ctl, aText )
    {
    if( aText == 'null')
        ctl.value = '' ;
    else
        ctl.value = aText ;
    }

