var gnurl = 'http://www.gurunet.com/';

function submitHandler(f_el,target,ts,p){
var val=f_el.s.value;
if (val && val.search(/\S/)!=-1) {
	if (location.pathname.indexOf("/answers/")==0) return true;
    if (val=="robots.txt"||val=="favicon.ico") val = '"'+val+'"';
	var func = typeof(encodeURIComponent) != "undefined" ? encodeURIComponent : escape;
	var url = location.protocol + "//" + (ts?ts:location.host) + "/" + func(val) + (p?"?"+p:"");
	if (target){window.open(url,target);}
	else location.href = url;
}
return false;
}

function setFocus() {
	if (document.getElementById)
		document.getElementById("s").focus();
	return 1;
}
// google websearch page functions
function setStatus(url){window.status = url; return true;}
function clearStatus(){window.status = '';}
function gotoURL(url){window.location = url; return true;}

function ss(w,id) {window.status = w;return true;}
function cs(){window.status='';}
function ha(a){  }
function ca(a) {  window.open(document.getElementById(a).href);}
function ga(o,e) {
	if (document.getElementById) {
		a=o.id.substring(1);p = "";r = "";g = e.target;
		if (g) {t = g.id;f = g.parentNode;
		if (f) {p = f.id;h = f.parentNode;if (h)r = h.id;}
	}
	else {h = e.srcElement;f = h.parentNode;
	if (f)p = f.id;t = h.id;}
	if (t==a || p==a || r==a)return true;
	window.open(document.getElementById(a).href);}
}
