 function showfeedback(){
                var fb = document.getElementById('formfb');
                fb.style.display = 'block';
        }

 function show(){
                var d = document.getElementById('main');
                d.style.display = 'block';
                var f = document.getElementById('loading1');
                f.style.display = 'none';
                var ff = document.getElementById('loading2');
                ff.style.display = 'none';
        }

        function submitForm(){
                if(checkPriceRange()){
                document.forms[0].page.value = 1;
                document.forms[0].submit();
                }
        }


      function checkPriceRange(){
                var searchForm = document.forms[0];
                var astatus = true;
                var priceFrom = parseInt(searchForm.priceFrom.value);
                var priceTo = parseInt(searchForm.priceTo.value);
                if(priceTo > 0){
                        if( ( priceFrom > priceTo) && (priceFrom > 0 && priceTo > 0) ){
                        astatus = false;
                        alert("Please ensure that upper price range is larger than the From price");
                        }
                }
                return astatus;
        }

        function pager(action) {
                var pageVal = document.forms[0].page.value;
                var newPageVal = parseInt(pageVal);
                if(action == 'next'){
                        newPageVal = newPageVal + 1;
                }
                if(action == 'prev'){
                        newPageVal = newPageVal - 1;
                }
                document.forms[0].page.value = newPageVal;
                document.forms[0].submit();
                }

        function nextPage(){
                pager("next");
        }
        function previousPage() {
                pager("prev");
        }

        function uncheckPrice(priceObj){
                var element = priceObj.name;
                var elementVal = priceObj.value;
                len = document.forms[0].elements[element].length;
                for(i=0;i<len;i++){
                        if(document.forms[0].elements[element][i].value != elementVal){
                                document.forms[0].elements[element][i].checked=0;
                        }
                }
        }


         function sortbyOrder() {
         document.forms[0].page.value = 1;
         var iVal = document.forms[0].sortOrder.value;
                if(iVal == 'asc'){
                       var newSortVal  = 'desc';
                }
                else {
                         var newSortVal  = 'asc';
                }
                document.forms[0].sortOrder.value = newSortVal;
                document.forms[0].submit();
                }

       function sortbyCr() {
        document.forms[0].page.value = 1;
        var iVal = document.forms[0].searchCriteria.value;
                if(iVal == 'price'){
                       var newSortVal  = 'suburb';
                }
                if(iVal == 'suburb'){
                         var newSortVal  = 'price';
                }
                document.forms[0].searchCriteria.value = newSortVal;
                document.forms[0].submit();
                }
                
     /*   startList = function() {
             navRoot = document.getElementById("nav");
             for (i=0; i<navRoot.childNodes.length; i++) {
             node = navRoot.childNodes[i];
             if (node.nodeName=="LI") {
             node.onmouseover=function() {
              this.className+=" over";
          }
          node.onmouseout=function() {
             this.className=this.className.replace(" over", "");
          }
           }
          }
         }

        window.onload=startList; */
        
    function mOver() {
            var k = document.getElementById('list');
            k.style.display = 'block';
    }
    
     function mOut() {
             var k = document.getElementById('list');
             k.style.display = 'none';
    }
    
        function mOverr() {
            var l = document.getElementById('extra');
            l.style.display = 'block';
    }

     function mOutr() {
             var l = document.getElementById('extra');
             l.style.display = 'none';
    }

