	
			function lfnSetNextScreen( pobButton ) {

			var vtxUrlParam = '';		

			if ( typeof( pobButton.form ) == 'undefined' ) {
				var vobForm = document.forms[ atxDefaultFormName ];			
			} else {
				var vobForm = pobButton.form;
			}

			var vinPinID = 'NaN';
			switch ( pobButton.value ) {
			  case 'Refine Search' : 
				vtxUrlParam = 'pinID=2' ;
				break;	
			  case 'Show Results' :
				vinPinID = 3;
			  case '>' :
			  case '<' :
			  case '>>' :
			  case '<<' :
			  case 'Go' :
				vinPinIDLoc = location.search.toLowerCase().indexOf( 'pinid=' );
				//The following allows pagination to be added to any page.  the pagination control
				//will submit to the same pageID, unless you override the control by setting the 
				//vinPinID to a number value, as is done in the 'Show Results' case
				if ( isNaN(vinPinID) && (vinPinIDLoc > -1) ) {
					//find the current page id and use it
					vinPinIDEndLoc = location.search.indexOf( '&' , vinPinIDLoc );
					if ( vinPinIDEndLoc > -1 ) {
						vinPinID = location.search.substr( vinPinIDLoc + 6 , vinPinIDEndLoc - vinPinIDLoc - 6 );
					} else {
						vinPinID = location.search.substr( vinPinIDLoc + 6 );			
					}
				}

				if ( typeof(vobForm.elements['MBCQCTFilterPage']) == 'object' ) {
					var vinPageID = vobForm.elements['MBCQCTFilterPage'].value;
				} else {
					var vinPageID = '1';
				}
				vtxUrlParam = 'pinID=' + vinPinID + '&Page=' + vinPageID;

				break;

			  case 'View Details' :
				if ( typeof(vobForm.elements['MBCQCTFilter_vinApprID_Detail'].value) != 'undefined' ) {
					var vinDetailID = vobForm.elements['MBCQCTFilter_vinApprID_Detail'].value;
				} else {
					var vinDetailID = '';
				}
				vtxUrlParam = 'pinID=91&DetailID=' + vinDetailID;
				break;
			  case 'Compare Selected Vehicles' :
				if ( typeof(vobForm.elements['MBCQCTFilter_vinApprID_Compare'].value) != 'undefined' ) {
					var vinCompareID = vobForm.elements['MBCQCTFilter_vinApprID_Compare'].value;
				} else {
					var vinCompareID = '';
				}		  
				vtxUrlParam = 'pinID=4&CompareID=' + vinCompareID;
				break;
			  case 'Email Specs' :
				if ( typeof(vobForm.elements['MBCQCTFilter_vinApprID_Email'].value) != 'undefined' ) {
					var vinEmailID = vobForm.elements['MBCQCTFilter_vinApprID_Email'].value;
				} else {
					var vinEmailID = '';
				}		  
				vtxUrlParam = 'pinID=45&EmailID=' + vinEmailID;
				break;
			  default:
				vtxUrlParam = 'pinID=1';
			}
			if (!( vtxUrlParam == '' )) { vtxUrlParam = '?' + vtxUrlParam; }

			vobForm.action = atxFormSubmitAction + vtxUrlParam;
			return true;
	    }


	    function lfnSetThisID( pobButton, ptxInputValue , ptxInput, pinMode) {
		// Adds or removes individual IDs to the indicated input field
		//	pobButton :	This is included to allow a reference to the form, and is used in cases of
		//			pinMode = 2 .  It is intended that the usual reference is 'this'. If
		//			this does not refer to a form object then the default form name is used
		//	ptxInput :	The 'name' of the input box in the same form as the button
		//	ptxInputValue :	the ID (or any text) to be added or removed from the input
		//	pinMode :
		//			 3 - toggles the state of the content	
		//			 2 - set (delete all content followed by an add)
		//			 1 - Add
		//			 0 - Remove
		//			-1 - Depends on a checkbox state



			//determine which element will be changed
			if ( typeof( pobButton.form ) == 'undefined' ) {
				var vobForm = document.forms[ atxDefaultFormName ];			
			} else {
				var vobForm = pobButton.form;
			}

			//first we interpret the action and prepare for the addition of removal process			
			if ( pinMode == 3 ) {
				//toggle the content state

			}
			if ( pinMode == 2 ) {
				//absolutely set the content (deleted here and added in the addition section below
				
				vobForm.elements[ ptxInput ].value = ptxInputValue;

			}
			if ( pinMode == -1 ) {
				//action is dependent on the current state of the passed  checkbox			
				
				if ( pobButton.checked ) {
					pinMode = 1;
				} else {
					pinMode = 0;
				}
			}
			
			//Now we actually add or remove the specific entry (if still required)
			if ( pinMode == 1 ) {
				// Add this ID if it doesn't exists already
				if ( vobForm.elements[ ptxInput ].value == '' ) {
					vobForm.elements[ ptxInput ].value = ptxInputValue;
				} else {
					if ( vobForm.elements[ ptxInput ].value.indexOf( ptxInputValue ) == -1 ) {
						vobForm.elements[ ptxInput ].value = vobForm.elements[ ptxInput ].value + ',' + ptxInputValue;
					}
				}				

			} 
			if ( pinMode == 0 ) {
				// Remove this ID if it exists
			    if (vobForm.elements[ptxInput].value.length > 0) {
				 while (vobForm.elements[ ptxInput ].value.indexOf( ptxInputValue ) > -1) {
				    vobForm.elements[ ptxInput ].value = vobForm.elements[ ptxInput ].value.replace( ptxInputValue , '');
				    vobForm.elements[ ptxInput ].value = vobForm.elements[ ptxInput ].value.replace( /,,/ , ',');
				    vobForm.elements[ ptxInput ].value = vobForm.elements[ ptxInput ].value.replace( /^,/ , '');
				    vobForm.elements[ ptxInput ].value = vobForm.elements[ ptxInput ].value.replace( /,$/ , '');
				 }
			    }
			}

			return true;
		}

		function lfnSubmitThisForm( vynDisplayResults ) {
		//Set this form to go to the results page next and submit the form
			
			if ( vynDisplayResults ) {
				lfnSetNextScreen( document.forms[ atxDefaultFormName ].elements[ 'MBCQCTFilter_Matrix' ] );
			}

			document.forms[ atxDefaultFormName ].submit();

		}

		function lfnSubmitMatrixForm( vynDisplayResults ) {
		//Set this form to go to the results page next and submit the form
			
			if ( vynDisplayResults ) {
				lfnSetNextScreen( document.forms[ atxDefaultFormName ].elements[ 'MBCQCTFilter_Matrix' ] );
			}

			document.forms[ atxDefaultFormName ].action = atxFormSubmitAction + '?pinID=1';
			document.forms[ atxDefaultFormName ].submit();

		}

		function lfnSubmitDetailForm( vtxPageID , vtxVehicleID ) {
		//Set this form to go to the results page next and submit the form

			document.forms[ atxDefaultFormName ].action = 'index.cfm?pinID=' + vtxPageID + '&DetailID=' + vtxVehicleID;
			document.forms[ atxDefaultFormName ].submit();

		}