function addToWishList(id,qty,optionid)
{
  xmlHttp = createHTTPRequest();
  
  xmlHttp.onreadystatechange = function()
  {
    // xmlHttp.readyState
    // 0 The request is not initialized ,1 The request has been set up, 2 The request has been sent, 3 The request is in process, 4 The request is complete 
    if (xmlHttp.readyState == 4)
    {
      ShowMessage("Item added successfully!");
    }
  }
  
  var params = "id=" + escape(id) + "&qty=" + escape(qty) + "&optionid=" + escape(optionid);
  
  xmlHttp.open("POST","/eitcommerce/general/addtowishlist.php",true);
  
  //Send the proper header information along with the request
  xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  xmlHttp.setRequestHeader("Content-length", params.length);
  xmlHttp.setRequestHeader("Connection", "close");

  xmlHttp.send(params);
}

function deleteFromWishList(productid, userid, optionid)
{
  xmlHttp = createHTTPRequest();
  
  xmlHttp.onreadystatechange = function()
  {
    // xmlHttp.readyState
    // 0 The request is not initialized ,1 The request has been set up, 2 The request has been sent, 3 The request is in process, 4 The request is complete 
    if (xmlHttp.readyState == 4)
    {
      window.location.reload();
    }
  }
  
  var params = "productid=" + escape(productid) + "&userid=" + escape(userid) + "&optionid=" + escape(optionid);
  
  xmlHttp.open("POST","/eitcommerce/general/deletefromwishlist.php",true);
  
  //Send the proper header information along with the request
  xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  xmlHttp.setRequestHeader("Content-length", params.length);
  xmlHttp.setRequestHeader("Connection", "close");

  xmlHttp.send(params);
}