// $(function() { 
//         $("button[rel]").overlay({expose: '#000', effect: 'apple'}); 
//        }); 
//        

$(function() {         
         
    // positions for each overlay 
   //var positions = [ [0,     530],[400, 20],[400, 530], [0,     20]     ];       

    // setup triggers 
    $("button[rel]").each(function(i) { 
        $(this).overlay({ 
 
            // common configuration for each overlay 
            oneInstance: false,  
            closeOnClick: false,  
              
            // setup custom finish position 
            //top: positions[i][0], 
            //left: positions[i][1], 
            
            //top: 40, 
            //left: 250, 
             
             
             
             expose: {

		// you might also consider a "transparent" color for the mask
		color: '#000'},


            // use apple effect 
            effect: 'apple' 
             
        });             
    }); 
     
});

function OverlayDivOpen(pdfFile,printDiv,overlayWidth,overlayHeight)
{

    var overlaycontentWidth=overlayWidth-50;
    var overlaycontentHeight=overlayHeight-122;

    document.write("<div class='overlay' style='width:"+ overlayWidth +"px';height:"+ overlayHeight +"px;'>");
 

            document.write("<div  class='divHeader' >");
            document.write("<div class='divLogo'>  ");
            
            document.write("<div style='float:right;'>");
                document.write("<span style='float:right;'>");
                document.write("<a href='#' class='close'><img alt='Close'  src='../images/overlay/PopUp_Close.gif' class='closeButton' /></a>");
                document.write("</span >");
                document.write("<span style='float:right;margin-top:75px;padding-bottom:3px;'>");
                document.write("<a href='#' onclick=Clickheretoprint('"+printDiv+"') style='background:url(../images/overlay/PopUp_print.gif) no-repeat;padding-left:20px;'>Print Page</a> ");            
                   document.write("<a  href='#' onclick=window.open('"+pdfFile+"') style='background:url(../images/overlay/PopUp_pdf.gif) no-repeat;padding-left:20px;'>Download PDF</a>");
                document.write("</span>");
            document.write("</div>");    
            document.write("</div>");    
            
        document.write("</div>");        
        
        //overlay content div
        document.write("<div style='padding:15px 25px;overflow: auto;height:"+ overlaycontentHeight +"px;width:"+ overlaycontentWidth +"px'>");            
 
}
      
function OverlayDivClose()
{
        document.write("</div>");   //closing  content div..
        document.write("</div>");  //closing  overlay div..
}



    
function btnmouseover(obj,imgurl)
{
        obj.style.backgroundImage="url('"+imgurl+"')";
        //obj.style.cursor='hand';
        obj.style.cursor='pointer';
                        
}
function btnmouseout(obj,imgurl)
{
       obj.style.backgroundImage="url('"+imgurl+"')";
       //obj.style.cursor='hand';
       obj.style.cursor='pointer';
}
function Clickheretoprint(PrintDiv)
{ 
      var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
          //disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25"; 
      var content_vlue = document.getElementById(PrintDiv).innerHTML; 
      
      var docprint=window.open("","");//,disp_setting); 
       docprint.document.open(); 
       docprint.document.write("<html><head>");               
       docprint.document.write("<title></title>"); 
       docprint.document.write('</head><body onLoad="self.print()">');          
       docprint.document.write(content_vlue);          
       docprint.document.write('</body></html>'); 
       docprint.document.close(); 
       docprint.focus(); 
}