function getURLParameters(action) {
	var sURL = window.document.URL.toString();
	 
	if (sURL.indexOf("?") > 0){
		var qsvs;
                var qsvs2;
                var qsvs3;
                var hvs;
 
		//Split the url at the beginning of the query string. - KM
		var arrParams = sURL.split("?");
		
		//Split the query string into name/value pairs. - KM
		var fullqs = arrParams[1];
		var arrURLParams = fullqs.split("&");
		
		//Create two new arrays and set the number of items in each new array based on the total name/value pairs. - KM
		var arrParamNames = new Array(arrURLParams.length);
		var arrParamValues = new Array(arrURLParams.length);
		
		var i = 0;
		for (i=0;i<arrURLParams.length;i++) {
			var paramName1,paramName2,paramName3,qsv1,qsv2,qsv3;
			var paramName = new Array();
			var qsv = new Array();
                        var hv;
			//Split the name/value pairs into name and value. - KM
			var sParam =  arrURLParams[i].split("=");
			
			//Set the value of the parameter name array. - KM
			arrParamNames[i] = sParam[0];
			//Set the value of the parameter value array. - KM
			arrParamValues[i] = unescape(sParam[1]);
			//alert(arrParamNames[i] + "=" + arrParamValues[i]);
			
			//Setting the value of the variables using the parameter names and parameter values. - KM
			paramName1 = arrParamNames[0];
			paramName2 = arrParamNames[1];
			paramName3 = arrParamNames[2];
			qsv1 = arrParamValues[0];
			qsv2 = arrParamValues[1];
			qsv3 = arrParamValues[2];
                        if (arrParamNames[i] == 'headerID'){
                            hv = arrParamValues[i];
                        }
		}
		
		qsvs = qsv1;
                qsvs2 = qsv2;
                qsvs3 = qsv3;
                hvs = hv;
                
	}
	
	else {
		qsvs;
	}
	
	/*******************
	If action equals 'split', we want to return the value of the split query string. Currently, we are only concerned with the value of the position.
	If action does not equal 'split', we want to return the entire query string as one long string to be passed to a Flash movie. - KM 05/03/06
	********************/
	if (action == 'split'){
		return qsvs;
	}
        else if (action == 'second'){
		return qsvs2;
	}
        else if (action == 'third'){
		return qsvs3;
	}
        else if (action == 'headerVal'){
                return hvs
        }
	else {
		return fullqs;
	}
}
