﻿var root = "/" //foolsearch/"

function ent(e) {sv = this.value; var code;if (!e) var e = window.event; if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; if((code==13)) se()}
function ra(str,from,to) {var idx = str.indexOf(from); var dup = 0; while ( idx > -1 ) {if(dup+1 == idx) {str = str.replace(from,"");}else{str = str.replace(from,to);}dup = idx;idx = str.indexOf(from);}return str;}

function se() {
    var s = document.getElementById("search").value;
    if(s != "" && typeof(s) != "undefined") {
        window.location.href = root + "search/?q=" + escape(ra(s,":"," "))
    }
    return false;
}



