<script language="javascript"> var popup; testwindow=window.open("","testwindow"); if(testwindow) { popup=false; alert("PopUp Block is closed"); testwindow.close(); } else { popup=true; alert("Popup Block is open"); testwindow.close(); }</script>