function toggle_display(e) {

	o = document.getElementById(e);

	if(!o)

		o = e;

	if(o.style.display == '') {	

		o.style.display = 'none';

		return false;

	} else {

		o.style.display = '';

		return true;

	}

}



function toggle_class(ptr, c) {

	v = ptr.className;	

	

	if(v.indexOf(c) < 0)

		add_class(ptr, c);

	else

		remove_class(ptr, c);

}



function add_class(ptr, c) {

	v = ptr.className;	

	

	if(v.indexOf(c) < 0)

		ptr.className += ' ' + c;	

}



function remove_class(ptr, c) {

	v = ptr.className;

	

	if(v.indexOf(c) > -1) {

		f = c;

		v = v.replace(f,'');

		ptr.className = v;

	}

}



hl_objs = [];

function toggle_highlight(obj, cat, c) {

	if(document.getElementById(obj))

		n_obj = document.getElementById(obj);

	else

		n_obj = obj;

		

	if(hl_objs[cat])

		add_class(hl_objs[cat], c);

		

	add_class(n_obj, c);

	hl_objs[cat] = n_obj;

}



function fill_junk(f) {

	frm = document.forms[f];

	for(x = 0; x < frm.elements.length; x++) {

		e = frm.elements[x];

		if(e.type == 'text')

			e.value = '1';

		if(e.type == 'checkbox' || e.type == 'radio')

			e.checked = true;

	}

	

	frm = document.getElementsByTagName('select');

	for(x = 0; x < frm.length; x++)

		frm[x].selectedIndex = 1;

}



function find_pos(obj) {

	var curleft = curtop = 0;

	if (obj.offsetParent) {

		curleft = obj.offsetLeft

		curtop = obj.offsetTop

		while (obj = obj.offsetParent) {

			curleft += obj.offsetLeft

			curtop += 