i have a tab conatiner with 5 tabs

i need to get the active tab index

so i have a javascript to get teh active tabindex but i get error

below is the runtime code viewd in browser




Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TabContainer, {"activeTabIndex":0,"autoPostBackId":"ctl00$ContentMain$Tabs","clientStateField":$get("ctl00_ContentMain_Tabs_ClientState")}, {"activeTabChanged":clientActiveTabChanged}, null, $get("ctl00_ContentMain_Tabs"));

});




function clientActiveTabChanged(sender, args)
{
document.getElementById('<%=Htabindex.ClientID%>').value=sender.get_activeTabIndex();

}