<?php
$table_name2 = $_SESSION['db_prefix']."_customer";
$customer_query = "SELECT * FROM $table_name2 WHERE cust_id ='".$cust_id."' ";
$customer_result = mySQL_query($customer_query);
$customer_num = mysql_num_rows($customer_result);	
$a1 = mysql_result($customer_result, 0, "account_type");
if ($a1=="corporate") { 
$a0 = mysql_result($customer_result, 0, "comp_name"); 
} 
else {
$a0 = mysql_result($customer_result, 0, "title")." ".mysql_result($customer_result, 0, "name_2")." ".mysql_result($customer_result, 0, "comp_name");
 }
$a2b = mysql_result($customer_result, 0, "bag_box");
$a2c = mysql_result($customer_result, 0, "box_no");
$a2d = mysql_result($customer_result, 0, "postal_place");
$a2e = mysql_result($customer_result, 0, "phone");
$a2f = mysql_result($customer_result, 0, "contact_1");
$a2g = mysql_result($customer_result, 0, "email_1");
$a2h = mysql_result($customer_result, 0, "cell_1");

$customerTT ="<table id=table_tool_tip width=250 ><tr><td  width=75>Name:</td><td width=175>".$a0."</td></tr><tr><td>Address:</td><td>".$a2b."&nbsp;".$a2c."<br>".$a2d."</td></tr><tr><td>Phone:</td><td>".$a2e."</td></tr><tr><td>Contact:</td><td>".$a2f."</td></tr></table><br><b>Click for details</b>";
?>

<table width="650" id="table_details_display">
  <tr>
    <td width="121" align="left" valign="top">Customer:</td>
    <td colspan="3" align="left" valign="top"><a href="../sales/customer_details.php?cust_id=<?php echo $cust_id ?>" onmouseover="ddrivetip('<?php echo $customerTT?>', 300)"; onmouseout="hideddrivetip()"><?php echo $a0 ?></a></td>
  </tr>
  <tr>
    <td align="left" valign="top">Contact:</td>
    <td width="206" align="left" valign="top"><?php echo $a2f ?></td>
    <td width="116" align="left" valign="top">Cell:</td>
    <td width="187" align="left" valign="top"><?php echo $a2h ?></td>
  </tr>
  <tr>
    <td align="left" valign="top">Phone:</td>
    <td align="left" valign="top"><?php echo $a2e ?></td>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">e-mail:</td>
    <td colspan="3" align="left" valign="top"><a href="mailto:<?php echo $a2g ?>"><?php echo $a2g ?></a></td>
  </tr>
</table>

