var SearchResultUtil=Class.create({initialize:function(a){this.RequestTarget=a;this.QueryParams={responseformat:"html",getcontent:true}},gotoOffset:function(a){new Ajax.Request(this.RequestTarget+"/goto",{method:"post",parameters:"offset="+a,onSuccess:function(b){$("searchresult-container").update(b.responseText)}})},viewMode:function(a){new Ajax.Request(this.RequestTarget+"/view",{method:"post",parameters:"displaymode="+a,onSuccess:function(b){$("searchresult-container").update(b.responseText)}})},orderby:function(a){new Ajax.Request(this.RequestTarget+"/orderby",{method:"post",parameters:"attribute="+a,onSuccess:function(b){$("searchresult-container").update(b.responseText)}})},filterby:function(b,a){new Ajax.Request(this.RequestTarget+"/filter",{method:"post",parameters:{index:b,attribute:a},onSuccess:function(c){$("searchresult-container").update(c.responseText)}})},excecuteSearch:function(a){$("searchresult-container").update("<p>Søker. Venligst vent...</p>");this.QueryParams=a;this.QueryParams.getcontent=false;this.QueryParams.responseformat="html";new Ajax.Request("/xmlhttprequest.php",{method:"get",parameters:this.QueryParams,onSuccess:function(b){$("searchresult-container").update(b.responseText)},onFailure:function(){$("searchresult-container").update("<p>ingen treff</p>")}})}});
