function SpawnWindow_focus(baseurl, x, y) {
   var url = baseurl + "&x=" + x + "&y=" + y;
   var ht = y+25;
   var wd = x;
   var options = "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=" + wd + ",height=" + ht;
   imgWindow=window.open(url,"",options);
   imgWindow.focus();
}

function DisplayImage(baseurl, x, y) {
   var url = baseurl + "&x=" + x + "&y=" + y;
   var ht = y-5;
   var wd = x-5;
   var options = "toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=" + wd + ",height=" + ht;
   imgWindow=window.open(url,"",options);
   imgWindow.focus();
}

function confirmSubmit(message) {
    if (confirm (message))
        return true;
    else
        return false;
}

// function used to select or de-select a group of checkboxes
function SetAllCheckBoxes(FormName, FieldName, CheckValue)  {
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}