if you take a look to source code for product page you will notice something like this:
var spConfig = new Product.Config({"attributes":{"1162":{"id":"1162","code":"colour","label":"Colour","options":[{"id":"2197","label":"Blue","price":"0","oldPrice":"0","products":["18577"],"image":"http:\/\/magento.localhost\/media\/amconf\/images\/2197.jpg"}],"use_image":1}},"template":"\u00a3#{price}","basePrice":"106.99","oldPrice":"106.99","productId":"18576","chooseText":"Choose an Option...","taxConfig":{"includeTax":true,"showIncludeTax":true,"showBothPrices":false,"defaultTax":20,"currentTax":20,"inclTaxTitle":"Incl. VAT"}});
this is simple product id:
"products":["18577"]
call for spConfig you can find at the bottom of app/design/frontend/[your theme]/default/template/catalog/product/view/type/options/configurable.phtml
<script type="text/javascript">
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
</script>
Hope this helps.