function swapImg(sImgName,sImgSrc) { document.images[sImgName].src = sImgSrc; } function doBackground() { if (location.href.indexOf("hotlips.tres.tas.gov.au") != -1) { elmnts = document.getElementsByTagName("body"); bodElement = elmnts.item(0); bodElement.setAttribute("background", "/domino/tenders.nsf/training.gif"); } } function doSearch() { searchTxt = document.forms[0].SearchTerms.value; searchTxt = trim(searchTxt); document.location="/domino/tenders.nsf/searchAll-v?SearchView&Query=" + searchTxt + "&SearchOrder=1&SearchMax=0&SearchWV=FALSE&SearchFuzzy=FALSE&Start=1&Count=10&SearchOrder=1" } function trim(value) { var temp = value; var obj = /^(\s*)([\W\w]*)(\b\s*$)/; if (obj.test(temp)) { temp = temp.replace(obj, '$2'); } var obj = / /g; while (temp.match(obj)) { temp = temp.replace(obj, " "); } var obj = / /g; while (temp.match(obj)) { temp = temp.replace(obj, "+AND+"); } return temp; } function showSelect(isOn) { if(document.getElementById("mySelect") != null) { document.getElementById("mySelect").style.visibility = isOn ? "visible" : "hidden"; } }