  var objCellSelected;
  var bEditing = 0;


//  function Minute30()
//  { obj = document.getElementById("Row30");
//    alert(obj);
//    obj.style.visiblity = "";
//  }
  
  function EditCaption(objCell)
  { if(bEditing == 1) { return; };

    objCellSelected = objCell;
    if(document.all)
    { strData1 = objCellSelected.innerText; }
    else { strData1 = objCellSelected.textContent; };

    bEditing = 1;
    objCellSelected.innerHTML = "<DIV CLASS='DIVED' STYLE='width:250px;'><INPUT ID='ED1' TYPE='TEXT' STYLE='width:150px;background-color:white;'>&nbsp;<INPUT TYPE='SUBMIT' VALUE='Update' STYLE='width:60px;height:22px;font:arial bold 10pt;'></DIV>";
    objEd = document.getElementById("ED1");
    objEd.value = strData1;
    if(objEd) { objEd.focus(); };
  }

  function EditCell(objCell)
  { if(bEditing == 1) { return; };

    objCellSelected = objCell;
    if(document.all)
    { strData1 = objCellSelected.innerText; }
    else { strData1 = objCellSelected.textContent; };

    bEditing = 1;
	bIsANumber = false;
    objCellSelected.innerHTML = "<DIV CLASS='DIVED' STYLE='width:250px;'><INPUT ID='ED1' TYPE='TEXT' STYLE='width:150px;background-color:yellow;'>&nbsp;<INPUT TYPE='SUBMIT' VALUE='Update' STYLE='width:60px;height:22px;font:arial bold 10pt;'></DIV>";
    objEd = document.getElementById("ED1");
    objEd.value = strData1;
    
	if(objEd) { objEd.focus(); };
  }

  function EditNumberCell(objCell)
  { if(bEditing == 1) { return; };

    objCellSelected = objCell;
    if(document.all)
    { strData1 = objCellSelected.innerText; }
    else { strData1 = objCellSelected.textContent; };

    bEditing = 1;
	bIsANumber = true;
    strInnerHtml = "";
//	strInnerHtml += "<DIV CLASS='DIVED'>";
	strInnerHtml += "<INPUT ID='ED1'    CLASS='ED1' TYPE='TEXT' XSTYLE='width:150px;background-color:yellow;'>&nbsp;";
	strInnerHtml += "<INPUT ID='SUBMIT' CLASS='SB1' TYPE='SUBMIT' VALUE='Update' STYLE=''>";
//	strInnerHtml += "</DIV>";
	objCellSelected.innerHTML = strInnerHtml;
    objEd = document.getElementById("ED1");
    objEd.value = strData1;
    
	if(objEd) { objEd.focus(); };
  }

  function VerifyNumber(dNumber)
  {  // Verify that input data contains only numbers, a decimal point.
     re = /^[0123456789.]*$/;  // Regular expression
     if(!re.test(dNumber)) { return(false); }
	 return(true);
  }

  function VDCOPR()
  { strDomain = document.domain;
    strDomain = strDomain.toLowerCase();
    if(strDomain == "develop.mileage-log.com") { return(true); };
    if(strDomain == "www.mileage-log.com")     { return(true); };
    if(strDomain == "mileage-log.com")         { return(true); };
	return(false);
  };


  function SetData2(objForm2)
  { strText = objForm2.ED1.value;
	strText = strText.replace(/^\s+|\s+$/g, '');

  	if(VDCOPR() == false) { return(true); };

    if(bIsANumber == true)
	{ if(VerifyNumber(strText) == false)
	  { alert("Odometer value must be a number.");
	    return(false);
	  } 
	}

    if(objCellSelected)
    { objCellSelected.innerHTML = "";
      
      if(document.all)
      { objCellSelected.innerText = strText; }
      else { objCellSelected.textContent = strText; };
      
      // objCellSelected.style.background = "White";
      objCellSelected = null;
    };
    bEditing = 0; 
	return(false);
  }
  
