function getElement(id) { if (typeof(id) != 'string') return id; if (document.getElementById) { return document.getElementById(id); } else if (document.all) { return document.all[id]; } else { return null; } } var link = getElement('bclink'); var html = getElement('bccount'); if (link != null && html != null) { link.href = 'http://www.blogcounter.de/'; html.innerHTML = 'test'; html.innerHTML = 'BlogCounter.de - kostenloser Counter für Weblogs'; }