/* Local JS functions */

function warn_education(){
	var v = document.ACMEForm.education.options[document.ACMEForm.education.selectedIndex].value;
	
	alert("Education validator sample.");	
}

function VMC_updateSelect(d,o,m) {
	var i,s,b;
	if(typeof o == 'string') {
		var z=o;
	} else {
		var z=o.options[o.selectedIndex].value;
	}	
	var l=document.getElementById(d);
	l.length=0;l.options[0]=new Option('-1',m);
	b=(z!='nill')?eval('C'+z+'_items'):0;
	for(i=0;i<b.length;i++){ 
		s=b[i].split("|");
		l.options[i]=new Option(s[1],s[0]);
		if(s[0] == "-2"){l.options[i].style.backgroundColor ="555555";l.options[i].style.color="FFFFFF";}
	}
	l.selectedIndex=0;return;
}

function toggle(set, id) {
	if (set in currentToggles)
		document.getElementById(currentToggles[set]).style.display = "none";
	document.getElementById(id).style.display = "block";
	currentToggles[set] = id;
}
var currentToggles = {};

function toggleSame(id) {
	var o = document.getElementById(id);
	if(o != null) {
		if (o.style.display == 'block') {
			hide(id);
		} else {
			show(id);
		}
	}
}

function show(n) {
	document.getElementById(n).style.display = "block";
}

function hide(n) {
	document.getElementById(n).style.display = "none";
}
