All pastes #481591 Raw Edit

Miscellany

public text v1 · immutable
#481591 ·published 2007-05-10 22:09 UTC
rendered paste body
// the vbs



sub changeStateClass(thechange) 
	
	dim rootobj document.getElementsByTagName("*")
	dim inc=0 
        dim tempinc=0
	dim rootlength = rootobj.length 
	for i=1 to rootlength
                if rootobj(i).className == thechange then tempinc++
        next

        dim ElementByClass(tempinc)
        for i=1 to rootlength
		if rootobj(i).className==the change then
                     ElementByClass(inc)=rootobj(i) 
                     inc++
                end if
	next 


	
	inc = 0
	
	do while ElementByClass(inc)
		if ElementByClass(inc).style.display == "none" then
                     ElementByClass(inc).style.display = ''
                else 
                     ElementByClass(inc).style.display = "none"
                end if
		inc++;
	loop
end sub