<!-- n o n - j a v a s c r i p t   c o m p a t i b l e   b r o w s e r s 
//-----------------------poping window ---------------------------------
var winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,width=660,height=505,copyhistory=1,"
var winopts2 = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,width=502,height=663,copyhistory=1,"
var smallwindow = null;

function historywin(filename) {
     if (parseInt(navigator.appVersion) < 4) {
        if (smallwindow != null) smallwindow.close();
    }   
  if (filename.indexOf('_b.jpg')>0) {
  	smallwindow = window.open('imgfile.html?'+filename,"imagwin",winopts);
	} else {
	smallwindow = window.open('imgfile.html?'+filename,"imagwin",winopts2);
	}
  
}  
/*  
  if( navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1) smallwindow = window.open(filename,winname,winopts)

  if( navigator.appVersion.indexOf("MSIE") == -1 )   smallwindow.mainWin = this;
  WindowFocus(); */


function WindowFocus(){
  
   if( navigator.appVersion.indexOf("2.") == -1 &&  navigator.appVersion.indexOf("MSIE") == -1 )
       smallwindow.focus();

}
<!-- n o n - j a v a s c r i p t   c o m p a t i b l e   b r o w s e r s  -  k o n e c -->
//-----------------------------------poping window ---------------------------------------
