--- rat/client/Attic/code.html 2001/04/20 15:13:06 1.28 +++ rat/client/Attic/code.html 2001/04/30 17:01:06 1.29 @@ -13,6 +13,7 @@ Resource Assembly Tool 01/17/01,03/03,03/05 Gerd Kortemeyer with Scott Harrison March/April 01 Scott Harrison 04/20 Gerd Kortemeyer +04/30 Scott Harrison --> @@ -75,6 +76,9 @@ var data5=new Array(1024); var inf; var srch; +var srchflag=-1; // 1 means currently open + // 0 means closed (but has been open) + // -1 means never yet opened/defined function testfunction() { inf.document.forms.resinfo.elements.t.value="ABC"; @@ -1288,8 +1292,9 @@ function infoclear() { } inf.document.writeln(''); inf.document.close(); - srchclose(); - + if (srchflag==1) { + srchclose(); + } parent.top.focus(); parent.mapout.focus(); notclear=1; @@ -1475,6 +1480,7 @@ function srchclear() { function srchclose() { if (srch && !srch.closed) { + srchflag=0; srch.close(); } } @@ -1483,6 +1489,7 @@ function srchclose() { function srchopen() { var options="scrollbars=1,resizable=1,menubar=0"; + srchflag=1; srch=open("/adm/searchcat?catalogmode=interactive","srchout",options); srch.focus(); } @@ -2496,8 +2503,6 @@ function togglemode() { function main() { if (mainrun==0) { - srchopen(); -// srchclose(); infopen(); infoclear(); load();