%%# @(#)[HyperWave] [WWW-G] preparesearch.html 2.58 [prepare search for different engines] [Juergen Schipflinger] %% %%macro scrip_prepare_search%% %%get_date_config%%%%#defines language spezific Date format%% %%endmacro%% %%macro exsearch_verity_scripts%% %%endmacro%% // A few little functions used by search.html and extendedsearch.html in order to make them work // with Edit Query and Edit Track Query... function eq_onload(ext) { var extended=ext || false; //only restore on first call coming from Edit (Track) Query, later restore cookie ! if (request.actp=="editquery" || request.actp=="edittrackquery") { var thedata=global_formobj.HW_DialogSearch; if (extended) thedata=thedata.substring(thedata.indexOf("^")+1); //throw "extended^" away... return 'HW_restoreForm(document.EXSEARCH1,"'+thedata+'")'; } else return 'restoreFormValuesFromCookie("EXSEARCH1")'; } function eq_moreless(butname,ext) { var extended=ext || false; var the_act=extended?"dialog.search":"dialog.extendedsearch"; var front=''; if (request.actp) //if edit(track)query... { var back=equalSplit(request.actp,"^"); var backCnt=back.le+"^"+(((back.ri-0)+1) || 1); var jscode="if (saveFormValuesInCookie('EXSEARCH1')) {document.EXSEARCH1.action='"+place("object.call",the_act+".action")+"&Parameter="+backCnt+"';submit();}"; return front+''; } else return front+''; } function eq_SearchScope() { var par={}; var theval=""; if (request.actp) //if edit(track)query... { //if first edit(track)query call...HW_DialogSearch has all the SearchDialog information if (request.actp=="editquery" || request.actp=="edittrackquery") { var vals=global_formobj.HW_DialogSearch.split('^'); var multiname=place("extended.search.form.scope")+"^0"; //^0 is the count added in HW_saveForm() var x=unescape(vals[0])=="extended"?1:0; //throw away "extended"... for (;x'); writeln(''); hw_writeSearchScope(par); } function eq_buttons(ext) { var extended=ext || false; if (request.actp) //if edit(track)query... { var back=equalSplit(request.actp,"^"); var backCnt=((back.ri-0)+1) || 1; var dlgqu=global_formobj.HW_DialogQuery; if (back.le=="editquery") //if editquery... { var theact=dlgqu.substring(0,dlgqu.indexOf("^")); var editqueryact=place("object.call","dialog.editquery"+theact+".action")+"&Parameter=ReSearch"; return {buttons:{" OK ":{exec:'if (prepareSearch('+extended+')) {document.EXSEARCH1.action="'+editqueryact+'";window.opener.top.canceledEditQuery=false;submit()}'},"Cancel":{exec:'window.opener.top.canceledEditQuery=true;history.go(-'+backCnt+');'}," Help ":{func:"help"}},HW_DialogQuery:{prompt:0,name:"HW_DialogQuery",def:dlgqu}}; } else //edittrackquery { //"configureAct" was sent (form element !) in the configure.dcjs methode return {buttons:{" OK ":{exec:'if (prepareSearch('+extended+')) {document.EXSEARCH1.action="'+global_formobj.configureAct+'";window.opener.top.canceledEditQuery=false;submit()}'},"Cancel":{exec:'window.opener.top.canceledEditQuery=true;history.go(-'+backCnt+');'}," Help ":{func:"help"}},HW_DialogQuery:{prompt:0,name:"HW_DialogQuery",def:dlgqu},configureAct:{prompt:0,name:"configureAct",def:global_formobj.configureAct}}; } } else return {buttons:{" OK ":{func:"submit"},"Close":{func:"close"}," Help ":{func:"help"}}}; }