/** Hidden selected Row key name. Value corrisponds to planetj.html.IHTML.ROW_KEY. */
var hiddenRowKey = "PJSelRowKey";

/** Hidden selected RowCollection key name. Value corrisponds to planetj.html.IHTML.ROW_COLLECTION_KEY. */
var hiddenRCKey = "PJSelRCKey";

/** Hidden selected Field key name. Value corrisponds to planetj.html.IHTML.FIELD_KEY. */
var hiddenFieldKey = "PJSelFldKey";

/**
 * Sets the selected RowCollection, Row, and Field.  This method
 * is used track which object has been selected.  Primarily used
 * by requests and actions.
 * 
 * @param sRCKey key of the RowCollection stored in the request or session (navigation).
 * @param sRowKey number of the row an action or request will be carried out upon.
 * @param sFieldKey name of the field an action or request will be carried out upon.
 */
function performSelectionMagic(sRCKey, sRowKey, sFieldKey, sMagicKey) {
	if (sRCKey != null && sRCKey.length != 0) {
		getElement(hiddenRCKey).value = sRCKey;
	}

	if (sRowKey != null && sRowKey.length != 0) {
		getElement(hiddenRowKey).value = sRowKey;
	}

	if (sFieldKey!= null && sFieldKey.length != 0) {
		getElement(hiddenFieldKey).value = sFieldKey;
	}

	return performMagic(sMagicKey);
}

/**
 * Sets the selected RowCollection, Row, and Field.  This method
 * is used track which object has been selected.  Primarily used
 * by requests and actions.
 * 
 * @param sRCKey key of the RowCollection stored in the request or session (navigation).
 * @param sRowKey number of the row an action or request will be carried out upon.
 * @param sFieldKey name of the field an action or request will be carried out upon.
 * @param sMagicKey magic request id
 * @param sTarget target window for magic request
 * @param sProperties window properties for target
 */
function performSelectionWindowMagic(sRCKey, sRowKey, sFieldKey, sMagicKey, sTarget, sProperties) {
	if (sRCKey != null && sRCKey.length != 0) {
		getElement(hiddenRCKey).value = sRCKey;
	}

	if (sRowKey != null && sRowKey.length != 0) {
		getElement(hiddenRowKey).value = sRowKey;
	}

	if (sFieldKey != null && sFieldKey.length != 0) {
		getElement(hiddenFieldKey).value = sFieldKey;
	}

	return performWindowMagic(sMagicKey, sTarget, sProperties);
}




