function getLink(linkNum) {
	var xhr;
	elem = document.getElementById('logoLink');
	xhr = createXHR();
	string = "?linkNum="+linkNum;
    xhr.onreadystatechange = xhr.onreadystatechange = function(){
		if (xhr.readyState == 4 && xhr.status == 200) 
		{
			var data = xhr.responseText;
			elem.href = "http://"+data;
		}else{
			elem.href = "";
		}
    }
    xhr.open("GET","/ajax/getLink.php"+string,true);
    xhr.send(null);
}
//creates XHR object depending on browser
function createXHR() {
    var xhr;
    try {
        xhr = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            xhr = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (E) {
            xhr = false;
        }
    }
    if (!xhr && typeof XMLHttpRequest != 'undefined') {
        xhr = new XMLHttpRequest();
    }
    return xhr;
}