function getdata(obj)
{
var txt = document.getElementById(obj);
txt.value='0';
}
note in the above snippet that you are passing a reference to the textbox (this) to the javascript method, hence you dont need the getElementById at all - you already have a reference to the element. therefore, your javascript method can simply be
function getdata(obj)
{
obj.value='0';
}
or your textbox's onfocus could simply be: onfocus="this.value='0';"