﻿
  
      $(document).ready(function () {
        
    
    window.onload = function (e) {
 
    // Prevent the default link behavior of navigation so we can      use the link to show the Window

 
                    var id="#modalwindow1"
     
                    // Determine browser windows dimensions. 

                   var maskHeight = $(document).height();
                   //maskHeight=parseInt(maskHeight)-10
                  // alert(maskHeight);

                   var maskWidth = $(window).width();
                //   alert(maskWidth);
                 
                 //var maskHeight = $(document).height();

                 //  var maskWidth = $(window).width();

  

                   // Set dimensions for the mask to opaque the screen when the modal      window is displayed.

                  $('#mask1').css({ 'width': maskWidth, 'height': maskHeight });

    

                    // Make the Window Opaque        

                    $('#mask1').fadeIn("fast");

                    $('#mask1').fadeTo("slow", 0.8);

    

                    //Get the window height and width

                   var winH = $(window).height();

                   var winW = $(window).width();

     

                 
     

                   // Set the Modal Window's dimensions to center in the browser window.

                   $(id).css('top', winH / 2 - $(id).height() / 2);

                    $(id).css('left', winW / 2 - $(id).width() / 2);

     // visible false=PnMIS
                    $("#PnMIS").hide();
                   // Show the Modal Window

                    $(id).fadeIn("fast");

     

 }
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 
               // Handle Close Button Click Event

             $('.window .close').click(function (e) {

                    // Cancel the link behavior

                  e.preventDefault();

   $("#PnMIS").show();

                 $('#mask1').hide();

                   $('.window').hide();

             });

   

        



         });
