function setOreis(type, id) {
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
      xmlhttp = false;
    }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }


  if (xmlhttp) {
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
		var s = document.createElement('script');
		s.text='alert(xmlhttp.responseText)';
		document.body.appendChild(s);        
      }
    }

    var url = '/?action=oreis_add&type=' + type + '&id=' + id;
    xmlhttp.open('GET', url);
    xmlhttp.send(null);
  }

}

function setBookmark(type, id) {
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
      xmlhttp = false;
    }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }


  if (xmlhttp) {
    xmlhttp.onreadystatechange = function() {
      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
		var s = document.createElement('script');
		s.text='alert(xmlhttp.responseText)';
		document.body.appendChild(s);        
      }
    }

    var url = '/?action=user_bookmark&type=' + type + '&id=' + id;
    xmlhttp.open('GET', url);
    xmlhttp.send(null);
  }

}
