/**
 * 获取并返回一组checkbox中被选中的值
 * 
 * @param objectsArray
 * @returns 被选中的值，如: a,b,c
 */
function getCheckedBoxesValue(objectsArray) {
	var tmpValue = new Array();
	var i = 0;
	for (var key in objectsArray) {
		if (objectsArray[key].checked) {
			tmpValue[i] = objectsArray[key].value;
			i++;
		}
	}
	return tmpValue.join();
}

/**
 * 显示普通窗口
 */
function showDialog(siteroot, params, width, Height, scroll) {
	var features = "height=" + Height + ",width=" + width;
	if (scroll != undefined && scroll != "") {
		features += ",scrollbars";
	}

	newWindow = window.open(params[1], "subWind", "status,menubar," + features);
	newWindow.focus();
}

/**
 * 显示模式窗口
 */
function showDialogWin(siteroot, params, width, height, scroll) {
	if (scroll == undefined || scroll == "") {
		scroll = "no";
	}
	params[3] = scroll;
	var feature = "dialogHeight: '" + height + "px'; dialogWidth: '" + width
			+ "px';  help: No; resizable: No; status: No;scrolling:" + scroll
			+ ";unadorned:Yes;taget:self";
	if (!document.all) {
		feature = "dialogheight:" + height + "; dialogwidth:" + width
				+ "; resizable:off;dialogtop:"
				+ ((screen.availHeight - height) / 2) + ";dialogleft:"
				+ ((screen.availWidth - width) / 2);// menubar=0;toolbar=0;location=0;scroll:0;status=no;
	}
	var retval = window.showModalDialog(siteroot + "/dialog.html", params,
			feature);
	return retval;
}
