// You should save this javascript function as a file and call it as above, if you do make sure the path to recordVisit.php is set properly relative to the script.function recordVisit(id){               var ajaxRequest;  // The variable that makes Ajax possible!                try{                // Opera 8.0+, Firefox, Safari                ajaxRequest = new XMLHttpRequest();        } catch (e){                // Internet Explorer Browsers                try{                        ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");                } catch (e) {                        try{                                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");                        } catch (e){                                // Something went wrong                                alert("Your browser broke!");                                return false;                        }                }        }        // Create a function that will receive data sent from the server        ajaxRequest.onreadystatechange = function(){                if(ajaxRequest.readyState == 4){                        // Comment out the following line if you don't want to see the javascript alert                        // alert(ajaxRequest.responseText);                }        }                // Which tab are we recording?        var page = document.getElementById(id).innerHTML;                // Hack to make sure we can re-use the AJAX request on the page        var dynamic = "&dynamic=" + Math.floor(Math.random()*99999999999999999);        var queryString = "?page=" + page;                // Send the AJAX request off to the php loggin page...        ajaxRequest.open("GET", "../includes/commontab/recordVisit.php" + queryString + dynamic, true);        ajaxRequest.send(null); }