/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



            var req;
            var target;
            var isIE;


	function forDropDownAndFL(tag, country, page, state, city, category, tablename, whichId){

            //var tablename = "lstpersonalstable";
            //var whichId = "PERS";
            //var category = "Personals";

                var url = "DDandFListing.jsp?country=" + escape(country) + "&state=" + escape(state) + "&city=" + escape(city) +"&tablename=" + escape(tablename) + "&whichId=" + escape(whichId) +"&category=" + escape(category);


                 //alert(url);
                initRequestForDD(url);
                req.onreadystatechange = processRequestForDD;
                req.open("GET", url, true);
                req.send(null);
          



       function initRequestForDD(url) {

                if (window.XMLHttpRequest) {
                    req = new XMLHttpRequest();
                } else if (window.ActiveXObject) {
                    isIE = true;
                    req = new ActiveXObject("Microsoft.XMLHTTP");

                }
            }


            function processRequestForDD() {
                if (req.readyState == 4) {

                  if (req.status == 200) {

                    //document.getElementById("hello").innerHTML=req.responseText;

          //alert("message");
          
          if(category=="Personals")
              {
                document.getElementById("PERS").innerHTML=req.responseText;
                updatePersonalsListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Automobile")
              {
                document.getElementById("AUTO").innerHTML=req.responseText;
                updateAutomobileListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Matrimonial")
              {
                document.getElementById("MATR").innerHTML=req.responseText;
                updateListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Real Estate")
              {
                document.getElementById("REAL").innerHTML=req.responseText;
                updateRealestateListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="For Sale")
              {
                document.getElementById("FORS").innerHTML=req.responseText;
                updateForsaleListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Resume")
              {
                document.getElementById("RESU").innerHTML=req.responseText;
                updateResumeListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Services")
              {
                document.getElementById("SERV").innerHTML=req.responseText;
                updateServicesListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Wanted")
              {
                document.getElementById("WANT").innerHTML=req.responseText;
                updateWantedListingPlaceHolder(tag, country, page, state, city);
              }
          if(category=="Jobs")
              {
                document.getElementById("JOBS").innerHTML=req.responseText;
                updateJobsListingPlaceHolder(tag, country, page, state, city);
              }
       //updatePersonalsListingPlaceHolder(tag, country, page, state, city);
                 }
                }

            }
            
	}

            
