
var xmlhttp1 = false;
// except IE
if(window.XMLHttpRequest) {
  xmlhttp1 = new XMLHttpRequest();
// IE
} else if(window.ActiveXObject) {
  try {
    xmlhttp1 = new ActiveXObject("Msxml2.XMLHTTP");
  } catch(e) {
    xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP");
  }
}

function GetRakuten(q,ca,p,ps,pe,so) {
	

	var id1 = "ra";
	var dofile1 = "r2.php?s=ra&q=";
//	var enq = decodeURIComponent(q);
//	var enq = encodeURIComponent(q);
	var enq = encodeURIComponent(q);
	dofile1+= enq;
	dofile1+= "&ca=";
	dofile1+= ca;
	dofile1+= "&p=";
	dofile1+= p;
	dofile1+= "&ps=";
	dofile1+= ps;
	dofile1+= "&pe=";
	dofile1+= pe;
	dofile1+= "&so=";
	dofile1+= so;

//	document.write(dofile1);
	
  if (!xmlhttp1) return;
  document.getElementById(id1).innerHTML = '<div class="load"><img src="../img2/loading.gif" /></div>';
  xmlhttp1.open('get', dofile1, true);
  xmlhttp1.onreadystatechange=function() {
    if (xmlhttp1.readyState==4 && xmlhttp1.status == 200) {
//			document.write(xmlhttp1.responseText);
      document.getElementById(id1).innerHTML = xmlhttp1.responseText;
    }
  }
  xmlhttp1.send(null)
}

function Getyahoo(q,ca,p,ps,pe,so) {
	
	var id1 = "ya";
	var dofile1 = "r2.php?s=ya&q=";
	var enq = encodeURIComponent(q);
//document.write(enq);
	dofile1+= enq;
	dofile1+= "&ca=";
	dofile1+= ca;
	dofile1+= "&p=";
	dofile1+= p;
	dofile1+= "&ps=";
	dofile1+= ps;
	dofile1+= "&pe=";
	dofile1+= pe;
	dofile1+= "&so=";
	dofile1+= so;

//	document.write(dofile1);
	
  if (!xmlhttp1) return;
  document.getElementById(id1).innerHTML = '<div class="load"><img src="../img2/loading.gif" /></div>';
  xmlhttp1.open('get', dofile1, true);
  xmlhttp1.onreadystatechange=function() {
    if (xmlhttp1.readyState==4 && xmlhttp1.status == 200) {
//			document.write(xmlhttp1.responseText);
      document.getElementById(id1).innerHTML = xmlhttp1.responseText;
    }
  }
  xmlhttp1.send(null)
}

function Getamazon(q,ca,p,ps,pe,so) {
	
	var id1 = "am";
	var dofile1 = "r2.php?s=am&q=";
	var enq = encodeURIComponent(q);
	dofile1+= enq;
	dofile1+= "&ca=";
	dofile1+= ca;
	dofile1+= "&p=";
	dofile1+= p;
	dofile1+= "&ps=";
	dofile1+= ps;
	dofile1+= "&pe=";
	dofile1+= pe;
	dofile1+= "&so=";
	dofile1+= so;

//	document.write(dofile1);
	
  if (!xmlhttp1) return;
  document.getElementById(id1).innerHTML = '<div class="load"><img src="../img2/loading.gif" /></div>';
  xmlhttp1.open('get', dofile1, true);
  xmlhttp1.onreadystatechange=function() {
    if (xmlhttp1.readyState==4 && xmlhttp1.status == 200) {
//			document.write(xmlhttp1.responseText);
      document.getElementById(id1).innerHTML = xmlhttp1.responseText;
    }
  }
  xmlhttp1.send(null)
}

function Getbidders(q,ca,p,ps,pe,so) {
	
	var id1 = "bi";
	var dofile1 = "r2.php?s=bi&q=";
	var enq = encodeURIComponent(q);
	dofile1+= enq;
	dofile1+= "&ca=";
	dofile1+= ca;
	dofile1+= "&p=";
	dofile1+= p;
	dofile1+= "&ps=";
	dofile1+= ps;
	dofile1+= "&pe=";
	dofile1+= pe;
	dofile1+= "&so=";
	dofile1+= so;

//	document.write(dofile1);
	
  if (!xmlhttp1) return;
  document.getElementById(id1).innerHTML = '<div class="load"><img src="../img2/loading.gif" /></div>';
  xmlhttp1.open('get', dofile1, true);
  xmlhttp1.onreadystatechange=function() {
    if (xmlhttp1.readyState==4 && xmlhttp1.status == 200) {
//			document.write(xmlhttp1.responseText);
      document.getElementById(id1).innerHTML = xmlhttp1.responseText;
    }
  }
  xmlhttp1.send(null)
}


function shiori(s,c,im) {
	

	var id1 = "shiori";
	var dofile1 = "rds2/shiori.php";
	dofile1+= "?s=";
	dofile1+= s;
	dofile1+= "&co=";
	dofile1+= c;

//	document.write(im);
	
  if (!xmlhttp1) return;
//  document.getElementById(id1).innerHTML = '<img src="../img2/loading.gif">';
  xmlhttp1.open('get', dofile1, true);
  xmlhttp1.onreadystatechange=function() {
    if (xmlhttp1.readyState==4 && xmlhttp1.status == 200) {
//			document.write(xmlhttp1.responseText);
//      document.getElementById(im).innerHTML = xmlhttp1.responseText;
      document.getElementById(im).innerHTML = '<img src="../img2/shiori_a.gif">';
    }
  }
  xmlhttp1.send(null)
}
