﻿// PRINTING routines

    function printDocument(type, id){  
      if (type.toString() == "1")                
        queryString = "?photoID=" + currentIndex.toString() + "&propertyID=" + id + "&printType=1";      
      else
        queryString = "?photoID=" + currentIndex.toString() + "&propertyID=" + id + "&printType=2";                  
      var obj_calwindow = window.open(ApplicationPath + "/Content/Properties/Common/PrintDocument.aspx" + queryString, "", "height=600,width=800,status=no,noresizable,toolbar=no,menubar=no,location=no, scrollbars=yes");
      obj_calwindow.opener = window;
      obj_calwindow.focus();
    } 
            
    function changePrintToDialog(){
        var obj = document.getElementById("printDiv");
        if (obj){
            if (obj.style.visibility == "visible")
                obj.style.visibility = "hidden";
            else
                obj.style.visibility = "visible";
        }
    }            
            
    function printToVisible(){
      var obj = document.getElementById("printDiv");
      if (obj){
        obj.style.visibility = "visible";
        clearTimeout(p);
      }
      sendToHidden();
    }
    
    function printToHidden(){    
        var obj = document.getElementById("printDiv");
        if (obj)
            obj.style.visibility = "hidden";
    }
