kindly see the visibility sample up here ,
// Get references to page elements and create a link dynamically var intro = document.getElementById('intro'), dets = document.getElementById('details'), a = document.createElement('a'), toggle; <- here i cant figure why they declared toggle ... !!!
the whole example in jsfiddle is an example showing how we can use the visibility css proporty.....