oLookupItem=crmForm.all.uvat_fixmachine_case1;
if (oLookupItem.DataValue!=null)
{
debugger;
var oStartDate=oLookupItem.items[0].keyValues.uvat_startdate;
if (oStartDate!=undefined && oStartDate!=null)
{
if (oStartDate.value.length>10)
{
var ostartdatetime=new Date(oStartDate.value.substring(0,10).replace("-","/"));
crmForm.all.uvat_startdate.DataValue=ostartdatetime.setHours(ostartdatetime.getHours());
}
else if (oStartDate.value.length>7)
{
crmForm.all.uvat_startdate.DataValue=new Date(oStartDate.value);
}
}
var oEndDate=oLookupItem.items[0].keyValues.uvat_enddate;
if (oEndDate!=undefined && oEndDate!=null)
{
if (oEndDate.value.length>10)
{
var oenddatetime=new Date(oEndDate.value.substring(0,10).replace("-","/"));
crmForm.all.uvat_enddate.DataValue=oenddatetime.setHours(oenddatetime.getHours());
}
else if (oEndDate.value.length>7)
{
crmForm.all.uvat_enddate.DataValue=new Date(oEndDate.value);
}
}
}