// JavaScript Document
var xmlHttp = false;
//   branch   for   IE/Windows   ActiveX   version   
if(window.XMLHttpRequest){   
          xmlHttp = new XMLHttpRequest(); 
		  }
	  else   if   (window.ActiveXObject)   {
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
	  }
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}

function myurl(mystr,n){
	var mystr1;
	//mystr1=mystr.substring(0,mystr.length-1);
	//alert("ÏÂÃæÊÇÌø×ª");
	mystr1="/myajax.asp?id="+mystr+"&page="+n;
	if ((mystr1 == null) || (mystr1 == "")) return;
  	xmlHttp.open("get",mystr1,true);
 	 xmlHttp.onreadystatechange = updatePage;
 	 xmlHttp.send(null);
	 try{
	 window.document.getElementById("ajax1").style.background="#A9B3B9";
	 }
	 catch(e){		 }
	 	 try{
	 window.document.getElementById("ajax2").style.background="#A9B3B9";
	 }
	 catch(e){		 }
	 	 try{
	 window.document.getElementById("ajax3").style.background="#A9B3B9";
	 }
	 catch(e){		 }
	 	 try{
	 window.document.getElementById("ajax4").style.background="#A9B3B9";
	 }
	 catch(e){		 }
	 	 try{
	 window.document.getElementById("ajax5").style.background="#A9B3B9";
	 }
	 catch(e){		 }
	 	 try{
	 window.document.getElementById("ajax6").style.background="#A9B3B9";
	 }
	 catch(e){		 }
	 try{
	 window.document.getElementById("ajax"+n).style.background="#fff";
	 }
	 catch(e)
	 {
		 return false;
		 }
	}

function updatePage() {
  if (xmlHttp.readyState == 4) {   
    if (200==xmlHttp.status){
    var response = xmlHttp.responseText;
	var myajax=window.document.getElementById("myajax");
	myajax.innerHTML=response;
	}
  }
}
function uppage(picurl){
	if ((picurl == null) || (picurl == "")) return;
  var url = picurl;
  xmlHttp.open("get",url,true);
  xmlHttp.onreadystatechange = updatePic;
  xmlHttp.send(null); 
}
function updatePic() {
  if (xmlHttp.readyState == 4) {
	  if (200==xmlHttp.status){
    var response = xmlHttp.responseText;
	var words = response.split("|");
	var myname=window.document.getElementById("myname");
	var mypic=window.document.getElementById("mypic");
	//myname.innerHTML="aaaaaaaaaaaaaaaa";
	myname.innerHTML=words[0];
	//alert(words[1]);
	mypic.src=words[1];
	  }
	//apDiv2.innerHTML=response;
  }
}

