include ~CS_functions.php~;

$CaseId=$_SESSION[`CaseId`];

echo `<script language=javascript>`;
echo ~
~;
echo `function BackUp()`;
echo `{`;
echo `//  alert(~in BackUp~);
`;
$fmt=ShowQueryResultScalar(~select fFormat from Forms where fID=`TEFAPdetail`~);
echo ~window.parent.SetForm(`TEFAPdetail`,`$fmt`);~;
echo `}`;

echo ~
~;

echo `function SetInstance(inst)`;
echo `{`;
echo `//  alert(~in prelogic SetInstance~);
`;
echo ~  window.parent.SetInstanceCaseForm(inst,~.$CaseId.~,`TEFAPreceipt`,`&Ftmp=&Ctmp=`);~;
//echo ~  window.parent.parent.SetInstanceCaseForm(inst,~.$CaseId.~,`TEFAPreceipt`,`&Ftmp=&Ctmp=`);~;
echo `}`;

echo ~
~;

echo `</script>`;
$_SESSION[`Instance`]=1;
