var myxmlHttp1 = false, myxmlHttp2 = false, myxmlHttp3 = false;
var isIE = (document.all) ? true : false;

try {
  xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp1 = false;
  }
}

try {
  xmlHttp2 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp2 = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp2 = false;
  }
}

try {
  xmlHttp3 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp3 = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp3 = false;
  }
}

if (!xmlHttp1 && typeof XMLHttpRequest != 'undefined') {
  xmlHttp1 = new XMLHttpRequest();
}
if (!xmlHttp2 && typeof XMLHttpRequest != 'undefined') {
  xmlHttp2 = new XMLHttpRequest();
}
if (!xmlHttp3 && typeof XMLHttpRequest != 'undefined') {
  xmlHttp3 = new XMLHttpRequest();
}
var objPos,v;
if(isIE){
	v=navigator.appVersion;
	v=parseFloat(v.substring(v.indexOf("MSIE")+5,v.lastIndexOf("Windows")));
}else{
	v=8;
}
function getmyccprdbox(mc){
	objpos=document.getElementById("mycpprdbox");
	if(objpos){
		var url = "/pagefunction/getcpprdbox.asp?a="+Math.round(9*Math.random())+"&sn="+escape(mc);
		xmlHttp1.open("GET", url, true);
		xmlHttp1.onreadystatechange=updatepagecpprdbox;
		xmlHttp1.send(null);	
	}
}


function updatepagecpprdbox(){
	if (xmlHttp1.readyState == 4) {
		var response=xmlHttp1.responseText;
		if (response!=""){
			document.getElementById("mycpprdbox").innerHTML=response;
		}
	}
}
function getabbox(mc,md){
	objpos=document.getElementById("myabbox");
	if(objpos){
		var url = "/pagefunction/getabbox.asp?a="+Math.round(9*Math.random())+"&sn="+escape(mc)+"&md="+escape(md);
		xmlHttp2.open("GET", url, true);
		xmlHttp2.onreadystatechange=updatepageabbox;
		xmlHttp2.send(null);	
	}
}


function updatepageabbox(){
	if (xmlHttp2.readyState == 4) {
		var response=xmlHttp2.responseText;
		if (response!=""){
			document.getElementById("myabbox").innerHTML=response;
		}
	}
}

