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


	function saveListing(tag,name,id,flag,listSavedId){

            alert(listSavedId);
            document.getElementById(listSavedId).innerHTML = "";
            var url = "saveListingServlet?Username=" + name +"&id=" + id +"&flag=" + flag +"&tag="+tag;


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





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


            function processRequest() {
                if (req.readyState == 4) {
                  if (req.status == 200) {

                    //document.getElementById("saved").innerHTML=req.responseText;
                    alert("saved");
                  }
                }
            }
            //showList(tag,name,flag,'1');
    }

    
