//-----------------------------------------------------------------------------------------------------------------
  function getMyAjaxFunc()
  {
    if(typeof XMLHttpRequest != "undefined")
    { return new XMLHttpRequest();} 
    var msv= ["Msxml2.XMLHTTP.7.0", "Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0",
              "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]; 
    for(var i = 0; i < msv.length; i++)
    { 
      try { A = new ActiveXObject(msv[i]);
      if(A){return new ActiveXObject(msv[i]);} 
      } catch(e) { } 
    } 
    return false;
  }
  
  var listXmlrequest = getMyAjaxFunc();
//-------------------------------------------------------------------------------------------------------------------
  function AttachementClick(customURI)
  {
    listXmlrequest.open("GET", customURI, true); 
    listXmlrequest.send(null); 
  }
  
//-------------------------------------------------------------------------------------------------------------------
  function UpdateCartLink(this_id, href_id)
  {
    var cartlink = document.getElementById(href_id).href;
    if(cartlink.indexOf("&subrecord_id=") >= 0)
      cartlink = cartlink.replace(/\&subrecord_id=\d*/, '&subrecord_id='+this_id);
    else
      cartlink += '&subrecord_id='+this_id;
    document.getElementById(href_id).href = cartlink;
  }
