// JavaScript Document

function chkSpecialisation(sSpeciality) {
	var objList = document.frmSearch.s;

	if (sSpeciality != 'Any|0') {
		for (var x = 0; x < objList.options.length; x++) {
			if (objList.options[x].value == sSpeciality) {
				objList.options[x].selected = true;
				break;
			}
		}
		
	}
}

function qs(el) {
	if (window.RegExp && window.encodeURIComponent) {
		var ue=el.href;
		var qe=encodeURIComponent(document.j4s.q.value);
		
		if (ue.indexOf("q=")!=-1) {
			el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);
		} else {
			if (qe != "") {
				if (ue.indexOf("index.asp")!=-1) {
					el.href=ue.replace(new RegExp("index.asp"), "search.asp");
				}
				if (ue.indexOf("index.htm")!=-1) {
					el.href=ue.replace(new RegExp("index.asp"), "search.asp");
				}

				ue=el.href;
				
				if (ue.indexOf("?")!=-1) {
					el.href=ue+"&q="+qe;
				} else {
					el.href=ue+"?q="+qe;
				}
			}
		}
	}

	return 1;
}
