First of all if the document is (X)Html then your link tag needs to be closed.
<link rel="stylesheet" type="text/css" href="stylesheet/style.css">
should be
<link rel="stylesheet" type="text/css" href="stylesheet/style.css" />
Secondly the script tag REQUIRES you to specify its type.
should be
<script type="text/javascript">
You also need a closing </body> and </html> tag at the end of the document. Ive taken your script and reformatted it, try the following.
<?
include "functions/mysql.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Find Travellers</title>
<link rel="stylesheet" type="text/css" href="stylesheet/style.css" />
<script language="javascript" type="text/javascript">
function createXmlHttpRequest() {
var x;
try {
x = new XMLHttpRequest();
} catch(ex) {
try {
x = new ActiveXObject("Msxml2.XMLHTTP");
} catch(ex2) {
try {
x = new ActiveXObject("Microsoft.XMLHTTP");
} catch(ex3) {
x = false;
}
}
}
if(x) { return x; } else { return false; }
}
function showdetail(tid) {
var xmlHttp = createXmlHttpRequest();
if(xmlHttp) {
xmlHttp.onreadystatechange = function() {
if(xmlHttp.readyState === 4) {
var data = xmlHttp.responseText;
var dv = document.getElementById('tdetail');
dv.innerHTML = data;
}
};
xmlHttp.open('GET', 'functions/travellerdetail.php?tid=' + id, true);
xmlHttp.send(null);
}
return false;
}
</script>
</head>
<body>
<table>
<tr>
<td>
<?$Q = mysql_query("select * from travellers where t_type = 'air'");?>
<div id="byair">
<?
while($R = mysql_fetch_array($Q)) {
?>
<br />
<a href="#" class="tlink" onclick="return showdetail(<? echo $R["t_id"]; ?>)" id="<? echo $R["t_id"]; ?>" name="<? echo $R["t_name"]; ?>"><? echo $R["t_name"]; ?></a>
<? } ?>
</div>
</td>
</tr>
<tr>
<td>
<div id="tdetail"></div>
</td>
</tr>
</table>
</body>
</html>