function doGlobalSearch2() { x = document.searchForm.globalSearch.value; if (x=="") { return false } else { while (x.substring(0,1) == ' ') x = x.substring(1); while (x.substring(x.length-1,x.length) == ' ') x = x.substring(0,x.length-1); while (x.search(" ")!=-1) x=x.replace(" "," "); document.searchForm.globalSearch.value = x x=x.replace(" or ","+or+"); x=x.replace(" and ","+and+"); x=x.replace(/ /g,"+and+"); window.location="/hmkb2.nsf/SearchGP/?SearchView&Query=("+x+")&SearchOrder=4&Start=1&Count=100&BrowseMode=g"; } } function doSubmit() { f=document.forms[0]; if(f.Words.value=="") { alert("Please enter your search criteria."); } else { f.submit(); } } function nWin(url,name) { var newwindow; switch(name) { case "HMBenchmarking": newwindow=window.open(url,name,'height=600,width=800,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes,location=no,menubar=no'); break; case "HMDataEntry": newwindow=window.open(url,name,'height=600,width=800,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,status=no,location=no,menubar=no'); break; case "HouseMarkQPI": newwindow=window.open(url,name,'height=600,width=800,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,status=no,location=no,menubar=no'); break; case "HouseMarkCW": newwindow=window.open(url,name,'height=600,width=800,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,status=no,location=no,menubar=no'); break; default: newwindow=window.open(url,name,'height=600,width=800,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes,location=yes,menubar=yes'); break; } if (window.focus) {newwindow.focus()} } function addThread(parentID) { if (confirm("Your comments will be added to the HouseMark Forum as a new thread. \n\n Do you want to continue?")) { window.location.href="/hmforum.nsf/topic?openform&TC=&parentunid="+parentID } } function jumpAZ(Letter) { window.location.href="/hmkb2.nsf/OrganisationAZ?OpenForm&cat="+Letter+"&count=1000" } function resetSearch(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].KLOE.selectedIndex = 0; document.forms[0].OrgRegion.selectedIndex=0; document.forms[0].OrgType.selectedIndex=0; document.forms[0].SortResults.selectedIndex = 0; document.forms[0].Words.focus(); } function resetSearchIR(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].Org.selectedIndex=0; document.forms[0].OrgRegion.selectedIndex=0; document.forms[0].OrgType.selectedIndex=0; document.forms[0].SortResults.selectedIndex = 0; document.forms[0].Words.focus(); } function resetSearchWAO(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].Org.selectedIndex=0; //document.forms[0].KLOE.selectedIndex = 0; document.forms[0].SortResults.selectedIndex = 0; document.forms[0].Words.focus(); } function resetSearchHOS(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].Topic.selectedIndex=0; document.forms[0].Ombudsman.selectedIndex = 0; document.forms[0].Tenure.selectedIndex = 0; document.forms[0].SortResults.selectedIndex = 0; document.forms[0].Words.focus(); } function resetSearchSLCNG(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].Show.selectedIndex=0; document.forms[0].SortResults.selectedIndex = 0; document.forms[0].Words.focus(); } function resetSearchLO(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].TSA.selectedIndex = 0; document.forms[0].OrgRegion.selectedIndex=0; /* document.forms[0].OrgType.selectedIndex=0; */ document.forms[0].SortResults.selectedIndex = 0; document.forms[0].Words.focus(); } function resetSearchPI(){ document.forms[0].Words.value=""; document.forms[0].Operator[1].checked=true; document.forms[0].TSA.selectedIndex = 0; document.forms[0].BusinessAreas.selectedIndex=0; document.forms[0].CrossCuttingServices.selectedIndex=0; document.forms[0].Words.focus(); /* document.forms[0].Products.selectedIndex = 0;*/ } function runSubmit(f) { if (f.Title.value=="") { alert("You are required to enter a title before posting your message"); f.Title.focus(); return false } if(f.AuthorSubscribed[0].checked && f.AuthorMailAddress.value=="") { alert("An email address is required to watch this post") return false } if (f.AuthorSubscribed[0].checked && !validEmail(f.AuthorMailAddress.value)) { alert("A valid email address is required to subscribe to this thread") f.AuthorMailAddress.focus() return false } f.Saved.value="2" } function validEmail(email) { invalidChars = " /:,;" if (email == "") { return false } for (i=0; i -1) { return false } } atPos = email.indexOf("@",1) if (atPos == -1) { return false } if (email.indexOf("@",atPos+1) > -1) { return false } periodPos = email.indexOf(".",atPos) if (periodPos == -1) { return false } if (periodPos+3 > email.length) { return false } return true } function openEforms(val, app, u) { var mySplitResult = val.split("#"); var url="http://benchmarking.housemark.co.uk/FAM/Loader.aspx?Oid="+ mySplitResult[0]+"&Perms="+mySplitResult[1]+"&Oty="+mySplitResult[2]+"&Sel="+app+"&Uperms="+u; nWin(url,'HMEforms'); } function openDashboard(val, server) { window.frames.BMDashboard.location.href="http://"+server+".housemark.co.uk/HousemarkBenchmark/Dashboard/DashboardOverview.aspx?Oid="+ val; }