﻿// JScript File
function showFloorPlan(){
  var propid = showFloorPlan.arguments[0];
  document.getElementById('loading_screen').style.display="block";
  returnValue = window.showModalDialog('CFXFloorPlan' + propid + '.aspx', null, 'scroll:yes; dialogWidth:600px; dialogHeight:700px; resizable:yes; status:no; center:yes');
  document.getElementById('loading_screen').style.display="none";
}

function showEnlargedImage(){
  var propid = showEnlargedImage.arguments[0];
  document.getElementById('loading_screen').style.display="block";
  returnValue = window.showModalDialog('CFXPropertyImage.aspx?propid=' + propid, null, 'dialogWidth:600px; dialogHeight:700px; resizable:no; scroll:off; status:no; center:yes');
  document.getElementById('loading_screen').style.display="none";
}

function showFloorPlanCPA(){
  var propid = showFloorPlanCPA.arguments[0];
  document.getElementById('loading_screen').style.display="block";
  returnValue = window.showModalDialog('CPAFloorPlan' + propid + '.aspx', null, 'scroll:yes; dialogWidth:600px; dialogHeight:700px; resizable:yes; status:no; center:yes');
  document.getElementById('loading_screen').style.display="none";
}

function showEnlargedImageCPA(){
  var propid = showEnlargedImageCPA.arguments[0];
  document.getElementById('loading_screen').style.display="block";
  returnValue = window.showModalDialog('CPAPropertyImage.aspx?propid=' + propid, null, 'dialogWidth:600px; dialogHeight:700px; resizable:no; scroll:off; status:no; center:yes');
  document.getElementById('loading_screen').style.display="none";
}

function showCFXPortfolioBreakdown(){
 //returnValue = window.showModalDialog('CFXPortfolioBreakdown.aspx', null, ' scroll:yes; dialogWidth:1000px; dialogHeight:980px; resizable:yes; status:no; center:yes');
 returnValue = window.open('CFXPortfolioBreakdown.aspx', 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=980,width=1000');
 }
 
 function showCFXLeaseExpiry(){
  //returnValue = window.showModalDialog('CFXLeaseExpiry.aspx', null, ' scroll:yes; dialogWidth:1000px; dialogHeight:980px; resizable:yes; status:no; center:yes');
  returnValue = window.open('CFXLeaseExpiry.aspx', 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=980,width=1000');
  }
  
  function showCPAPortfolioBreakdown(){
 //returnValue = window.showModalDialog('CPAPortfolioBreakdown.aspx', null, ' scroll:yes; dialogWidth:1000px; dialogHeight:980px; resizable:yes; status:no; center:yes');
 returnValue = window.open('CPAPortfolioBreakdown.aspx', 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=980,width=1000');
 }
 
 function showCPALeaseExpiry(){
  //returnValue = window.showModalDialog('CPALeaseExpiry.aspx', null, '  scroll:yes; dialogWidth:1000px; dialogHeight:980px; resizable:yes; status:no; center:yes');
  returnValue = window.open('CPALeaseExpiry.aspx', 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=980,width=1000');
  }
  
  function showEmailToFriendCFX() {
   var property = showEmailToFriendCFX.arguments[0];
   //returnValue = window.showModalDialog('CFXEmail.aspx?property=' + property , null, 'dialogWidth:500px; dialogHeight:700px; resizable:no; scroll:off; status:no; center:yes');
   returnValue = window.open('CFXEmail.aspx?property=' + property , null, 'width=510,height=700,dependent=yes,menubar=no,resizable=no,directories=no,toolbar=no,location=no,status=yes,scrollbars=no');   
   }
   
   function showEmailToFriendCPA() {
   var property = showEmailToFriendCPA.arguments[0];
   //returnValue = window.showModalDialog('CFXEmail.aspx?property=' + property , null, 'dialogWidth:500px; dialogHeight:700px; resizable:no; scroll:off; status:no; center:yes');
   returnValue = window.open('CPAEmail.aspx?property=' + property , null, 'width=510,height=700,dependent=yes,menubar=no,resizable=no,directories=no,toolbar=no,location=no,status=yes,scrollbars=no');   
   }
   
   function printClick(){
   var id = printClick.arguments[0];
   returnValue = window.open('CFXPrint.aspx?id=' + id , 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=600,width=800');   
 }
 
 function printClickCPA(){
   var id = printClickCPA.arguments[0];
   returnValue = window.open('CPAPrint.aspx?id=' + id , 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=600,width=800');   
 }
 
 function printClickPropertyCFX(){
   var id = printClickPropertyCFX.arguments[0];
   returnValue = window.open('CFXPropertyPrint.aspx?propid=' + id , 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=600,width=800');   
 }
 
 function printClickPropertyCFXOffice(){
   var id = printClickPropertyCFXOffice.arguments[0];
   returnValue = window.open('CFXPropertyPrintOffice.aspx?propid=' + id , 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=600,width=800');   
 }
 
 function printClickPropertyCPA(){
   var id = printClickPropertyCPA.arguments[0];
   returnValue = window.open('CPAPropertyPrintNew.aspx?propid=' + id , 'nddwindow','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1,height=600,width=800');   
 }
 
 
  
function openmap(atLoc, displayAddress)
{
  var l=(screen.width-1000)/2; 
  var t=(screen.height-600)/2; 
  
  //document.getElementById('loading_screen').style.display="block";
  //returnValue = window.open('CPACFXMap.aspx?address='+atLoc,'_map','width=900,height=538,left='+ l +',top='+ t +',dependent=yes,menubar=no,resizable=no,directories=no,toolbar=no,location=no,status=yes,scrollbars=no'); 
  returnValue = window.open('CPACFXMap.aspx?address='+atLoc + '&display='+displayAddress,'_map','width=900,height=538,left='+ l +',top='+ t +',dependent=yes,menubar=no,resizable=no,directories=no,toolbar=no,location=no,status=yes,scrollbars=no'); 
  //returnValue = window.showModalDialog('CPACFXMap.aspx?address=' + atLoc, null, 'dialogWidth:900px; dialogHeight:538px; resizable:no; scroll:off; status:no; center:yes');
  //document.getElementById('loading_screen').style.display="none";
}



function showMandatoryFieldWarning()
{
    alert('Complete all mandatory fields');
}
