//===============================================================================
// DHTML functions, to create a common DHTML between browsers
//===============================================================================

//---------------------------------------------------------------------------------
// getBrowser - returns the browser type and version
// getObject  - gets an object id, returns a reference to the DHTML object
// getStyle   - gets an object id, returns a reference to the DHTML object's style
//---------------------------------------------------------------------------------

function getBrowser() {
    if (document.getElementById) return ( "W3C" );       
    else if (document.all)       return ( "IE" );    //4 or 5
    else if (document.layers)    return ( "N4" );
    else                         return ( "other" );
}

//---------------------------------------------------------------------------------
function getObj(objID) {
    var browser = getBrowser();
    if (browser == "W3C")        return( document.getElementById(objID) ); 
    if (browser == "IE")         return( document.all[objID]            ); 
    if (browser == "N4")         return( document.layers[objID]         ); 
}

//---------------------------------------------------------------------------------
function getStyle(objID) {
    var browser = getBrowser();
    if (browser == "W3C")        return( document.getElementById(objID).style ); 
    if (browser == "IE")         return( document.all[objID].style            ); 
    if (browser == "N4")         return( document.layers[objID]               ); 
}

//---------------------------------------------------------------------------------


function showBox(id) {

   var box = new Array("box1");

    for (i = 0; i < box.length; i++) {

        objStyle = getStyle(box[i]);

	if (box[i] == id)                 		
	    objStyle.visibility = 'visible';
	else 
	    objStyle.visibility = 'hidden';
    }
}	
	