
    function newForm() {
	    document.frmQuickSearch.action = "/index.php?pg=search&model="+document.getElementById("model").value;
    }
    //will be removed
	function changeHref() {
		window.location.href = "javascript:clientSideInclude('models', '/pages/dropdown_models.php?make=" + document.getElementById('make').value + "')";
	}

	//Remove special character on the text using for displaying in url rewrite
	function urlEncodeDisplayText(str) {
		var result = "";
	    for (i = 0; i < str.length; i++) {
            if (str.charAt(i) == '+') {
                result += '-';
            } else if (str.charAt(i) == '/') {
                result += '_';
            } else if (str.charAt(i) == '&') {
                result += '-';
            } else if (str.charAt(i) == ' ') {
                result += '_';
            } else {
                result += str.charAt(i);
            }
	    }
	    return escape(result);
	}

	function encode(str) {
		var result = "";

	    for (i = 0; i < str.length; i++) {
            if (str.charAt(i) == ' ') {
                result += '+';
            } else {
                result += str.charAt(i);
            }
	    }
	    return escape(result);
	}

	function getDropDownSelectedText(ctrl) {
		var result = "";
		var len = ctrl.length;
		var i = 0;
		for (i = 0; i < len; i++) {
			if (ctrl[i].selected) {
				result = ctrl[i].text;
			}
		}

		return result;
	}

