// // This is a .html file instead of a .js file so SUBs will be processed. // function clearFilter(){ if(prevFieldNo!=0){ toggleField(prevFieldNo); hideHelper(prevFieldNo); prevFieldNo=0; }else if(prevBuiltinId!=0){ toggleBuiltin(prevBuiltinId,prevBuiltin); hideHelper(prevBuiltinId); prevBuiltinId=0; prevBuiltin=""; } hideAll(); hideCategory(prevCatId); selectCategory(0); return true; } function hideFilterFields(table){ if(table){ for(i=0;i<table.rows.length;i+=1){ table.rows[i].style.display='none'; } } var fd=document.getElementById("filterdefinition"); if(fd){ for(i=0;i<fd.rows.length;i+=1){ var row=fd.rows[i]; row.style.border=''; } } } function hideField(fieldNo){ if(fieldNo!=0){ hideHelper(fieldNo); toggleField(fieldNo); prevFieldNo=0; } } function hideCategory(catId){ if(catId>=0){ var catTable=document.getElementById("catTable"+catId); if(catTable) { catTable.style.display="none"; } var cat=document.getElementById("cat"+catId); if(cat) { for(var i=0;i<cat.cells.length;i+=1){ cat.cells[i].style.border=""; } } prevCatId=-1; } } var prevCatId=-1; function selectCategory(id) { if(typeof(id)!="undefined") { var catTable=document.getElementById("catTable"+id); if(catTable) { if(prevCatId>=0&&prevCatId!=id) { hideCategory(prevCatId); hideField(prevFieldNo); if(prevBuiltin.length>0){ toggleBuiltin(prevBuiltinId,prevBuiltin); prevBuiltinId=0; prevBuiltin=""; } } catTable.style.display=""; if(catTable.options){ catTable.options.selectedIndex=0; } var cat=document.getElementById("cat"+id); for(var i=0;cat&&i<cat.cells.length;i+=1){ cat.cells[i].style.borderTop='1px solid black'; cat.cells[i].style.borderBottom='1px solid black'; if(i==0)cat.cells[i].style.borderLeft='1px solid black'; if(i==cat.cells.length-1)cat.cells[i].style.borderRight='1px solid black'; } prevCatId=id; } } } var modelHelperArray = []; var menuBeingHelped=null; function hideHelper(fieldNo){ if(fieldNo!=0){ var f; if(0<fieldNo&&fieldNo<=100||String(fieldNo).indexOf('.')>0){ f=document.entry_form[filterDef.getBuiltin(fieldNo)]; }else{ if(fieldNo>100)fieldNo-=100; f=document.entry_form["field"+fieldNo]; } if(f&&typeof(f.selectedIndex)!="undefined"){ copyMenuSelectedToHelperArray(f,modelHelperArray); copyHelperArrayToMenu(f,modelHelperArray); var menuHelperDiv=document.getElementById("menuHelperDiv"); if(menuHelperDiv){ menuHelperDiv.style.display="none"; document.getElementById("menuHelper").value=""; } menuBeingHelped=null; } } } function showHelper(fieldNo){ if(fieldNo!=0){ var f; if(0<fieldNo&&fieldNo<=100||String(fieldNo).indexOf('.')>0){ f=document.entry_form[filterDef.getBuiltin(fieldNo)]; }else{ if(fieldNo>100)fieldNo-=100; f=document.entry_form["field"+fieldNo]; } if(f&&typeof(f.selectedIndex)!="undefined"){ copyMenuToHelperArray(f,modelHelperArray); var menuHelperDiv=document.getElementById("menuHelperDiv"); if(menuHelperDiv){ menuHelperDiv.style.display=""; } menuBeingHelped=f; } } } function menuHelperChanged(){ var f; if(prevFieldNo!=0){ var fieldNo=prevFieldNo; if(fieldNo>100)fieldNo-=100; f=document.entry_form["field"+fieldNo]; }else if(prevBuiltinId!=0){ f=document.entry_form[prevBuiltin]; } if(f&&typeof(f.selectedIndex)!="undefined"){ var menuHelper=document.getElementById("menuHelper"); updateMenu('',f,modelHelperArray,menuHelper); } } var prevFieldNo=0; function preSelectFilter(id,fieldNo){ if(!(prevFieldNo==0||prevFieldNo==fieldNo)){ toggleField(prevFieldNo); } if(prevBuiltin.length>0){ toggleBuiltin(prevBuiltinId,prevBuiltin); prevBuiltinId=0; prevBuiltin=""; } if(fieldNo){ toggleField(fieldNo); if(prevFieldNo==fieldNo){ prevFieldNo=0; }else{ prevFieldNo=fieldNo; } } } function restoreList(list,use_default){ if(list&&list.options){ for(var i=0;i<list.options.length;i+=1){ // We can't rely on defaultSelected for Saved filters. // Using defaultSelected reverts back to the saved format, instead of removing the field. if(use_default&&list.options[i].defaultSelected==true){ list.options[i].selected=true; }else{ list.options[i].selected=false; } } } } function clearField(fieldNo){ var filterName=getFilterName(fieldNo); if(typeof(filterName)=="string"){ var fieldName; var ffId=fieldNo; var element; var builtin=undefined; var sep=(fieldNo>100)?"_":""; if((0<fieldNo&&fieldNo<=100)||String(fieldNo).indexOf('.')>0){ builtin=filterDef.getBuiltin(fieldNo); fieldName=builtin; }else{ if(fieldNo>100)fieldNo-=100; fieldName="field"+fieldNo; } element=document.entry_form[fieldName]; if(element){ var special; if(typeof(builtin)!="undefined"){ special=document.entry_form["mSp-"+fieldNo]; }else{ special=document.entry_form["mSp-field"+ffId]; } if(special&&special.options&&special.selectedIndex>0){ restoreList(special,false); } if(element.options&&element.multiple){ restoreList(element); var elementGroup=document.entry_form[fieldName+"Group"]; if(elementGroup&&elementGroup.options){ restoreList(elementGroup); } }else if((element.value&&element.value.length>0)|| (element.options&&element.selectedIndex>=0&&element.options[element.selectedIndex].text!="")){ if(element.value){ element.value=""; }else{ restoreList(element); } var op=document.entry_form[fieldName+sep+"Op"]; if(op&&op.options){ restoreList(op,true); var ao=document.entry_form[fieldName+sep+"AndOr"]; if(ao&&ao.options)restoreList(ao,true); var op2=document.entry_form[fieldName+sep+"2Op"]; if(op2&&op2.options)restoreList(op2,true); var el2=document.entry_form[fieldName+sep+"2"]; if(el2){ if(el2.value&&el2.value.length>0){ el2.value=""; }else if(el2.options){ restoreList(el2); } } } } } } } function toggleBuiltin(id,builtin){ if(typeof(builtin)=="string"&&builtin.length>0){ var element=document.entry_form[builtin]; if(element&&element.parentNode&&element.parentNode.parentNode){ var tr=element.parentNode.parentNode; if(tr.style.display==""){ tr.style.display="none"; tr=document.getElementById("ff"+id); for(var i=0;tr&&i<tr.cells.length;i+=1){ tr.cells[i].style.border=""; } hideHelper(id); }else{ tr.style.display=""; tr=document.getElementById("ff"+id); for(var i=0;tr&&i<tr.cells.length;i+=1){ tr.cells[i].style.borderTop='1px solid black'; tr.cells[i].style.borderBottom='1px solid black'; if(i==0)tr.cells[i].style.borderLeft='1px solid black'; if(i==tr.cells.length-1)tr.cells[i].style.borderRight='1px solid black'; } if(document.getElementById("fieldList")){ addField(id); } showHelper(id); } var filterInfo = document.getElementById("filterInfo"); filterInfo.style.height="90px"; } } } function toggleField(fieldNo){ var filterInfo = document.getElementById("filterInfo"); var element; if(fieldNo>100){ element=document.getElementById("customRow"+(fieldNo-100)); }else{ element=document.getElementById("customRow"+fieldNo); } var criteria=document.getElementById("ff"+fieldNo); if(element.style.display==''){ element.style.display='none'; filterInfo.style.height = "90px;"; if(criteria){ for(var i=0;i<criteria.cells.length;i+=1){ criteria.cells[i].style.border=''; } } hideHelper(fieldNo); } else { element.style.display=''; if (element.clientHeight > 90) { filterInfo.style.height = (element.clientHeight+10)+"px"; } else { filterInfo.style.height = "90px"; } if(criteria){ for(var i=0;i<criteria.cells.length;i+=1){ criteria.cells[i].style.borderTop='1px solid black'; criteria.cells[i].style.borderBottom='1px solid black'; if(i==0)criteria.cells[i].style.borderLeft='1px solid black'; if(i==criteria.cells.length-1)criteria.cells[i].style.borderRight='1px solid black'; } } if(document.getElementById("fieldList")){ addField(fieldNo); } showHelper(fieldNo); } } var prevBuiltinId=0; var prevBuiltin=""; function preSelectBuiltin(id,builtin){ if(typeof(builtin)=="string"&&builtin.length>0){ var element=document.entry_form[builtin]; if(element&&element.parentNode&&element.parentNode.parentNode){ if(prevFieldNo!=0){ toggleField(prevFieldNo); prevFieldNo=0; } if(prevBuiltin.length>0&&prevBuiltin!=builtin){ toggleBuiltin(prevBuiltinId,prevBuiltin); } toggleBuiltin(id,builtin); if(prevBuiltin.length>0&&prevBuiltin==builtin){ prevBuiltinId=0; prevBuiltin=""; }else{ prevBuiltinId=id; prevBuiltin=builtin; } } } } function preSelectDropdown(fieldNo,value,separator){ var element; if(typeof(fieldNo)=="string"&&/^-?\d\d*$/.test(fieldNo)){ fieldNo=parseInt(fieldNo); } if(typeof(fieldNo)=="string" && fieldNo.charAt(0)=='m') { element=document.entry_form[fieldNo]; }else if((0<fieldNo&&fieldNo<=100)||String(fieldNo).indexOf(".")>0){ element=document.entry_form[filterDef.getBuiltin(fieldNo)]; } else { if(fieldNo>100)fieldNo-=100; element=document.entry_form["field"+fieldNo]; } if (element&&element.options){ if(typeof(separator)=="undefined"||separator.length==0){ separator=","; } var values = value.split(separator); for (i=0; i<element.options.length; i++) { element.options[i].selected = false; for(v=0; v<values.length; v++){ if(values[v]=="ALL"||values[v]==element.options[i].value||value==""){ element.options[i].selected=true; } } } } } function preSelectNumeric(fieldNo,value){ var fieldName; var sep=(fieldNo>100)?"_":""; if(typeof(fieldNo)=="string"&&/^-?\d\d*$/.test(fieldNo)){ fieldNo=parseInt(fieldNo); } if(typeof(fieldNo)=="string"){ fieldName=fieldNo; }else if((0<fieldNo&&fieldNo<=100)||String(fieldNo).indexOf(".")>0){ fieldName=filterDef.getBuiltin(fieldNo); } else { if(fieldNo>100)fieldNo-=100; fieldName="field"+fieldNo; } var element=document.entry_form[fieldName]; if(element&&typeof(element.value)!="undefined"){ var element2=document.entry_form[fieldName+sep+"2"]; if(element2&&typeof(element2.value)!="undefined"){ var elementOp=document.entry_form[fieldName+sep+"Op"]; var element2Op=document.entry_form[fieldName+sep+"2Op"]; var elementAndOr=document.entry_form[fieldName+sep+"AndOr"]; if(elementOp&&element2Op&&elementAndOr){ var match=/^\s*([<>!]?=?)\s*([0-9.]+)\s*(AND|OR)?\s*([<>!]?=?)\s*([0-9.]*)\s*$/.exec(value); if(match!=null&&match.length>0){ var i=elementOp.selectedIndex; if(match[1]=="<"){ i=0; }else if(match[1]=="<="){ i=1; }else if(match[1]=="="){ i=2; }else if(match[1]==">="){ i=3; }else if(match[1]==">"){ i=4; }else if(match[1]=="!="){ i=5; } elementOp.selectedIndex=i; element.value=match[2]; i=elementAndOr.selectedIndex; if(match[3]=="AND"){ i=0; }else if(match[3]=="OR"){ i=1; } elementAndOr.selectedIndex=i; var i=element2Op.selectedIndex; if(match[4]=="<"){ i=0; }else if(match[4]=="<="){ i=1; }else if(match[4]=="="){ i=2; }else if(match[4]==">="){ i=3; }else if(match[4]==">"){ i=4; }else if(match[4]=="!="){ i=5; } element2Op.selectedIndex=i; element2.value=match[5]; }else{ element.value=value; } }else{ element.value=value; } }else{ element.value=value; } } } var prevFilterClear=false; function preSelect(purpcd,filterInfo,title,clear){ var preSelectTitleDiv=document.getElementById("preSelectedTitle"); if(preSelectTitleDiv){ preSelectTitleDiv.innerHTML="Selected : "+purpcd.substring(2); } if(prevFilterClear||clear){ var catId=prevCatId; clearFilter(); selectCategory(catId); if(clear){ prevFilterClear=clear; }else{ prevFilterClear=false; } } if(filterInfo){ for(var fieldNo in filterInfo){ if(filterInfo[fieldNo]&&filterInfo[fieldNo].length>0&&filterInfo[fieldNo]!="ALL"){ if(document.getElementById("fieldList")){ addField(fieldNo); } var fieldName; var sep=(fieldNo>100)?"_":""; if(typeof(fieldNo)=="string"&&/^-?\d\d*$/.test(fieldNo)){ fieldNo=parseInt(fieldNo); } if(typeof(fieldNo)=="string"){ fieldName=fieldNo; }else if((0<fieldNo&&fieldNo<=100)||String(fieldNo).indexOf(".")>0){ fieldName=filterDef.getBuiltin(fieldNo); } else { var fId=fieldNo; if(fId>100)fId-=100; fieldName="field"+fId; } var element=document.entry_form[fieldName]; if(element&&element.options){ preSelectDropdown(fieldNo,filterInfo[fieldNo]); }else{ preSelectNumeric(fieldNo,filterInfo[fieldNo]); } }else{ preSelectDropdown(fieldNo,"XXNOTHING"); } if(document.getElementById("fieldList")&&filterInfo[fieldNo]=="ALL"){ addField(fieldNo); } } } if(document.getElementById("filterDefTitle")){ if(typeof(title)=="string"&&title!=""){ document.getElementById("filterDefTitle").value=title; }else{ document.getElementById("filterDefTitle").value=""; } } } function getFilterName(fieldNo){ var filterName=""; if((fieldNo>100||fieldNo<0)&&String(fieldNo).indexOf('.')<0){ var filterField=document.getElementById("filterField"); if(filterField&&filterField.options){ for(var i=0;i<filterField.options.length;i+=1){ if(filterField.options[i].value==fieldNo){ filterName=filterField.options[i].text; break; } } } } if(filterName==""&&typeof(fieldNo)!="undefined"){ filterName=filterDef.getFilterName(fieldNo); } return(filterName); } function reorderField(fieldNo,newindex){ if(document.getElementById("fieldList")){ var fieldList=document.getElementById("fieldList").value.replace(/^\s+|\s+$/g,"").split(/\s+/); if(fieldList.length==1&&fieldList[0]=="")fieldList.shift(); if(typeof(newindex)=="number"&&0<=newindex&&newindex<fieldList.length){ var curindex=-1; for(var i=0;i<fieldList.length;i+=1){ if(fieldList[i]==fieldNo){ curindex=i; fieldList.splice(i,1); break; } } if(curindex>=0){ fieldList.splice(newindex,0,fieldNo); } document.getElementById("fieldList").value=fieldList.join(" "); } } } function updateFilterDefinition(){ var html=""; var fieldList; if(document.getElementById("fieldList")){ fieldList=document.getElementById("fieldList").value.replace(/^\s+|\s+$/g,"").split(/\s+/); if(fieldList.length==1&&fieldList[0]=="")fieldList.shift(); }else{ fieldList=filterDef.filterId; }; var td_style="style=\"padding: 2px 25px; text-align: left; vertical-align: top;\""; var criteria=new Array(); var id=new Array(); for(var i=0;fieldList&&i<fieldList.length;i+=1){ var fieldNo=fieldList[i]; var filterName=getFilterName(fieldNo); var fieldName; var ffId=fieldNo; var element; var builtin=undefined; var sep=(fieldNo>100)?"_":""; if((0<fieldNo&&fieldNo<=100)||String(fieldNo).indexOf('.')>0){ builtin=filterDef.getBuiltin(fieldNo); fieldName=builtin; }else{ if(fieldNo>100)fieldNo-=100; fieldName="field"+fieldNo; } element=document.entry_form[fieldName]; if(element){ var href; var special; if(typeof(builtin)!="undefined"){ href=""; special=document.entry_form["mSp-"+fieldNo]; }else{ href=""; special=document.entry_form["mSp-field"+ffId]; } var value=""; var valueGroup=""; if(document.getElementById("filterInfo")==null){ href=""; } if(special&&special.options&&special.selectedIndex>0){ value=special.options[special.selectedIndex].text; } else if(element.options&&element.multiple){ var s=""; if (menuBeingHelped==element) { // might be searching with View option, where some selected options are not visible in search list copyMenuSelectedToHelperArray(element,modelHelperArray); for(var j=0;j<modelHelperArray.length;j+=1){ if(j<modelHelperArray.length && modelHelperArray[j].selected){ value+=(s+modelHelperArray[j].text); s="<br>"; } } } else { for(var j=0;j<element.options.length;j+=1){ if(element.options[j].selected){ // if not already done in helper loop above //if (menuBeingHelped!=element || // !(value==element.options[j].text || value.indexOf(element.options[j].text+"<br>")>0)) //{ value+=(s+element.options[j].text); s="
"; //} } } } if(value.length==0)value="ALL"; var elementGroup=document.entry_form[fieldName+"Group"]; if(elementGroup&&elementGroup.options){ s=""; for(var j=0;j<elementGroup.options.length;j+=1){ if(elementGroup.options[j].selected){ valueGroup+=(s+elementGroup.options[j].text); s="<br>"; } } } if(valueGroup.length==0)valueGroup="ALL"; }else if((element.value&&element.value.length>0)|| (element.options&&element.selectedIndex>=0&&element.options[element.selectedIndex].text!="")){ var elvalue; if(element.options&&element.selectedIndex>=0){ elvalue=element.options[element.selectedIndex].text; }else if(element.value){ elvalue=element.value; } var op=document.entry_form[fieldName+sep+"Op"]; if(op&&op.options){ var ao=document.entry_form[fieldName+sep+"AndOr"]; var op2=document.entry_form[fieldName+sep+"2Op"]; var el2=document.entry_form[fieldName+sep+"2"]; var optext=op.options[op.options.selectedIndex].text; optext.replace(/[<]/g,"<"); optext.replace(/[>]/g,">"); value=optext+" "+elvalue; if(el2&&((el2.value&&el2.value.length>0)|| (el2.options&&el2.selectedIndex>=0&&el2.options[el2.selectedIndex].text!=""))){ var el2value; if(el2.options&&el2.selectedIndex>=0){ el2value=el2.options[el2.selectedIndex].text; }else if(el2.value){ el2value=el2.value; } var optext2=op2.options[op2.options.selectedIndex].text; optext2.replace(/[<]/g,"<"); optext2.replace(/[>]/g,">"); value+=" "+ao.options[ao.options.selectedIndex].text+" "+optext2+" "+el2value; } }else{ value=elvalue; } } else if(element.length>0) { // multi list checkboxes (radio and multi checks) for(var e=0; e<element.length; e++) { if (element[e].checked) { if (value.length>0) value+="
"; value+=element[e].value; } } }else{ value="ALL"; } if(value.length>0&&(document.getElementById("fieldList")||value!="ALL")){ id.push(ffId); criteria.push(""+href+filterName+""+value+""); if(document.getElementById("filterInfo")!=null){ criteria[criteria.length-1]+="x"; } } if(valueGroup.length>0&&valueGroup!="ALL"){ id.push(ffId); criteria.push(""+href+filterName+" Group"+valueGroup+""); if(document.getElementById("filterInfo")!=null){ criteria[criteria.length-1]+="x"; } } } } if(criteria.length>0){ var colspan=2; var order=0; if(document.getElementById("filterInfo")!=null)colspan+=1; if(document.getElementById("fieldList")!=null&&filterDef.isOrdered()){ order=1; colspan+=1; } html+="

"+ "
"; if(order==1){ html+="
"; } html+="
"; if(document.getElementById("filterInfo")!=null){ html+="
"; } html+="
Move | Field | Value | Del
--- | --- | --- | ---
"; html+="

"; var td_style_nowrap="style=\"padding: 2px 0px 2px 25px; text-align: left; vertical-align: top; white-space: nowrap;\""; for(var i=0;i<criteria.length;i+=1){ html+="<tr>"; if(order==1){ var style_up=""; var style_down=""; var style_top=""; var style_bottom=""; var h="visibility:hidden"; if(i==0){ style_up=h; style_top=h if(criteria.length==1){ style_down=h; style_bottom=h; } }else if(i==criteria.length-1){ style_down=h; style_bottom=h; } html+="<td "+td_style_nowrap+">com/other/up_black.gif\" border=0 align=absbottom title=\"\" alt=\"\" style=\""+style_up+"\" onclick=\"reorderField("+id[i]+","+(i-1)+");\"> "+ "com/other/down_black.gif\" border=0 align=absbottom title=\"\" alt=\"\" style=\""+style_down+"\" onclick=\"reorderField("+id[i]+","+(i+1)+");\"> "+ "com/other/top_black.gif\" border=0 align=absbottom title=\"\" alt=\"\" style=\""+style_top+"\" onclick=\"reorderField("+id[i]+",0);\"> "+ "com/other/bottom_black.gif\" border=0 align=absbottom title=\"\" alt=\"\" style=\""+style_bottom+"\" onclick=\"reorderField("+id[i]+","+(criteria.length-1)+");\"> "+ criteria[i]; }else{ html+=criteria[i]; } html+=""; } html+="

"; }else{ html+=(document.getElementById("fieldList")?"":"") +" "; } var filterDefDiv=document.getElementById("filterDef"); if(filterDefDiv&&filterDefDiv.innerHTML&&!(filterDefDiv.filterHTML&&filterDefDiv.filterHTML==html)){ filterDefDiv.filterHTML=html; filterDefDiv.innerHTML=html; } setTimeout("updateFilterDefinition()",500); } function FilterDefinition(){ this.cat=new Array(); this.subCat=new Object(); this.subCatId=new Object(); this.filterInfo=new Object(); this.filterName=new Object(); this.filterId=new Array(); this.filterTitle=new Object(); this.filterClear=new Object(); if(document.getElementById("fieldList")){ this.heading=["Categories","Sub-Categories"]; this.ordered=true; }else{ this.heading=["",""]; this.ordered=false; } this.catAll=""; this.isOrdered=function(){ return(this.ordered); } this.setOrdered=function(state){ if(state){ this.ordered=true; }else{ this.ordered=false; } } this.addCategory=function(category) { if(typeof(category)!="undefined") { this.cat.push(category); this.subCat[category]=new Array(); this.subCatId[category]=new Object(); } } this.addSubCategory=function(category,subcategory,id,filterInfo,title,clear) { if(typeof(category)!="undefined"&&typeof(subcategory)!="undefined") { var allname=subcategory+"|"+category; this.subCat[this.catAll].push(allname); this.subCat[this.catAll].sort(function(x,y){ var a=String(x).toUpperCase(); var b=String(y).toUpperCase(); if(a>b)return 1; if(a<b)return -1; return 0; }); this.subCat[category].push(subcategory); if(typeof(id)=="undefined")id=0; this.filterId.push(id); this.subCatId[this.catAll][allname]=id; this.subCatId[category][subcategory]=id; if(typeof(filterInfo)!="undefined"){ this.filterInfo["fi"+id]=filterInfo; } this.filterName["fn"+id]=subcategory; if(typeof(title)=="string"&&title!=""){ this.filterTitle["ft"+id]=title; } if(clear==true){ this.filterClear["fc"+id]=true; } } } this.setHeadings=function(heading1,heading2) { if(heading1&&typeof(heading1)=="string"){ this.heading[0]=heading1; } if(heading2&&typeof(heading2)=="string"){ this.heading[1]=heading2; } } this.getHtmlStart=function() { var html="<table cellpadding=5 cellspacing=0 border=0 width=\"100%\">"; html+=""; html+="
"; html+="
"; html+=""+this.heading[0]+""+this.heading[1]+""; html+="
"; return(html); } this.getHtmlEnd=function(td1,td2) { var html="
"; html+=""+td1+""; html+=""+td2+""; html+="
"; html+="
"; html+=""; return(html); } this.getHtml=function() { var html=this.getHtmlStart(); var catHtml="

"; var subCatHtml=""; for(var i=1;i<this.cat.length;i+=1) { var cat=this.cat[i]; if(this.subCat[cat].length==0)continue; catHtml+="<tr id=\"cat"+i+"\" onmouseover=\"rollOn(event,this.id);\" onclick=\"selectCategory("+i+");\">
"; subCatHtml+="

\n"; for(var j=0;j<this.subCat[cat].length;j+=1) { subCat=this.subCat[cat][j]; subCatId=this.subCatId[cat][subCat]; subCatHtml+="<tr id=\"ff"+subCatId+"\" onmouseover=\"rollOn(event,this.id);\" onclick=\""; var fId="fi"+subCatId; if(this.filterInfo[fId]&&typeof(this.filterInfo[fId])=="string"){ subCatHtml+="preSelectBuiltin("+subCatId+",'"+this.filterInfo[fId]+"');"; }else if(this.filterInfo[fId]){ subCatHtml+="preSelect(this.id,{"; var separator=""; for(var fieldNo in this.filterInfo[fId]){ subCatHtml+=separator+fieldNo+":'"+this.filterInfo[fId][fieldNo]+"'"; separator=","; } subCatHtml+="}"; if(typeof(this.filterTitle["ft"+subCatId])!="undefined"&&this.filterTitle["ft"+subCatId]!=""){ subCatHtml+=",'"+this.filterTitle["ft"+subCatId]+"'"; } if(typeof(this.filterClear["fc"+subCatId])!="undefined"&&this.filterClear["fc"+subCatId]==true){ subCatHtml+=",true"; } subCatHtml+=");"; }else{ subCatHtml+="preSelectFilter(this.id,"+subCatId+");"; } subCatHtml+="\">
"; } subCatHtml+="
"+subCat+"

"; } catHtml+="
"+this.cat[i]+"

"; html+=this.getHtmlEnd(catHtml,subCatHtml); return(html); } this.getDropdownHtml=function() { var html=this.getHtmlStart(); var catHtml="
"; html+=this.getHtmlEnd(catHtml,subCatHtml); if(subCatHtml!=""){ html+="
"; } return(html); } this.getFilterDefinitionHtml=function() { var html="

"; html+="
" +(document.getElementById("fieldList")?"":"") +"
"; html+="
" +(document.getElementById("fieldList")?"":"") +"
"; html+="

"; return(html); } this.getBuiltin=function(id) { var builtin=""; if(typeof(id)!="undefined"&&typeof(this.filterInfo["fi"+id])!="undefined"){ builtin=this.filterInfo["fi"+id]; } return(builtin); } this.getFilterName=function(id) { var filterName=""; if(typeof(id)!="undefined"&&typeof(this.filterName["fn"+id])!="undefined"){ filterName=this.filterName["fn"+id]; } return(filterName); } this.addCategory(this.catAll); for(var i=0;i