/* 

This function adds highslide onclick attribute to images with class='highslide'
in DIV with id 'inhoud'

Include this script in Head-section and put following code at end of Body-section:

<script type="text/javascript">
      addHighSlideAttribute();
</script>

*/

function addHighSlideAttribute() {
    var isIE = (document.documentElement.getAttribute('style') ==
                document.documentElement.style);
    var anchors = document.getElementById('inhoud').getElementsByTagName('a');
    for (var i = 0, len = anchors.length; i < len; i++) {
        if (anchors[i].className == 'highslide') {
            if (!anchors[i].getAttribute('onclick')) {
                isIE ? anchors[i].setAttribute('onclick', new Function('return hs.expand(this)')) :
                    anchors[i].setAttribute('onclick','return hs.expand(this)');
                isIE ? anchors[i].setAttribute('onkeypress', new Function('return hs.expand(this)')) :
                    anchors[i].setAttribute('onkeypress','return hs.expand(this)');
            }
        }
    }
}