I am trying to programatically create a TabContainer in an InfoWindow and populate it with ContentPane's based on an identify task. The first issue I am having is the TabContainer is not embedding the slider and Menu correctly- they span the enitre top portion of the TabContainer. The second issue is the first contentPane is not showing its content, only the tab. If i click on another contentpane the content is displayed.
Do i need to resize the tabcontainer?

the portion of my code:
<SPAN class="kwd" style="color: #8a4a0b;">function</SPAN><SPAN class="pln" style="color: #000000;"> addToMap</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">idResults</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> event</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">{</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">if</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">idResults </SPAN><SPAN class="pun" style="color: #145680;"><</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="lit" style="color: #953838;">1</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">{</SPAN><SPAN class="pln" style="color: #000000;">
map</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">infoWindow</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">setContent</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="str" style="color: #800000;">"No Visible Layer Found - Turn on a Layer and click it to Identify"</SPAN><SPAN class="pun" style="color: #145680;">);</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">}</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">else</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">{</SPAN><SPAN class="pln" style="color: #000000;">
tc </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">new</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="typ" style="color: #2b91af;">TabContainer</SPAN><SPAN class="pun" style="color: #145680;">({</SPAN><SPAN class="pln" style="color: #000000;">
style</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"height: 100%; width: 100%;"</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;">
useMenu</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">false</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;">
useSlider</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">true</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">},</SPAN><SPAN class="pln" style="color: #000000;"> domConstruct</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">create</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="str" style="color: #800000;">"div"</SPAN><SPAN class="pun" style="color: #145680;">));</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">for</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="kwd" style="color: #8a4a0b;">var</SPAN><SPAN class="pln" style="color: #000000;"> i </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="lit" style="color: #953838;">0</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;"> il </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> idResults</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">length</SPAN><SPAN class="pun" style="color: #145680;">;</SPAN><SPAN class="pln" style="color: #000000;"> i </SPAN><SPAN class="pun" style="color: #145680;"><</SPAN><SPAN class="pln" style="color: #000000;"> il</SPAN><SPAN class="pun" style="color: #145680;">;</SPAN><SPAN class="pln" style="color: #000000;"> i</SPAN><SPAN class="pun" style="color: #145680;">++)</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">{</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">var</SPAN><SPAN class="pln" style="color: #000000;"> idResult </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> idResults</SPAN><SPAN class="pun" style="color: #145680;">[</SPAN><SPAN class="pln" style="color: #000000;">i</SPAN><SPAN class="pun" style="color: #145680;">];</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">var</SPAN><SPAN class="pln" style="color: #000000;"> featureAttributes </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> idResults</SPAN><SPAN class="pun" style="color: #145680;">[</SPAN><SPAN class="pln" style="color: #000000;">i</SPAN><SPAN class="pun" style="color: #145680;">].</SPAN><SPAN class="pln" style="color: #000000;">feature</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">attributes</SPAN><SPAN class="pun" style="color: #145680;">;</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">var</SPAN><SPAN class="pln" style="color: #000000;"> contentAttributes </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">[];</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="kwd" style="color: #8a4a0b;">for</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="kwd" style="color: #8a4a0b;">var</SPAN><SPAN class="pln" style="color: #000000;"> attr in featureAttributes</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">{</SPAN><SPAN class="pln" style="color: #000000;">
contentAttributes</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">push</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="str" style="color: #800000;">"<b>"</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">+</SPAN><SPAN class="pln" style="color: #000000;"> attr </SPAN><SPAN class="pun" style="color: #145680;">+</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">" </b>"</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">+</SPAN><SPAN class="pln" style="color: #000000;"> featureAttributes</SPAN><SPAN class="pun" style="color: #145680;">[</SPAN><SPAN class="pln" style="color: #000000;">attr</SPAN><SPAN class="pun" style="color: #145680;">]</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">+</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"<br/>"</SPAN><SPAN class="pun" style="color: #145680;">);</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">}</SPAN><SPAN class="pln" style="color: #000000;">
cp </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="kwd" style="color: #8a4a0b;">new</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="typ" style="color: #2b91af;">ContentPane</SPAN><SPAN class="pun" style="color: #145680;">({</SPAN><SPAN class="pln" style="color: #000000;">
title</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"> idResults</SPAN><SPAN class="pun" style="color: #145680;">[</SPAN><SPAN class="pln" style="color: #000000;">i</SPAN><SPAN class="pun" style="color: #145680;">].</SPAN><SPAN class="pln" style="color: #000000;">layerName</SPAN><SPAN class="pun" style="color: #145680;">,</SPAN><SPAN class="pln" style="color: #000000;">
content</SPAN><SPAN class="pun" style="color: #145680;">:</SPAN><SPAN class="pln" style="color: #000000;"> contentAttributes</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">join</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="str" style="color: #800000;">""</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">});</SPAN><SPAN class="pln" style="color: #000000;">
tc</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">addChild</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">cp</SPAN><SPAN class="pun" style="color: #145680;">);</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">}</SPAN><SPAN class="pln" style="color: #000000;">
console</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">log</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">cp</SPAN><SPAN class="pun" style="color: #145680;">);</SPAN><SPAN class="pln" style="color: #000000;">
map</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">infoWindow</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">setContent</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">tc</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">domNode</SPAN><SPAN class="pun" style="color: #145680;">);</SPAN><SPAN class="pln" style="color: #000000;">
tc</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">startup</SPAN><SPAN class="pun" style="color: #145680;">();</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">}</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="pun" style="color: #145680;">}</SPAN>