var xmlHttp;
function createXMLHttpRequest(){
	if(window.ActiveXObject){
		xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
		}
	else if(window.XMLHttpRequest){
		xmlHttp= new XMLHttpRequest();
	}
}

function sendId(Aid,Uid){
	if(Uid=="0"){
		window.location='http://www.divland.com/library/login/';
		return true;
		}
	var url="savelink.php?aid="+Aid+"&uid="+Uid; 
	TargetAid = Aid;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange=handleStateChange;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function handleStateChange(){
	if(xmlHttp.readyState==4){
		if(xmlHttp.status==200){
			document.getElementById("savelink"+TargetAid).innerHTML= xmlHttp.responseText;
			}
		}
	}