function foldOut(oElement,sHTML){
/*------------------------------------------------------------------------------
-- description:     	display an elemnt 
-- parameters:      	the element oElement and the string sHTML
-- return:              the displayed element oElement
-- name/date/action:    NA    08/04/02    created
------------------------------------------------------------------------------*/
    try{
		if (sHTML!=null){
			oElement.innerHTML=sHTML;
		}
		oElement.style.display="block";
	} catch(e){
        var sError= "bad!\n"  + e.number + "\n" + e.description;
    }
}
//------------------------------------------------------------------------------
function foldIn(oElement,bClearData){
/*------------------------------------------------------------------------------
-- description:     	fold in an element
-- parameters:      	the element oElement and the boolean bClearData
-- return:              the ondisplayed element
-- name/date/action:    NA    08/04/02    created
------------------------------------------------------------------------------*/
    try{
		oElement.style.display="none";
		if (bClearData){
			oElement.innerHTML="";
		}
	} catch(e){
        var sError= "bad!\n"  + e.number + "\n" + e.description;
    }
}


//------------------------------------------------------------------------------
function toggleFoldout(strDiv,bClearDataAtFoldin,sHTMLForFoldout){
/*------------------------------------------------------------------------------
-- description:     	foldout or foldin fragments of an html
-- parameters:      	the element, and the boolean bClearDataAtFoldin and the string sHTMLForFoldout
-- return:              element/ foldout or foldin function
-- name/date/action:    NA    08/04/02    created
--                            14/09/06    modified
------------------------------------------------------------------------------*/
    try{        
        oDiv = document.getElementById(strDiv);
        
        if (oDiv.style.display=="none") {
			foldOut(oDiv,sHTMLForFoldout);
		} else {
			foldIn(oDiv,bClearDataAtFoldin);
		}
		
	} catch(e){
        var sError= "bad!\n"  + e.number + "\n" + e.description;
    }
}
