function toggle(id) {
    
    span = id;
    img  = "img_" + id;

    spanElement = document.getElementById(span);
    imgElement  = document.getElementById(img);

    if (spanElement){
    if (spanElement.style.display == 'none'){
    spanElement.style.display = 'block'
    imgElement.src = "links/images/close.gif";
    }else{
    spanElement.style.display = 'none'
    imgElement.src = "links/images/open.gif";
    }
  }             
}

// word Counter 1.2
function wordcounter(field, countfield, maxlimit) {  
 var words=field.value.split(/[^\w\d-]+/g); 
 for(var i=0;i<words.length;i++){ 
 if(!words[i]){ 
  words.splice(i,1); 
  i--; 
 } 
} 
//countfield.value = maxlimit - words.length; 
document.getElementById('wordcount').innerHTML = maxlimit - words.length; 
}