function kontrol(){
!actim || actim.closed ? alert('pencere açık değil') : alert('pencere açık');

}