Project

General

Profile

1
function toggle_viewers() {
2
	if(document.settings.visibility.value == 'private' || document.settings.visibility.value == 'registered') {
3
		document.getElementById('allowed_viewers').style.display = 'block';
4
	} else {
5
		document.getElementById('allowed_viewers').style.display = 'none';
6
	}
7
}
8
var lastselectedindex = new Array();
9

    
10
function disabled_hack_for_ie(sel) {
11
	var sels = document.getElementsByTagName("select");
12
	var i;
13
	var sel_num_in_doc = 0;
14
	for (i = 0; i <sels.length; i++) {
15
		if (sel == sels[i]) {
16
			sel_num_in_doc = i;
17
		}
18
	}
19
	// never true for browsers that support option.disabled
20
	if (sel.options[sel.selectedIndex].disabled) {
21
		sel.selectedIndex = lastselectedindex[sel_num_in_doc];
22
	} else {
23
		lastselectedindex[sel_num_in_doc] = sel.selectedIndex;
24
	}
25
	return true;
26
}
(13-13/21)