function open_frame ( type_frame , width , height , e , txt )
	{
	//my_form = document.to_frame;
	my_form = getElement ( "to_frame" );
	my_form.popup_action.value = type_frame;
	my_form.popup_caption.value = txt;
	my_form.submit();

	//my_fr = document.all["my_frame"];
	my_fr = getElement ( "my_frame" );
	//my_fr.style.visibility = "visible";
	my_fr.style.width = width;
	my_fr.style.height = height;

	//if ( event || e )
	if ( e )
		{
	        mouseX = (ns4||ns5) ? e.pageX : window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5) ? e.pageY : window.event.clientY + document.body.scrollTop;
		offY_popup = -150;
		offX_popup = - width - 50;

		top_sz = (ns4) ? mouseY + offY_popup : mouseY + offY_popup + "px";
		top_sz = top_sz < 0 ? 100 : top_sz;

		left_sz = (ns4) ? mouseX + offX_popup : mouseX + offX_popup;
		left_sz = left_sz < 0 ? 0 : left_sz;
		if ( left_sz == 0 ) left_sz = 300;
		}
	else
		{
		left_sz = parseInt ( ( screen.availWidth / 2 ) - ( width / 2 ) );
		top_sz = parseInt ( ( screen.availHeight / 2 ) - ( height / 2 ) ) - 100;
		}

	my_fr.style.top = top_sz;
	my_fr.style.left = left_sz;
	}