/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function edit_pop(sa, w, h)
{
	var is_ie = false;	//HTMLArea.is_ie//dbEdit_is_ie
	if (is_ie)
	{
		var spec = "toolbar=no,menubar=no,location=no,directories=no,status=no";
	} else {
		var spec = "toolbar=no,menubar=no,personalbar=no,status=yes";
	}
	spec += ",scrollbars=no,resizable=yes";
	spec += ",width=" + w + ",height=" + h;
	window.open(sa, "edit", spec);
}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function wind_pop(sa, w, h)
{
	var is_ie = false;	//HTMLArea.is_ie//dbEdit_is_ie
	if (is_ie)
	{
		var spec = "toolbar=no,menubar=no,location=no,directories=no,status=no";
	} else {
		var spec = "toolbar=no,menubar=no,personalbar=no,status=yes";
	}
	spec += ",scrollbars=no,resizable=yes";
	spec += ",width=" + w + ",height=" + h;
	window.open(sa, "elem", spec);
}

/////////////////////////////////////////////////////////////////////////

function wind_pop_s(sa, w, h)
{
	var is_ie = false;	//HTMLArea.is_ie//dbEdit_is_ie
	if (is_ie)
	{
		var spec = "toolbar=no,menubar=no,location=no,directories=no,status=no";
	} else {
		var spec = "toolbar=no,menubar=no,personalbar=no,status=yes";
	}
	spec += ",scrollbars=yes,resizable=yes";
	spec += ",width=" + w + ",height=" + h;
	window.open(sa, "small", spec);
}

/////////////////////////////////////////////////////////////////////////

function dir_pop(sa, w, h)
{
	var is_ie = false;	//HTMLArea.is_ie//dbEdit_is_ie
	if (is_ie)
	{
		var spec = "toolbar=no,menubar=no,location=no,directories=no,status=no";
	} else {
		var spec = "toolbar=no,menubar=no,personalbar=no,status=yes";
	}
	spec += ",scrollbars=yes,resizable=yes";
	spec += ",width=" + w + ",height=" + h;
	window.open(sa, "dir", spec);
}

/////////////////////////////////////////////////////////////////////////

function dbEdit_is_ie()
{
	return is_ie = false;
}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function form_submit(form_id, act)
{
	if (form = document.getElementById(form_id))
	{
		form.method = 'post';
		form.action = act;
		form.submit();
	}
}
	
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function vis_toggle(div_var, d_var) 
{
	//alert(div_var + ':' + d_var);
	div = document.getElementById(div_var);
	if (div.className == 'UnHidden')
	{
		div.className = "Hidden";
		set_var_val(d_var, 0);
		//document.images(d_var+"plus").src = "Images/Buttons/Plus.gif";
		//document.getElementById(d_var+"sum").className = "UnHidden";
	}
	else
	{
		div.className = "UnHidden";
		set_var_val(d_var, 1);
		//document.images(d_var+"plus").src = "Images/Buttons/Minus.gif";
		//document.getElementById(d_var+"sum").className = "HIDDEN";
	}
	//alert(div.className + ':' + get_var_val(d_var));
}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function form_sub_var(d_form, d_var, d_val)
{
	//alert(d_var + ':' + d_val);
	if (elem = document.getElementById(d_var))
		elem.value = d_val;
	//alert(elem.value);
	
	if (form = document.getElementById(d_form))
		form.submit();
}
		
/////////////////////////////////////////////////////////////////////////

function set_var_val(d_var, d_val)
{
	//alert(d_val);
	if (elem = document.getElementById(d_var))
		elem.value = d_val;
	//alert(elem.value);
}
	
/////////////////////////////////////////////////////////////////////////

function get_var_val(d_var)
{
	//alert(d_val);
	if (elem = document.getElementById(d_var))
		return elem.value;
	//alert(elem.value);
}
		
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

