function launchLov(lovUrl, windowWidth, windowHeight) {
  window.open(lovUrl, 'lovWindow', 
              'scrollbars=yes,resizable=yes,height='+windowHeight+',width='+windowWidth);
}

function lovOK(lovList, lovField) {
  if (lovList.selectedIndex == -1)
  {
    alert("Please select a value");
    return;
  }
  lovField.value = lovList.options[lovList.selectedIndex].text;
  window.close();
}

function changeDropDown(formName, Action) { 
var windowForm = document.forms[formName];
windowForm.submit();
return true;
}

/* Submit a form event by appending
   a hidden input field to the specified
   form and submitting it. 
   Usage: javascript:submitForm(this, 'eventSubmit_doSomething')
*/
function submitFormEvent(formName, event) {
var windowForm = document.forms[formName];
var newInput = document.createElement('input');
newInput.setAttribute('type','hidden');
newInput.setAttribute('name',event);
newInput.setAttribute('value','true');
windowForm.appendChild(newInput);
windowForm.submit();
windowForm.removeChild(newInput);
return true;
}

function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function selectRadio(id) {
   var el = document.getElementById(id);
   el.checked=true; 
}

function checkUncheckAll(oCheckbox) {
   
    var boxes = document.getElementsByName( oCheckbox );
    var el, i = 0;
    while (el = boxes[i++]) 
        if (el.type == 'checkbox') el.checked = true;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}

function clickLink(menuId) {
  document.location.href=document.getElementById(menuId).href;
}

function openHelp(fileName) 
{
  myFloater = window.open('','myWindow','scrollbars=yes,status=no,width=275,height=675,screenX=400,screenY=400,top=3,left=735')
  myFloater.location.href = fileName;
}

function sendCsrId(csr_id) {
  var a = '00' + csr_id;
  var b = a.substring(a.length - 3 , a.length);
  document.csr_input.csr_selection.value = b;
  document.csr_input.change_csr.click();
}

