function getObject(obj) { 
    var theObj 
    if (document.layers) { 
        if (typeof obj == "string") { 
            return document.layers[obj] 
        } else { 
            return obj 
        } 
    } 
    if (document.all) { 
        if (typeof obj == "string") { 
           if(document.all(obj)!=null) return document.all(obj).style ; 
           else return null; 
        } else { 
            return obj.style 
        } 
    } 
    if (document.getElementById) { 
        if (typeof obj == "string") { 
            return document.getElementById(obj).style 
        } else { 
            return obj.style 
        } 
    } 
    return null 
} 

// Отображение объекта 
function show(obj) { 
    var theObj = getObject(obj); 
    theObj.visibility = "visible" 
    theObj.display = "block"      
} 
// Скрытие объекта 
function hide(obj) 
{ 
    var theObj = getObject(obj) 
    theObj.visibility = "hidden"; 
    theObj.display = "none"          
}  
