global proc int xfImportOptions( 	string $parent, 
					string $action,
					string $initialSettings, 
					string $resultCallback )
//
//	Description:
//		This script posts the xfrog import options.
//
//	Parameters:
//		$parent	- the elf parent layout for this options layout. It is
//					always a scrollLayout.
//		$action	- the action that is to be performed with this invokation
//					of this proc. Valid options are:
//						"query" - construct the options string and pass it
//									to the resultCallback.
//						"post"	- post all the elf controls.
//		$resultCallback	-
//				This is the proc to be called with the result string. 
//				resultCallback ( string $optionsString )
//
//	Returns:
//		1 if successfull.
//		0 otherwise.
//
{
	int 	$result;
	string 	$currentOptions;

	if ($action == "post") {
		setUITemplate -pushTemplate DefaultTemplate;
		setParent $parent;
		
		checkBoxGrp -numberOfCheckBoxes 1 -label1 "Import as Objects" "Xfrog_Import_type_checkbox";

		setUITemplate -popTemplate;
		
		checkBoxGrp -e -value1 1 "Xfrog_Import_type_checkbox";

		$result = 1;
	} else if ($action == "query") {
		
		$currentOptions = (`checkBoxGrp -q -value1 "Xfrog_Import_type_checkbox"`);
	
		eval($resultCallback+" \""+$currentOptions+"\"");

		$result = 1;
	} else {
		$result = 0;
	}

	return $result;
}
