<!--

function toggle(box,theId) {
   if(document.getElementById) {
      var cell = document.getElementById(theId);
      if(box.checked) {
         cell.className = "on";
      }
      else {
         cell.className = "off";
      }
   }
}


function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function popup(theURL,winName,features) {
  window.open(theURL,winName,features);
}

// countdown for text field
function textCounter(field,cntfield,maxlimit) {
  if (field.value.length > maxlimit) // if too long...trim it!
    field.value = field.value.substring(0, maxlimit);
  // otherwise, update 'characters left' counter
  else
    cntfield.value = maxlimit - field.value.length;
}

function check() {
	var SelectedIndex = document.getElementById("status").selectedIndex;  // The number of the selected option
	var Selected = document.getElementById("status").options[SelectedIndex].value;  // The value of the selected option above
// The above two lines can be combined into one as follows:
//	var Selected = document.getElementById("new_value").options[document.getElementById("new_value").selectedIndex].value;
	if (Selected=='none'){
  		alert('You must select a new status for the selected item(s)');  // Show error message
	}
	else{
  		if(confirm('do you really want to change these items?')){  // Ask for confirmation
			return true;  // True is returned if confirmation is given and form is submitted
		}
	}
    return false;  // False is returned if either: a) no option is selected; b) Confirmation is cancelled
}		

// -->