function show_hide(id){ document.getElementById(id).style.display = (document.getElementById(id).style.display == 'block') ? 'none':'block'; }
or
function show_hide_b(id,disp){ document.getElementById(id).style.display = disp; }
then you just call the functions like this: * show_hide('something'); // to use the 1st function * show_hide_b('something','block'); // to use the 2nd function w/ display:block * show_hide_b('something','none');// to use the 2nd function w/ display:none
document.getElementById(id).style.display = (document.getElementById(id).style.display == 'block') ? 'none':'block';
}
or
function show_hide_b(id,disp){
document.getElementById(id).style.display = disp;
}
then you just call the functions like this:
* show_hide('something'); // to use the 1st function
* show_hide_b('something','block'); // to use the 2nd function w/ display:block
* show_hide_b('something','none');// to use the 2nd function w/ display:none
______________________
// a sphincter says what?
Regards,
Kumar S
GuyFromChennai.com