function chkdiftime(){
var y=new Date();
var b = p(y.getMonth()+1)+"/"+p(y.getDate())+"/"+p(y.getYear())+" "+document.form1.txtt_stoph.value+":"+ document.form1.txtt_stopm.value+":"+ document.form1.txtt_stops.value;
var a = p(y.getMonth()+1)+"/"+p(y.getDate())+"/"+p(y.getYear())+" "+document.form1.txtt_starth.value+":"+ document.form1.txtt_startm.value+":"+ document.form1.txtt_starts.value;
var date1 = new Date(a);
var date2=new Date(b);
var sec=date2.getTime() - date1.getTime();
var second = 1000, minute = 60 * second, hour = 60 * minute, day = 24 * hour;
var h = trunc(sec / hour);
var days = Math.floor(sec / day);
sec -= days * day;
var hours = Math.floor(sec / hour);
sec -= hours * hour;
var minutes = Math.floor(sec / minute);
sec -= minutes * minute;
var seconds = Math.floor(sec / second);
if(minutes>=0 && minutes<=30 ){
if(minutes==0){
var result = hours + 0;
}else{
var result = hours + 0.5;
}
}else{
var result=hours+1;
}