The OnSelectedIndexChanged property is server side, to call client side javascript you can add an attribute for the onchange:
something like
ddlKindOfDebtor.attributes.add("onchange","javascript:IndexChanged(this.id);");
This will add the javascript to the html element and should run the script you require.