﻿function getLotsByPhaseidWS(phsid) {
    var wsrvpath = "../webservice/WebService.asmx";
    var wsrvmothod = "GetLotByPhaseJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
        { "phaseid": phsid },
        getPhaseLotData, OnFailed, "Something Wrong", 10000);
}
function getPageContents() {

    var wsrvpath = "../webservice/WebService.asmx";

    var wsrvmothod = "GetPContentJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
        null,
        getPageContentJson, OnFailed, "Something Wrong", 10000);
}
function getMapMarkers(statuscode) {
    var wsrvpath = "../webservice/WebService.asmx";

    var wsrvmothod = "GetAmenityJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       {"status":statuscode},
        SayHello, OnFailed, "Something Wrong", 10000);
   }

   var gmap = null;
   function addmarkerObjs(map) {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetAmenityJSON";
      
       gmap = map;
       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       { "status": 0 },
        AddMapMarkers, OnFailed, "Something Wrong", 10000);
   }

   function AddMapMarkers(data) { 
       var markerobjs = eval(data);
       
       for (var i = 0; i < markerobjs.length; i++) {
           var marker = markerobjs[i];
           addProject(gmap, marker.Latitude, marker.Longitude, marker.Marker, marker.Code, 43, 44);
       }
   }
   

   function getCommunityGalleryPhotos() {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetPhotoJSON";

       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        AddThumbs, OnFailed, "Something Wrong", 10000);
   }
   function getBuilderGalleryPhotos() {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetBuilderPhotoJSON";

       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        AddBuilderThumbs, OnFailed, "Something Wrong", 10000);
   }
   function getProductTypes() {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetProductJSON";

       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
        null,
        getProductObjects, OnFailed, "Something Wrong", 10000);
   }
   function getHomeBuilders() {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetBuilderJSON";
   
       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
        null,
        getBuilderObjects, OnFailed, "Something Wrong", 10000);
   }
   function getHomeModels() {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetHomePlanJSON";

       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
        null,
        getModelObjects, OnFailed, "Something Wrong", 10000);
   } 
function OnFailed() {
  //  alert("Error: Null Objects");
}

