//---------------------------------------------------------------------------
// go to the create screen
//---------------------------------------------------------------------------

function gotoCreate() {
	document.Maintain.Create.value = 'Create';
	
	document.Maintain.submit();
}

//---------------------------------------------------------------------------
// go to the select screen
//---------------------------------------------------------------------------

function gotoSelect() {
	document.Maintain.Select.value = 'Select';
	
	document.Maintain.submit();
}

//---------------------------------------------------------------------------
// go to the compare screen
//---------------------------------------------------------------------------

function gotoCompare() {
	document.Maintain.Compare.value = 'Compare';
	
	document.Maintain.submit();
}

//---------------------------------------------------------------------------
// go to the importance screen
//---------------------------------------------------------------------------

function gotoImportance() {
	document.Maintain.Importance.value = 'Importance';
	
	document.Maintain.submit();
}

//---------------------------------------------------------------------------
// go to the recommend screen
//---------------------------------------------------------------------------

function gotoRecommend() {
	document.Maintain.Recommend.value = 'Recommend';
	
	document.Maintain.submit();
}

//---------------------------------------------------------------------------
// open the legal window
//---------------------------------------------------------------------------

function openLegalWindow( url ) {
	var windowName = 'LegalWindow';
	
	var handle = window.open( url, windowName, 'width=400,height=100,toolbar=no,resizable=no,scrollbars=yes' );
}

//---------------------------------------------------------------------------
// open the importance window
//---------------------------------------------------------------------------

function openImportanceWindow( url ) {
	var windowName = 'ImportanceWindow';
	
	var handle = window.open( url, windowName, 'width=500,height=300,toolbar=no,resizable=no,scrollbars=no' );
}

//---------------------------------------------------------------------------
// set the update flags if a selection has been made
//---------------------------------------------------------------------------

function setUpdateFlag( index ) {
	eval( 'document.Maintain.answerUpdate_'  + index + '.value = 1' );
			
	eval( 'document.Maintain.updateEvaluations'  + '.value = 1' );
	eval( 'document.Maintain.valueSet'  + '.value = 1' );
}

//---------------------------------------------------------------------------
// set the factor row color
//---------------------------------------------------------------------------

function setFactorRowColor( index ) {
	var ns4 = ( document.layers ) ? true : false;

	if ( ns4 == false ) {
		var rowSelected = eval( 'document.Maintain.factorFlag_'  + index + '.checked' );
	
		var bgcolor = 'white';
	
		if ( rowSelected == true ) {
			bgcolor = 'lightgoldenrodyellow';
		} // end if
	
		var factorRow = 'factorRow_' + index;

		document.getElementById(factorRow).style.backgroundColor = bgcolor;
	} // end if
}
