var openPicture ="images/minus.gif";
var closePicture ="images/plus.gif";


// Changes the class of the given tag from classa to classb or back
 function classoggle(tag, classa, classb) {
     if (tag.className==classa){
         tag.className=classb;
     } else {
         tag.className=classa;
     }
 }
 
 // Toggles the class name of the indexed div between 'hideMe' and 'showMe'
 // and toggles the src attribute of the referenced img tag between openPicture and closePicture
 function visoggle(divID, img) {
     var d = document.getElementById(divID);
     classoggle(d, 'hideMe', 'showMe');
     if (img!=undefined && img != 'null') 
     	{
     	var source = img.src;
        //if (img.src == closePicture)
        if (source.indexOf(closePicture) > 0)
        	{
            img.src = openPicture; 
            } 
        else 
        	{
            img.src = closePicture;
            }
     	}
 	}

 function show(divID)
 	{
 	var d = document.getElementById(divID);
 	d.className = "showMe"; 		
 	}
 	
 function hide(divID)
 	{
 	var d = document.getElementById(divID);
 	d.className = "hideMe"; 		
 	}
 