function convertValue(strInput,strImg)
{
	sInput = eval("document.forms['Operations']."+strInput);
	sEnd = eval("document.forms['Operations'].EndDate_"+strInput);
	sNotice = eval("document.forms['Operations'].Notice_"+strInput);
	sSupplier = eval("document.forms['Operations'].Supplier_"+strInput);
	sMeter = "";
	if (strInput == "Gas" || strInput == "Electric")
	{
    sMeter = eval("document.forms['Operations'].Meter_"+strInput);
  }
	sVal = sInput.checked;
	if (sVal == true)
	{
		document.getElementById(strImg).src = '/_GFX/Util'+strInput+'Small.gif';
		sEnd.disabled = true;
		sNotice.disabled = true;
		sSupplier.disabled = true;
		if (sMeter != "")
		{
      sMeter.disabled = true;
    }
	}
	else
	{
		document.getElementById(strImg).src = '/_GFX/Util'+strInput+'SmallGrey.gif';
		sEnd.disabled = false;
		sNotice.disabled = false;
		sSupplier.disabled = false;
		if (sMeter != "")
		{
      sMeter.disabled = false;
    }

	}

}
function convertValueImg(strInput,strImg)
{
	sInput = eval("document.forms['Operations']."+strInput);
	sVal = sInput.checked;
	if (sVal == false)
	{
		sInput.checked = true;
	}
	else
	{
		sInput.checked = false;
	}
	convertValue(strInput,strImg)
}
function checkAll()
{
	strCheck =document.forms['Operations'].SelectAll;
	if(strCheck.checked == true)
	{
		arr = document.forms['Operations'].getElementsByTagName("input");
		for(var i=0; i < arr.length; i++)
		{
			if(arr[i].type =="checkbox" && arr[i].id != "SelectAll")
			{
				arr[i].checked = true;	
			}
		}
	}
	else
	{
		arr = document.forms['Operations'].getElementsByTagName("input");
		for(var i=0; i < arr.length; i++)
		{
			if(arr[i].type =="checkbox" && arr[i].id != "SelectAll")
			{
				arr[i].checked = false;	
			}
		}

	}
}
function suppPopup(strType)
{
  sID = document.forms[0].suppID;
  sID.options.length = 0;
  sSuppType = document.forms[0].sType;
  sSuppType.value = strType; 
  if (eval(strType+'_ID').length > 0)
  {
    sID.options[sID.options.length] = new Option('Please Select','');
    arrID = eval(strType+'_ID');
    arrName = eval(strType+'_Name');
    for (i=0;i<arrName.length;i++)
    {
        //alert (arrName[i]);
        sID.options[sID.options.length] = new Option(arrName[i],arrID[i]);
    }  
  }
  else
  {
      sID.options[sID.options.length] = new Option('Please Select','');
  } 
  offsets = getScrollXY();
  sLayer = document.getElementById('suppLayer');
 	sLayer.style.left = parseInt(tempX)+parseInt(offX)+parseInt(offsets[0]) + 'px';
	sLayer.style.top = parseInt(tempY)+parseInt(offY)+parseInt(offsets[1]) + 'px';
	sLayer.style.display = 'block';
	
}
function closeSupp()
{
  sLayer = document.getElementById('suppLayer');
  sLayer.style.display="none";  
}
