var lastopen;

function ldorder(elem) 
{
	if( lastopen && lastopen != elem )
	{
		lastopen = document.getElementById(lastopen);
		lastopen.style.visibility = "hidden";
	}
	lastopen = elem;

	elem = document.getElementById(elem);
	(elem.style.visibility && elem.style.visibility == "visible") ? elem.style.visibility = "hidden" : elem.style.visibility = "visible";
}

function loadpos(textselect) 
{ 
	if (window.getSelection) 
	{ 
		textselect.c = window.getSelection(); 
	} 
	else if (document.getSelection) 
	{ 
		textselect.c = document.getSelection(); 
	} 
	else 
	{ 
		textselect.c=document.selection.createRange(); 
	} 
} 

