function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		} 	
		return xmlhttp;
	}
		
	function setDropbox(val1,val2,val3) {
		var strURL='/setSession.php?mpID='+val1 +'&catid='+val2 + '&prodid='+val3;
		var selectvar = "upsell["+val1+"]["+val2+"]";
	
		var selectedopt= ""+val3;
		//alert(strUrl);
	  var req = getXMLHTTP(); // fuction to get xmlhttp object
    if (req) {
      req.onreadystatechange = function() {
        if (req.readyState == 4) { //data is retrieved from server
          if (req.status == 200) { // which reprents ok status                    
           window.parent.location.reload();
          
          } else { 
            alert("There was a problem while using XMLHTTP:\n"+ req.statusText);
            
          }
        }            
      }        
      req.open("GET", strURL, true); //open url using get method
      req.send(null);
    }
 }
 
 function listUsers() {
     var srcStr = $("#form_customeremailsearch").val();
     this.showUserList(srcStr);
    /* $.post("/ajax/getUserList.php", {queryString: ""+srcStr+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
     */
  }
  
  function showUserList(val1) {
		var strURL='/admin/ajaxinc/userList.php?src='+val1;
	  var req1 = getXMLHTTP(); // fuction to get xmlhttp object
    if (req1) {
      req1.onreadystatechange = function() {
        if (req1.readyState == 4) { //data is retrieved from server
          if (req1.status == 200) { // which reprents ok status                    
            document.getElementById('userList').innerHTML=req1.responseText;     
          
          } else { 
            alert("There was a problem while using XMLHTTP:\n"+ req1.statusText);
            
          }
        }            
      }        
      req1.open("GET", strURL, true); //open url using get method
      req1.send(null);
    }
 }