Подскажите что значит этот скрипт
Код:
<script type="text/javascript">
function getElementComputedStyle(elem, prop) {
// external stylesheet for Mozilla, Opera 7+ and Safari 1.3+
if (document.defaultView && document.defaultView.getComputedStyle) {
if (prop.match(/[A-Z]/)) prop = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
return document.defaultView.getComputedStyle(elem, "").getPropertyValue(prop);
}
// external stylesheet for Explorer and Opera 9
if (elem.currentStyle) {
var i;
while ((i=prop.indexOf("-"))!=-1) prop = prop.substr(0, i) + prop.substr(i+1,1).toUpperCase() + prop.substr(i+2);
return elem.currentStyle[prop];
}
return "";
}
function fixVisibility(e) {
if (getElementComputedStyle(document.getElementById(e), "display") == "none")
document.getElementById(e).style.display = "block";
if (getElementComputedStyle(document.getElementById(e), "visibility") == "hidden")
document.getElementById(e).style.visibility = "visible";
}
fixVisibility('pun-title');
fixVisibility('title-logo-table');
fixVisibility('title-logo-tdr');
</script>
Что он делает? Принцип его работы я не понял. Вижу, что-то с лого связанно и с браузерами, но не дошло еще. Расскажите, кто знает, пожалуйста.