
            function clearDiv( divId )
            {
                var box = document.getElementById( divId );
                while ( box.lastChild ) 
                    box.removeChild( box.lastChild ) ;
            }

            function addElementToDiv( divId, newEl )
            {
                var box = document.getElementById( divId );
//                 box.appendChild( newStatus.value ? newStatus : document.createTextNode( newStatus ) );
//                 if (newText.nodeValue == undefined)
//                 {
//                     box.appendChild( document.createTextNode( newEl ) );
//                     box.appendChild( document.createElement( "br" ) );
//                 } else {
                    box.appendChild( newEl );
//                 }
                return false;
            }

            function setTextInDiv( divId, newText )
            {
                clearDiv( divId );
                addTextToDiv( divId, newText );
            }
  function addTextToDiv( divId, newText )
  {
    addElementToDiv( divId, document.createTextNode( newText ) ) ;
  }
    function softAlert( text )
    {
        clearAlert();
        addTextToDiv("alertmsg", text );
    }

    function clearAlert( )
    {
        clearDiv("alertmsg");
    }


