/* Gets the object
*/
function get_object(o)
{
	if(document.all)
	{
		return document.all[o];
	}
	else if(document.getElementById)
	{
		return document.getElementById(o);
	}
}

/* toggle displays (for exapmle, short and full texts)
*/
function toggle_display(o1,o2,txt)
{
	if(txt)
	{
		text_obj=get_object(o1 + "_txt");

		if(text_obj.txtnr==2) //innerHTML.toLowerCase()==txt.toLowerCase())
		{
			text_obj.innerHTML=text_obj.oldtext;
			text_obj.txtnr=1;
		}
		else
		{
			text_obj.oldtext=text_obj.innerHTML;
			text_obj.innerHTML=txt;
			text_obj.txtnr=2;
		}
	}

	o1=get_object(o1);
	if(o2) o2=get_object(o2);

	if(o1.style.display=="inline")
	{
		o1.style.display="none";
		if(o2) o2.style.display="inline";
	}
	else
	{
		if(o2) o2.style.display="none";
		o1.style.display="inline";
	}

	//return true;
}

/* toggle displays (for exapmle, short and full texts)
*/
function toggle_div(o1)
{
	o1=get_object(o1);

	if(o1.style.display=="inline")
	{
		o1.style.display="none";
	}
	else
	{
		o1.style.display="inline";
	}

	//return true;
}

/* Validation dialog
*/
function validate(text)
{
        if (text == null)
            text = "Are you sure?"

	conf = confirm(text);

	if (conf)
		return true
	else
		return false;
}

