function IsNumeric(sText)
{
   var ValidChars = "0123456789.,";
   var IsNumber=true;
   var Char;
 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}

function confirmLink(theLink, theSqlQuery)
{
    var is_confirmed = confirm('¤Ø³á¹èã¨ËÃ×ÍäÁè·Õè¨Ð ' + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&confirmed=1';
    }

    return is_confirmed;
}

function numberOnly(f) {
	if (!IsNumeric(f.value)) {
		f.value = f.value.substring(0,f.value.length-1);
	}
}

function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
} // end of the 'setPointer()' function

