
function createRequestObject() {
		return ( window.XMLHttpRequest && !window.ActiveXObject ) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
}


function checkEmail(){
	
	if( http_c.readyState == 4 ) {
		eval(http_c.responseText);
		var nomecampo = 'lk' + id;
		document.getElementById(nomecampo).href = email;
    	http_c = null;
	}
}
	
function loadEmail( idlink ) {
			    	
	if(idlink != ''){
							
		http_c = createRequestObject();
		http_c.onreadystatechange = checkEmail;
		http_c.open("GET", 'ajax/ajax_email.php?idlink=' + idlink); 
		http_c.send(null);
	}
		
}
	
	
