function changeVals(id,val) {
	var e1 = document.getElementById(id);
	if (e1==null) return false;
	switch (e1.tagName) {
		case 'SELECT' 	:	for (i=0;i<e1.options.length;i++)
								if (e1.options[i].value==val)
									e1.selectedIndex = i;
							break;
		case 'INPUT'	: 	switch (e1.type) {
								case 'checkbox' : if (e1.value==val) 
													e1.checked = true;
													break;
								default :	e1.value = val;
											break;
							}
							break;
		case 'SPAN'		:
		case 'DIV'		:  e1.innerHTML = val; break;							
		default : break;
	}
	return;
}
var active_timer = null;
var active_navigation = null;

function position_left(obj) {
 if (obj.offsetParent == null) {
  return obj.offsetLeft;
 } else {
  return obj.offsetLeft + position_left(obj.offsetParent);
 }
}

function position_top(obj) {
 if (obj.offsetParent == null) {
  return obj.offsetTop;
 } else {
  return obj.offsetTop + position_top(obj.offsetParent);
 }
}

function show_navigation(nav, menu) {
 hide_navigation_total();
 if (document.getElementById(menu)==null) return false; 
 active_navigation = document.getElementById(menu);
 active_navigation.style.position = 'relative';
 active_navigation.style.top = (position_top(nav) + 26) + 'px';
 active_navigation.style.left = position_left(nav) + 'px';
 active_navigation.style.visibility = 'visible';
}

function hide_navigation(nav) {
 active_navigation = nav;
 active_timer = window.setTimeout("hide_navigation_total()", 500);
}

function hide_navigation_total() {
 if (active_navigation != null) {
  active_navigation.style.visibility = "hidden";
 }
}

function keep_navigation(menu) {
 window.clearTimeout(active_timer);
 this_menu = document.getElementById(menu);
 if (this_menu==null) return false;
 active_navigation = this_menu;
 this_menu.style.visibility = "visible";
}
function changeVals(id,val) {
var e1 = document.getElementById(id);
if (e1==null) return false;
switch (e1.tagName) {
case 'SELECT' 	:	for (i=0;i<e1.options.length;i++)
if (e1.options[i].value==val)
e1.selectedIndex = i;
break;
case 'INPUT'	: 	switch (e1.type) {
case 'checkbox' : if (e1.value==val)
e1.checked = true;
break;
default :	e1.value = val;
break;
}
break;
case 'SPAN'		:
case 'DIV'		:  e1.innerHTML = val; break;
default : break;
}
return;
}