function gotoifconf( question, url ) {
    if (confirm(question)) {
	location.href=url
    }
}

function selectgrpid(parentid, mode, allowitems, altparentid) {
    if (!allowitems) {
	allowitems = 0;
    }
    if (!parentid && altparentid) {
	parentid = altparentid;
    }
    var lovWindow = window.open(
	'multiplex_adm.cgi?action=selectgrpid&mode='+mode+'&parentid='+parentid+'&allowitems='+allowitems,'lov',
	'dependent,scrollbars,resizable,status,width=600,height=400');
}

function selectpropval(propid, mode, selectedval) {
    if (!selectedval) {
	selectedval = '';
    }
    var lovWindow = window.open(
	'multiplex_adm.cgi?action=selectpropval&mode='+mode+'&propid='+propid+'&selectedval='+selectedval,
	'lov','dependent,scrollbars,resizable,status,width=600,height=400');
}

function copyitems_to( frm2 ) {
  var frm1 = document.compareform;
  var ids = '';
  for (var i = 0; i < frm1.elements.length; i++) {
    var elem = frm1.elements[i];
    var s4 = elem.name;
    if ( s4 == 'compare_ids' ) {
      if (elem.checked)
        ids = ids + elem.value + ',';
    }
  }
  frm2.itemids.value = ids;
}

