﻿
function getAllPageContents() {
    var wsrvpath = "../webservice/WebService.asmx";
    var wsrvmothod = "GetPageContentJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        getPageContentObjs, OnFailed, "Error: AllPageContent", 10000);
}
function getAllCommunities() {
    var wsrvpath = "../webservice/WebService.asmx";

    var wsrvmothod = "GetCommunityJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        getCommunityObjs, OnFailed, "Something Wrong", 10000);
}
function getCharities() {
    var wsrvpath = "../webservice/WebService.asmx";

    var wsrvmothod = "GetCharitiesJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        getCharityObjs, OnFailed, "Something Wrong", 10000);
}
function getAmenities() {
    var wsrvpath = "../webservice/WebService.asmx";

    var wsrvmothod = "GetAmenityJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        getAmenityObjs, OnFailed, "Something Wrong", 10000);
}


function getAllSalesInfo() {

    var wsrvpath = "../webservice/WebService.asmx";
    var wsrvmothod = "GetSalesJSON";

    Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        getSalesObjs, 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 getGalleryPhotos() {
       var wsrvpath = "../webservice/WebService.asmx";
       var wsrvmothod = "GetPhotoJSON";

       Sys.Net.WebServiceProxy.invoke(wsrvpath,
        wsrvmothod, true,
       null,
        getPhotoObjs, 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" +Error);
}

