var pth = location.pathname;
var setit = true;
var xfindsv = ["", "xfind"];
if (pth.search(/^\/auto/) > -1) {
    xfindsv = ["/auto/list", "description"];
} else if (pth.search(/^\/biz\/services/) > -1) {
    xfindsv = ["/biz/services/list", "txtsimplenew"];
} else if (pth.search(/^\/biz/) > -1) {
    xfindsv = ["/biz/browse", "txtsimplenew"];
} else if (pth.search(/^\/jobs/) > -1) {
    xfindsv = ["/jobs/list", "jobdesc"];
} else if (pth.search(/^\/people\/cvbank/) > -1) {
    xfindsv = ["/people/cvbank/list.php", "txtdesc"];
} else if (pth.search(/^\/people\/personals/) > -1) {
    xfindsv = ["", ""];
} else if (pth.search(/^\/people/) > -1) {
    xfindsv = ["/people/list", "txtsimplenew"];
} else if (pth.search(/^\/realestate/) > -1) {
    xfindsv = ["/realestate/list", "description"];
} else if (pth.search(/^\/shopping/) > -1) {
    xfindsv = ["/shopping/list", "product"];
} else if (pth.search(/^\/guide/) > -1) {
    xfindsv = ["", ""];
} else {
    $("#frmfind").submit(function(event) {
	alert('Cannot search in this section!');
	return false;
    });
    setit = false;
}

$('#frmfind').attr('action', xfindsv[0]);
$('#xfind').attr('name', xfindsv[1]);
