public Element appendChildrenFromEnvironmental( String appName, Document doc, String rootName,
			boolean appendTo ) throws ServiceException {
		Report.debug( "bezzotechcosign", "Entering appendChildrenFromEnvironmental, passed in parameters:" +
				"\n\tappName: " + appName + "\n\tdoc:\n\trootName: " + rootName + "\n\tappendTo: " + appendTo,
				null );
		Map fields = m_shared.getConfigSet( appName + "." + rootName );
		Element root;
		if ( appendTo ) root = ( Element )doc.getElementsByTagName( rootName ).item( 0 );
		else root = doc.createElement( rootName );
		for ( Iterator < String > fieldIter = fields.keySet().iterator(); fieldIter.hasNext(); ) {
			String fieldName = ( String )fieldIter.next();
			Element child = doc.createElement( fieldName );
			try {
				String fieldValue = m_service.getPageMerger()
						.evaluateScript( m_shared.getConfig( appName + "." + rootName + "." + fieldName ) );
		Report.debug( "bezzotechcosign", "FieldValue before: " + fieldValue, null );
				try {
					if( Integer.parseInt( fieldValue ) == 0 ) fieldValue = "false";
					else if( Integer.parseInt( fieldValue ) == 1 ) fieldValue = "true";
				}
				catch ( NumberFormatException e ) {}
		Report.debug( "bezzotechcosign", "FieldValue after: " + fieldValue, null );
				Text text = doc.createTextNode( fieldValue );
				child.appendChild( text );
			}
			catch ( IOException e ) {
				throwFullError( e );
			}
			root.appendChild( child );
		}
		return root;
	}