function doLogin() { s = document.location.search; if (s.toLowerCase().indexOf("&login") == -1 ) { a = (s=="") ? "?Open&Login" : "&Login"; document.location.href += a; } } function ApplyWindow(){ theWindow = window.open('/clipper/clipperjob.nsf/Application?OpenForm','Job', 'width=550,height=650, scrollbars=Yes') } function doSearch (t, s ) { //alert(t); var regExp1 = /\bfield\b/; var regExp2 = /[(,),<,>,\[,\]]/; //var searchtype = t.value; //alert(searchtype); var str = s.value; if ( str == "" ){ alert("Please be sure to enter something to search for."); s.focus(); } else { if ( typeof regExp1.source != 'undefined' ) //supports regular expression testing if ( regExp1.test( str ) || regExp2.test( str ) ){ var alrt = "Please note that you can not include:"; alrt += "\n\nThe reserved word 'field'\nthe characters [, ], (, ), < or >"; alrt += "\n\nin your search query!\n\nIf you are confident that you know"; alrt += "\nwhat you are doing, then you can\nmanually produce the URL required." s.focus(); return alert( alrt ); } openDbRelativeURL("content/Search?OpenDocument&SearchType=" + t +"&SearchQuery=" + escape( str )); } } function doAdvancedSearch (t, Country, City,CompanyName, Department, FirstName, LastName) { openDbRelativeURL("content/Search?OpenDocument&SearchType=" + t +"&Country=" + Country + "&City=" + City + "&CompanyName=" + CompanyName + "&Department=" + Department + "&FirstName=" + FirstName + "&LastName=" + LastName); } //W_clock.city.options[W_clock.city.selectedIndex].value function returnFalse(s){ //guess the field if not supplied s = (s == null) ? document.forms[0].Query : s; //if you want to do the search, use this line doSearch("all", s); //if you want to alert the user, use this line //alert('Please use the \'Go!!\' button to do a search'); //this line should always be here!! return false; } function openDbRelativeURL( url, target ){ //Check we have a target window; target = (target == null ) ? window : target; //Work out the path of the database; if (location.pathname.indexOf('.nsf')>-1) { path = location.pathname.split('.nsf')[0] + '.nsf/'; } else { path = location.pathname.toLowerCase().split('content')[0]; } target.location.href = path + url; } var pathName = leftOf('/',location.pathname); function ReplaceViewTwisties() { for (var i=0; i=0;i--) { comp=lrgstring.substring(i-1,strlen2) comp = comp.substring(0,strlen1) if (comp == smstring) { foundat = i break } } return lrgstring.substring(foundat,255) } function imgSkift(imgDocID,imgObjName){ document.images[imgDocID].src = imgObjName; } function popupList(type,field,openURL){ ReturnTo(type,field); window.open(openURL); } function windowOpener(target, width, height){ controlWindow=window.open(target,"","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ""); } function popupImages(openURL){ windowOpener(openURL,'800','600'); } function ReturnTo(returnType,returnName){ SetCookie ('ReturnTo', '', '/' ,'', returnType+'|'+returnName); } function rightlinksPopup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=600,height=400, scrollbars=no'); return false; } function clink(person) { //link to vCard var u1 = '../vCard.v'; var u2 = 'cf?ReadForm&person='+person; document.write(''); document.write(' Download vCard'); }