<!-- //
function makewin(targurl, width, height, winopts){if(window.sidebars == null){sidebars = new Object;sidebars.length = 1;}allopts ="width=" + width + ",height=" + height + "," + winopts;var tempref = window.open(targurl, "sidebar" + sidebars.length, allopts);sidebars[sidebars.length] = tempref;sidebars.length++;}
function killwins(){if(navigator.appName !="Microsoft Internet Explorer"){if(window.sidebars != null){for(i = 1; i < sidebars.length; i++){sidebars[i].close();}}}}
function MM_reloadPage(init){if(init==true) with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage;}} else if(innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
function checkInt(str) {
if (!str) return 0;
var ok ="";
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i+1);
if (ch < "0" || "9" < ch) {
alert("Only integer input is allowed!\n\n"
+ parseInt(ok) + " will be used because '"
+ str + "' is invalid.\nYou may correct "
+ "this entry and try again.");
return parseInt(ok);
}
else ok += ch;
}
return parseInt(str);
}

function checkDecimal(str) {
if (!str) return 0;
var ok ="";
for (var i = 0; i < str.length; i++) {
var ch = str.substring(i, i+1);
if ((ch < "0" || "9" < ch) && ch != '.') {
alert("Only numeric input is allowed!\n\n"
+ parseFloat(ok) + " will be used because '"
+ str + "' is invalid.\nYou may correct "
+ "this entry and try again.");
return parseFloat(ok);
}
else ok += ch;
}
return str;
}

function makeHours(form) {
hour = (checkInt(form.hour.value)); // validates input
min = (checkInt(form.min.value));   // sets invalid input to 0
sec = (checkInt(form.sec.value));
return (hour + min/60 + sec/3600);
}

function makeTime(form) {
num = (checkDecimal(form.hourtotal.value)); // validates input
if (num) {
form.hour.value = parseInt(num);
   num -= parseInt(num); num *= 60;
form.min.value = parseInt(num);
   num -= parseInt(num); num *= 60;
form.sec.value = parseInt(num);
   }
}
//-->