|
|
Line 2: |
Line 2: |
| <head><title>clickhiding></title> | | <head><title>clickhiding></title> |
| <script language=javascript type='text/javascript'> | | <script language=javascript type='text/javascript'> |
- | <!--
| |
- | function showDiv(pass) {
| |
- | var divs = document.getElementsByTagName('div');
| |
- | for(i=0;i<divs.length;i++){
| |
- | if(divs[i].id.match(pass)){//if they are 'see' divs
| |
- | if (document.getElementById) // DOM3 = IE5, NS6
| |
- | divs[i].style.visibility="visible";// show/hide
| |
- | else
| |
- | if (document.layers) // Netscape 4
| |
- | document.layers[divs[i]].display = 'visible';
| |
- | else // IE 4
| |
- | document.all.divs[i].visibility = 'visible';
| |
- | } if(divs[i].id.match('*\d')){
| |
- | if (document.getElementById)
| |
- | divs[i].style.visibility="hidden";
| |
- | else
| |
- | if (document.layers) // Netscape 4
| |
- | document.divs[i].visibility = 'hidden';
| |
- | else // IE 4
| |
- | document.all.divs[i].visibility = 'hidden';
| |
- | }
| |
- | }
| |
- | }-->
| |
| | | |
- | function show(id){ | + | function showhide(id, visibility) { |
- | if (document.getElementById){
| + | document.getElementById(id).style.display = visibility; |
- | obj = document.getElementById(id);
| + | |
- | obj.style.display = "";
| + | |
- | }
| + | |
- | }
| + | |
- | function hide(id){
| + | |
- | if (document.getElementById){
| + | |
- | obj = document.getElementById(id);
| + | |
- | obj.style.display = "none";
| + | |
- | }
| + | |
| } | | } |
| | | |