Show region if option is selected

Hi Chaps,

I have a PHP form, with a Customer Select List. Once an option has been selected, the ‘custid’, is passed to Javascript that collects all the contacts linked to that customer and populates another Select List.
This works fine, but what I’m after is an extra two inputs to appear when a particular customer is selected, but I’m not entirely sure how to go about it.
Here it goes:
Table/Form:

<script type="text/javascript">
 
var ajax = new Array();
 
function getTextList(sel)
{
    var Customer = sel.options[sel.selectedIndex].value;
    document.getElementById('text').options.length = 0;
    if(Customer.length>0){
        var index = ajax.length;
        ajax[index] = new sack();
        
        ajax[index].requestFile = 'getText.php?custid='+Customer;
        ajax[index].onCompletion = function(){ createText(index) };
        ajax[index].runAJAX();
    }
}
 
function createText(index)
{
    var obj = document.getElementById('text');
    eval(ajax[index].response); 
}   
</script>
      <table>
      <tr valign="baseline">
        <th>Customer:</th>
        <td colspan="2" class="normal"><span id="spryselect1">
          <select id="customer" name="FK_custid" onchange="getTextList(this)">
        <option value="">Select Customer</option>
        <?php
            $result = mysql_query("SELECT DISTINCT custname, custid FROM tbl_customers ORDER BY custname") 
            or die(mysql_error());
            while($cust = mysql_fetch_array( $result )) 
            {
                  echo '<option value="'.$cust['custid'].'">'.$cust['custname'].'</option>';
            }
        ?>
    </select><br />
          <span class="selectRequiredMsg">Please select Customer</span></span></td>
      </tr>
      <tr valign="baseline">
        <th>Customer Contact:</th>
        <td colspan="2" class="normal"><span id="spryselect6">
          <select id="text" name="projcontact">
            <option value="">--Select Customer First--</option>
          </select><br />
          <span class="selectRequiredMsg">Please select a Project Contact</span></span></td>
      </tr>
      <tr valign="baseline">
        <th>Purchase Order Ref:</th>
        <td colspan="2" class="normal"><input type="text" id="count" name="projporder" value="" size="32" /></td>
      </tr>
      <?php 
        if ('CustomerID'=='XX'){?>
      <tr valign="baseline">
        <th>Cost Centre:</th>
        <td colspan="2" class="normal"><input type="text" id="count" name="projcostcentre" value="" size="32" /></td>
      </tr>
      <tr valign="baseline">
        <th>Cost Centre Contact:</th>
        <td colspan="2" class="normal"><input type="text" id="count" name="projcostcentrecontact" value="" size="32" /></td>
      </tr>
      <?php 
        };
      ?>
      </table>

GetText.php:

<?php require_once('../../Connections/conndb2.php'); 
    $Customer = $_GET['custid'];
    if(isset($_GET['custid'])){
        $result = mysql_query("SELECT * FROM tbl_contacts WHERE FK_custid='$Customer' ORDER BY contactname") 
        or die(mysql_error());
             while($text = mysql_fetch_array( $result )) 
              {
                echo 'obj.options[obj.options.length] = new Option("'.$text['contactname'].'","'.$text['contactname'].'");';
              } 
    }
?> 

I know that I need the ‘custid’ to be set somewhere, but not sure at which point to do it. Any ideas welcome!
Apologies if this is a Javascript question, if so I’ll move this to a different forum.