1. <script type="text/javascript">
  2. function popupwindow(w, h) {
  3. var ctrl = '<%=txtDate.ClientID.Trim() %>';
  4. var ddlCtrl = document.getElementById('<%=ddlDepartment.ClientID %>');
  5. wLeft = window.screenLeft ? window.screenLeft : window.screenX;
  6. wTop = window.screenTop ? window.screenTop : window.screenY;
  7. var left = wLeft + (window.innerWidth / 2) - (w / 2);
  8. var top = wTop + (window.innerHeight / 2) - (h / 2);
  9. return window.open('frmapontcalander.aspx?ctrl=' + ctrl + '&Dept=' + ddlCtrl.value, 'Hei', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=300, top=100, left=' + left + ', screenX=' + left + ', screenY=' + top);
  10. }
  11. </script>