var xmlhttp;
function ajaxcreate(){
     if (window.ActiveXObject) {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
    }
}
function modifykeyinfo(keyn,keywordn,transn,searchidn,rankn,staten){
   ajaxcreate();
   var keyid=document.getElementById(keyn).value
   var keyword=document.getElementById(keywordn).value
   var trans=document.getElementById(transn).value
   var searchid=document.getElementById(searchidn).value
   var rank=document.getElementById(rankn).value
   var state=document.getElementById(staten).value

   var url="dokeyinfo.php?id="+keyid+"&k="+keyword+"&t="+trans+"&sid="+searchid+"&r="+rank+"&s="+state+"&rnd="+Math.random();
   xmlhttp.onreadystatechange=modifykeyrankstate;
   xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
}

function modifykeyrankstate(){
   if(xmlhttp.readyState==4){
      if(xmlhttp.status==200){
		if(xmlhttp.responseText=='0'){
		 alert("error!");
		 // document.getElementById(rankn).value= xmlhttp.responseText	
		}else{
		 alert("修改成功!");
			
			}
	  }
   }
}


function delkeyinfo(keyn){
   ajaxcreate();
   var keyid=document.getElementById(keyn).value
   var url="delkeyinfo.php?id="+keyid+"&keyn="+keyn+"&rnd="+Math.random();
   xmlhttp.onreadystatechange=delkeyrankstate;
   xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
}

function delkeyrankstate(){
   if(xmlhttp.readyState==4){
      if(xmlhttp.status==200){
		if(xmlhttp.responseText=='0'){
		 alert("error!");
		 // document.getElementById(rankn).value= xmlhttp.responseText	
		}else{
		note="note"+xmlhttp.responseText;
        notechild=document.getElementById(note);
	    notechild.style.cssText="display:none";
	  // alert(fathernote);
	//	fathernote.removeChild(notechild)	
			}
	  }
   }
}



















