﻿    
    // ----------------------------------------------------------------------------------------    
    
    function Search(page) {

        GetSearchArguments();
    
        var send_data = '';
        
        send_data = "<data>";
            send_data += "<OfferType>" +    OfferType + "</OfferType>";
            send_data += "<City>" +         City + "</City>";
            send_data += "<Rayon>" +        Rayon + "</Rayon>";
            send_data += "<Street>" +       Street + "</Street>";
            send_data += "<ObjectType>" +   ObjectType + "</ObjectType>";
            send_data += "<Photo>" +        Photo + "</Photo>";
            send_data += "<SqFrom>" +       SqFrom + "</SqFrom>";
            send_data += "<SqTo>" +         SqTo + "</SqTo>";
            send_data += "<UnderType>" +    UnderType + "</UnderType>";
            send_data += "<RoomsTo>" +      RoomsTo + "</RoomsTo>";
            send_data += "<RoomsFrom>" +    RoomsFrom + "</RoomsFrom>";
            send_data += "<NotFirst>" +     NotFirst + "</NotFirst>";
            send_data += "<NotLast>" +      NotLast + "</NotLast>";
            send_data += "<PriceTo>" +      PriceTo + "</PriceTo>";
            send_data += "<PriceFrom>" +    PriceFrom + "</PriceFrom>";
            send_data += "<Currency>" +     Currency + "</Currency>";
            send_data += "<ObjectCode>" +   ObjectCode + "</ObjectCode>";
            send_data += "<PriceOrder>" + PriceOrder + "</PriceOrder>";
            send_data += "<Description>" + Description + "</Description>";
            send_data += "<Page>" +         page + "</Page>";
            send_data += "</data>";

            
        createXMLHttpRequest();
        xmlHttp.onreadystatechange = handleStateChange2;   
        xmlHttp.open("POST", "../Modules/OfferManager/ajax/RenderOfferList.ashx", true);
        xmlHttp.send(send_data);

        
    }   
    
    // ----------------------------------------------------------------------------------------

    function handleStateChange2() {

        if(xmlHttp.readyState == 4)
        {
            if(xmlHttp.status == 200)
            {
                document.getElementById('con_list').innerHTML = xmlHttp.responseText;
            }
        }
    }
    
    // ----------------------------------------------------------------------------------------
    
    
    
