rem: theCheckbox = theID.id+"checkbox"; testLink = theID.id+"testsLink"; optsLink = theID.id+"optionsLink"; permLink = theID.id+"permsLink"; testPanel = theID.id+"tests"; optsPanel = theID.id+"options"; permPanel = theID.id+"perms"; 
add: var theCheckbox = theID.id+"checkbox"; var testLink = theID.id+"testsLink"; var optsLink = theID.id+"optionsLink"; var permLink = theID.id+"permsLink"; var testPanel = theID.id+"tests"; var optsPanel = theID.id+"options"; var permPanel = theID.id+"perms"; 
context: function checkToggle(theID) {    theCheckbox = theID.id+"checkbox";    testLink = theID.id+"testsLink";    optsLink = theID.id+"optionsLink";    permLink = theID.id+"permsLink";    testPanel = theID.id+"tests";    optsPanel = theID.id+"options";    permPanel = theID.id+"perms";	if ($(theCheckbox).checked) {		$(theID).className = "jive-gateway";        $(testLink).style.display = 'block';        $(optsLink).style.display = 'block';		$(permLink).style.display = 'block';		/* the below doesn't work right in IE, work on later */		//$(optsLink).setAttribute('onclick',"togglePanel($(optsPanel),$(permPanel))");		//$(permLink).setAttribute('onclick',"togglePanel($(permPanel),$(optsPanel))");	} else {		$(theID).className = "jive-gateway jive-gatewayDisabled";		/* the below doesn't work right in IE, work on later */		//$(optsLink).removeAttribute('onclick');		//$(permLink).removeAttribute('onclick');        $(testLink).style.display = 'none';        $(optsLink).style.display = 'none';		$(permLink).style.display = 'none';		/* fix the panels so they roll up and the buttons go back to default states */        $(testLink).className = "";        $(optsLink).className = "";		$(permLink).className = "";		if ($(optsPanel).style.display != 'none') {			Effect.toggle($(optsPanel), 'slide', {duration: .1});		} else if ($(permPanel).style.display != 'none') {			Effect.toggle($(permPanel), 'slide', {duration: .1});        } else if ($(testPanel).style.display != 'none') {            Effect.toggle($(testPanel), 'slide', {duration: .1});        }    }}
meta: 4272	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4272/b2f655c40183a499c41f6e770dc3ac6dd82f7d74/gateways.js/buggy/src/plugins/gateway/src/web/scripts/gateways.js