Option Explicit sub openWindow(urlparams) dim y dim e y="width=750px,height=500px,top=20,left=20,resizable=yes,scrollbars=yes,status=no,location=no,toolbar=no,menubar=no" set e=window.open(cstr(urlparams),"",y) end sub dim is_selectWindow dim first_time dim oninitSikumParam dim hipus_mitkadem dim tihkur_mitkadem dim id_dochot dim id_grp_dochot dim rad_checked dim paramMadad(25) 'param no 1 dim paramTkufot(25) 'param no 2 dim paramKupot(25) 'param no 3 dim paramShanimAhora(25) 'param no 7 dim paramTaagidimSholtim(25) 'param no 8 dim paramHevrotMenahelot(25) 'param no 9 dim paramSugeiTaagidimSholtim(25) 'param no 10 dim paramSugeiKupotGemel(25) 'param no 11 dim valueKupot(100) 'selected kupot dim valueTaagidimSholtim(50) 'selected taagidim sholtim dim valueHevrotMenahelot(50) 'selected hevrot memahelot dim valueSugeiTaagidimSholtim(50) 'selected sugei taagidim sholtim dim valueSugeiKupotGemel(50) 'selected sugei kupot dim textKupot(100) 'selected kupot dim textTaagidimSholtim(50) 'selected taagidim sholtim dim textHevrotMenahelot(50) 'selected hevrot memahelot dim textSugeiTaagidimSholtim(50) 'selected sugei taagidim sholtim dim textSugeiKupotGemel(50) 'selected sugei kupot dim countKupot 'number of selected kupot dim countTaagidimSholtim 'number of selected taagidim sholtim dim countHevrotMenahelot 'number of selected hevrot memahelot dim countSugeiTaagidimSholtim 'number of selected sugei taagidim sholtim dim countSugeiKupotGemel 'number of selected sugei kupot dim numDochMax 'max report number dim numDochCur 'current report number (מס' סידורי , לא תואם למס' הדוח) dim oclusiya 'number of param for population dim taarich_max 'the last date for reports dim taarich_max_str 'the last date for reports in words dim daf_height dim miun dim opt0000, opt10, opt30, opt20', opt60 dim tsuot_height dim oldValue dim is_changeValue Sub window_onload select case document.form1.inout.value case "in" minimum12.innerText = "" case "out" minimum12.innerText = "מינימום - 12 חודשים" end select is_selectWindow = false is_changeValue = false if document.Form1.tbDebug.value = "1" then msgbox("DEBUG MODE - TURN OFF SWITCH BEFORE MOVING TO INTERNET !!") end if if instr(window.navigator.appVersion,"MSIE 5")>0 then window.document.getelementbyid("tsuot").scrolling = "yes" document.Form1.imgl.style.visibility = "hidden" document.Form1.imgr.style.visibility = "hidden" document.Form1.btnSort.style.visibility = "hidden" document.Form1.tbGirsa.value = "5" else document.all.tdempty.height = "2px" document.Form1.tbGirsa.value = "6" end if 'get information about all the reports and their parameters GetDochotDetails document.Form1.Dochot.selectedIndex = 1 'show list of dochot groups document.Form1.grpDochot.size = "5" document.Form1.grpDochot.style.height = "90px" ' FIRE THE EVENT TO FILTER OUT THE Shemot Dochot COMBOBOX grpDochot_onchange ' Show control buttons document.Form1.cbBatzea.style.visibility = "visible" document.Form1.cbXML.style.visibility = "visible" document.Form1.cbExcel.style.visibility = "visible" document.Form1.cbHadpes.style.visibility = "visible" ' Init oclusiya oclusiya_init oclusiya1_init if document.Form1.tbDochot.value = "0" then oninitSikumParam = true end if 'הכנת TAB של חיפוש פשוט miun = "0" document.body.load Set_output_html dim i for i=0 to 3 document.Form1.output.options(i).style.backgroundcolor="b0cce1" next cbtab3_onclick cbtab2_onclick cbtab1_onclick scroll 0,120 dim strDemo ' strDemo = cstr(<%=strDemo%>) strDemo = cstr(document.form1.tbdemo.value) dim newo select case strDemo case "2" document.Form1.rbTkufa12.checked = true document.Form1.hodashme.selectedIndex = 0 document.Form1.output.selectedIndex = 4 case "3" cbtab2_onclick document.Form1.grpDochot.selectedIndex = 1 grpDochot_onchange document.Form1.Dochot.selectedIndex = 0 Dochot_onchange set newo=document.createelement("OPTION") document.Form1.indeksim.appendchild newo document.form1.indeksim.item(0).value = "1" document.form1.indeksim.item(0).text = "אג""ח ממשל. סחירות" set newo=document.createelement("OPTION") document.Form1.indeksim.appendchild newo document.form1.indeksim.item(1).value = "11" document.form1.indeksim.item(1).text = "מדד ת""א 100" set newo=document.createelement("OPTION") document.Form1.indeksim.appendchild newo document.form1.indeksim.item(2).value = "14" document.form1.indeksim.item(2).text = "שער הדולר" document.Form1.Dochot.selectedIndex = 0 indeksim_onchange document.Form1.rbTkufa12.checked = true document.form1.oclusiya.selectSize=1 document.form1.oclusiya.Demo=1 end select 'handle initial dates "from" and "to" document.Form1.shanimad.selectedIndex = 0 ' document.Form1.hodashad.selectedIndex = _ ' cint(document.Form1.MM.item(0).text) - 1 document.Form1.hodashad.selectedIndex = _ cint(document.Form1.maxTkufaMM.value) - 1 ' taarich_max = document.Form1.MM.item(0).text & _ ' document.Form1.shanimad.item(0).value taarich_max = document.Form1.maxTkufaMM.value & _ document.Form1.maxTkufaYYYY.value ' taarich_max_str =document.Form1.hodashad.item(document.Form1.hodashad.selectedIndex).text & " " & _ ' document.Form1.shanimad.item(0).value shanim_init if strDemo = "3" then document.Form1.oclusiya.ShowSelect end sub sub shanim_init ' if document.Form1.MM.item(0) is nothing then exit sub if document.Form1.rbTkufa12.checked then document.Form1.shanimad.selectedIndex = 0 document.Form1.hodashad.selectedIndex = _ cint(document.Form1.maxTkufaMM.value) - 1 if document.Form1.hodashad.selectedIndex < 11 then document.Form1.hodashme.selectedIndex = _ document.Form1.hodashad.selectedIndex + 1 document.Form1.shanimme.selectedIndex = _ document.Form1.shanimad.selectedIndex + 1 else document.Form1.hodashme.selectedIndex = 0 document.Form1.shanimme.selectedIndex = _ document.Form1.shanimad.selectedIndex end if document.Form1.shanimme.disabled=true document.Form1.shanimad.disabled=true document.Form1.hodashme.disabled=true document.Form1.hodashad.disabled=true else document.Form1.shanimme.disabled=false document.Form1.shanimad.disabled=false document.Form1.hodashme.disabled=false document.Form1.hodashad.disabled=false end if end sub sub rbTkufa12_onclick if document.Form1.rbTkufa12.checked then shanim_init end sub sub rbTkufa_onclick if document.Form1.rbTkufa.checked then shanim_init end sub sub oclusiya_init oclusiya_clear 'combo initialization valueTaagidimSholtim(0) = "0000" textTaagidimSholtim(0) = "כל תאגידים שולטים" countTaagidimSholtim = 1 valueHevrotMenahelot(0) = "0000" textHevrotMenahelot(0) = "כל חברות מנהלות" countHevrotMenahelot = 1 valueSugeiTaagidimSholtim(0) = "0000" textSugeiTaagidimSholtim(0) = "כל סוגי תאגידים שולטים" countSugeiTaagidimSholtim = 1 valueSugeiKupotGemel(0) = "0000" textSugeiKupotGemel(0) = "כל סוגי הקופות" countSugeiKupotGemel = 1 'oclusiya initialization countKupot = 0 dim newo set newo=document.createelement("OPTION") document.Form1.oclusiya.appendchild newo document.Form1.oclusiya.item(0).value = "0000" document.Form1.oclusiya.item(0).text = "כל הקופות" document.Form1.taoclusiya.value = "כל הקופות" document.Form1.taoclusiya.select() document.Form1.taindeksim.value="" document.Form1.tbOldOldDoch.value = "0" document.Form1.tbOldDoch.value = "0" end sub sub oclusiya1_init dim new_op set new_op = document.createElement("option") new_op.value = "0000" new_op.text = "כל ההתמחויות" document.Form1.maslulim.add new_op document.Form1.taMaslulim.value = "כל ההתמחויות" set new_op = document.createElement("option") new_op.value = "0000" new_op.text = "כל תאגידים שולטים" document.Form1.taagidSholet.add new_op document.Form1.taTaagidim.value = "כל תאגידים שולטים" set new_op = document.createElement("option") new_op.value = "0000" new_op.text = "כל סוגי תאגידים שולטים" document.Form1.sugTaagidSholet.add new_op document.Form1.taSugeiTaagidim.value = "כל סוגי תאגידים שולטים" set new_op = document.createElement("option") new_op.value = "0000" new_op.text = "כל סוגי ההקופות" document.Form1.sugKupa.add new_op document.Form1.taSugeiKupot.value = "כל סוגי הקופות" end sub 'get information about all the reports and their parameters sub GetDochotDetails Dim numDoch numDochMax = 0 Dim d dim n dim m set d = dochotXML.XMLDocument.documentElement For Each n In d.ChildNodes set m = n.Attributes numDochMax = numDochMax + 1 ' numDoch = m.GetNamedItem("numDoch").Value 'if paramXXX(n) = 1 then paramXXX exists in report number "n" 'if paramXXX(n) = 0 then paramXXX doesn't exist in report number "n" paramKupot(numDochMax) = m.GetNamedItem("paramKupot").Value paramTkufot(numDochMax) = m.GetNamedItem("paramTkufot").Value paramMadad(numDochMax) = m.GetNamedItem("paramMadad").Value paramShanimAhora(numDochMax) = m.GetNamedItem("paramShanimAhora").Value paramTaagidimSholtim(numDochMax) = m.GetNamedItem("paramTaagidimSholtim").Value paramHevrotMenahelot(numDochMax) = m.GetNamedItem("paramHevrotMenahelot").Value paramSugeiTaagidimSholtim(numDochMax) = m.GetNamedItem("paramSugeiTaagidimSholtim").Value paramSugeiKupotGemel(numDochMax) = m.GetNamedItem("paramSugeiKupotGemel").Value Next end sub 'handle visibility of all the parameters 'p1,p2,... = 1 if the parameter 1,2,... exists; = 0 if doesn't exist sub params_visibility_handle(p1,p2,p3,p7,p8,p9,p10,p11) select case oclusiya case 3 countKupot = Get_Oclusiya_Count(valueKupot, textKupot) case 8 countTaagidimSholtim = Get_Oclusiya_Count(valueTaagidimSholtim, textTaagidimSholtim) case 9 countHevrotMenahelot = Get_Oclusiya_Count(valueHevrotMenahelot, textHevrotMenahelot) case 10 countSugeiTaagidimSholtim = Get_Oclusiya_Count(valueSugeiTaagidimSholtim, textSugeiTaagidimSholtim) case 11 countSugeiKupotGemel = Get_Oclusiya_Count(valueSugeiKupotGemel, textSugeiKupotGemel) end select div1.style.visibility = visibility_handle(p1,1) div1a.style.visibility = visibility_handle(p1,1) div2.style.visibility = visibility_handle(p2,2) visibility_handle p3,3 'div7.style.visibility = visibility_handle(p7,7) visibility_handle p8,8 visibility_handle p9,9 visibility_handle p10,10 visibility_handle p11,11 end sub function visibility_handle(p,n) if p = 0 then visibility_handle = "hidden" else if n = 3 then oclusiya = n Set_Oclusiya valueKupot, _ textKupot, _ countKupot, _ "kupot", _ "paramkg", _ "ID_KUPA", _ "ID_SHEM", _ "קופות גמל", _ "קופת גמל", _ "SHM_KUPA_KATZAR", _ "ID_KUPA", _ "f" elseif n = 8 then oclusiya = n Set_Oclusiya valueTaagidimSholtim, _ textTaagidimSholtim, _ countTaagidimSholtim, _ "taagidim", _ "paramtsh", _ "ID_GUF_MACHZIK", _ "SHM_GUF_MACHZIK", _ "תאגידים שולטים", _ "תאגיד שולט", _ "", _ "ID_GUF_MACHZIK", _ "m" elseif n = 9 then oclusiya = n Set_Oclusiya valueHevrotMenahelot, _ textHevrotMenahelot, _ countHevrotMenahelot, _ "hevrot", _ "paramhm", _ "ID_GUF_MINAHEL", _ "SHM_GUF_MINAHEL", _ "חברות מנהלות", _ "חברה מנהלת", _ "", _ "ID_GUF_MINAHEL", _ "f" elseif n = 10 then oclusiya = n Set_Oclusiya valueSugeiTaagidimSholtim, _ textSugeiTaagidimSholtim, _ countSugeiTaagidimSholtim, _ "sugeitaagidim", _ "paramstsh", _ "ID_SUG_GUF_MACHZIK", _ "SHM_SUG_GUF_MACHZIK", _ "סוגי תאגידים שולטים", _ "סוג תאגיד שולט", _ "", _ "ID_SUG_GUF_MACHZIK", _ "m" elseif n = 11 then oclusiya = n Set_Oclusiya valueSugeiKupotGemel, _ textSugeiKupotGemel, _ countSugeiKupotGemel, _ "sugeikupot", _ "paramskp", _ "ID_SUG_KUPA", _ "SHM_SUG_KUPA", _ "סוגי קופות", _ "סוג קופה", _ "", _ "ID_SUG_KUPA", _ "m" else visibility_handle = "visible" end if end if end function 'initialization of control for selected population sub Set_Oclusiya(value_array,text_array,count_of, _ obj_name,sourceXml,fldValue,fldText, _ sugNatun,sugEhidatNatun, _ shemMiun,idMiun,min) document.form1.oclusiya.length = 0 dim tastr dim cnt tastr="" dim new_op for cnt=0 to count_of - 1 set new_op = document.createElement("option") new_op.value = value_array(cnt) new_op.text = text_array(cnt) document.Form1.oclusiya.add new_op next document.form1.oclusiya.name=obj_name 'if instr(window.navigator.appVersion,"MSIE 5")>0 then if document.Form1.grpDochot.selectedIndex = 1 then document.form1.oclusiya.sourceXml=sourceXml & "katzar" else document.form1.oclusiya.sourceXml=sourceXml end if 'else ' document.form1.oclusiya.sourceXml=sourceXml 'end if document.form1.oclusiya.fldValue=fldValue document.form1.oclusiya.fldText=fldText document.form1.oclusiya.sugNatun=sugNatun document.form1.oclusiya.sugEhidatNatun=sugEhidatNatun document.form1.oclusiya.shemMiun=shemMiun document.form1.oclusiya.idMiun=idMiun document.form1.oclusiya.style.visibility = "Visible" document.Form1.oclusiya.allKupot="1" if paramMadad(numDochCur) = 1 then document.form1.oclusiya.selectSize=3 document.Form1.oclusiya.allKupot="0" else document.form1.oclusiya.selectSize=4 end if oclusiya_onchange if min="f" then document.Form1.kname3.value = _ document.Form1.kname3.value + " " + "נבחרות" else document.Form1.kname3.value = _ document.Form1.kname3.value + " " + "נבחרים" end if oclusiya_select end sub function Get_Oclusiya_Count(value_array,text_array) dim cnt for cnt=0 to document.Form1.oclusiya.length - 1 value_array(cnt) = document.form1.oclusiya.item(cnt).value text_array(cnt) = document.form1.oclusiya.item(cnt).text next Get_Oclusiya_Count = cnt end function sub oclusiya_onchange dim tastr tastr="" dim cnt dim row_text for cnt=0 to document.Form1.oclusiya.length - 1 row_text = document.form1.oclusiya.item(cnt).text tastr = tastr & row_text if cnt < document.Form1.oclusiya.length - 1 then tastr = tastr & chr(10) end if next document.Form1.taoclusiya.value=tastr sizechange oclusiya_select end sub function one_month_or_many if document.Form1.shanimad.item(document.Form1.shanimad.selectedIndex).value = _ document.Form1.shanimme.item(document.Form1.shanimme.selectedIndex).value and _ document.Form1.hodashad.item(document.Form1.hodashad.selectedIndex).value = _ document.Form1.hodashme.item(document.Form1.hodashme.selectedIndex).value then one_month_or_many = true else one_month_or_many = false end if end function sub oclusiya_clear document.Form1.taoclusiya.value="" document.Form1.oclusiya.length=0 sizechange end sub sub tihkur_clear(sugNatun) dim obj1, obj2 select case sugNatun case "התמחויות" set obj2 = document.Form1.maslulim set obj1 = document.Form1.taMaslulim case "תאגידים שולטים" set obj2 = document.Form1.taagidSholet set obj1 = document.Form1.taTaagidim case "סוגי תאגידים שולטים" set obj2 = document.Form1.sugTaagidSholet set obj1 = document.Form1.taSugeiTaagidim case "סוגי קופות" set obj2 = document.Form1.sugKupa set obj1 = document.Form1.taSugeiKupot end select obj1.value="" obj2.length=0 end sub sub tihkur_onchange(sugNatun) dim tastr dim cnt dim row_text tastr="" dim obj1, obj2 select case sugNatun case "התמחויות" set obj2 = document.Form1.maslulim set obj1 = document.Form1.taMaslulim case "תאגידים שולטים" set obj2 = document.Form1.taagidSholet set obj1 = document.Form1.taTaagidim case "סוגי תאגידים שולטים" set obj2 = document.Form1.sugTaagidSholet set obj1 = document.Form1.taSugeiTaagidim dim i,j dim strSugim dim n dim nlist dim pos1, pos2 strSugim = "" for i=0 to document.Form1.sugTaagidSholet.length - 1 strSugim = strSugim & document.Form1.sugTaagidSholet.item(i).value strSugim = strSugim + "," next tihkur_clear("תאגידים שולטים") if strSugim = "0000," then paramtshlfisug.loadXML(copyXML.xml) else paramtshlfisug.loadXML "" tempXML.loadXML(copyXML.xml) set nlist=tempXML.documentelement.childnodes for each n in nlist pos1=1 pos2=instr(1,strSugim,",") while pos2>0 if mid(strSugim,pos1,pos2-pos1)=n.selectsinglenode("./" & "ID_SUG_GUF_MACHZIK").text or _ strSugim = "0000" or n.selectsinglenode("./" & "ID_SUG_GUF_MACHZIK").text = "0000" then paramtshlfisug.documentElement.appendChild n end if pos1=pos2+1 pos2=instr(pos1,strSugim,",") wend next end if dim new_op set new_op = document.createElement("option") new_op.value = "0000" new_op.text = "כל תאגידים שולטים" document.Form1.taagidSholet.add new_op document.Form1.taTaagidim.value = "כל תאגידים שולטים" case "סוגי קופות" set obj2 = document.Form1.sugKupa set obj1 = document.Form1.taSugeiKupot end select for cnt=0 to obj2.length - 1 row_text = obj2.item(cnt).text tastr = tastr & row_text if cnt < obj2.length - 1 then tastr = tastr & chr(10) end if next obj1.value=tastr 'sizechange 'oclusiya_select end sub sub indeksim_onchange dim tastr dim cnt dim row_text tastr="" for cnt=0 to document.Form1.indeksim.length - 1 row_text = document.form1.indeksim.item(cnt).text tastr = tastr & row_text if cnt < document.Form1.indeksim.length - 1 then tastr = tastr & chr(10) end if next document.Form1.taindeksim.value=tastr sizechange oclusiya_select end sub sub oclusiya_select document.Form1.taoclusiya.select() end sub sub indeksim_clear document.Form1.taindeksim.value="" document.Form1.indeksim.length=0 sizechange end sub sub Dochot_onchange 'get the number of the current report ' numDochCur = document.Form1.Dochot.item(document.Form1.Dochot.selectedIndex).value ' numDochCur = document.Form1.Dochot.selectedIndex + 1 Dim numDoch dim d dim n dim m numDoch = document.Form1.Dochot.value set d = dochotXML.XMLDocument.documentElement Dim numDochMax numDochMax = 0 For Each n In d.ChildNodes set m = n.Attributes numDochMax = numDochMax + 1 if m.GetNamedItem("numDoch").Value = numDoch then numDochCur = numDochMax Next oninitSikumParam = true document.Form1.kname3.value = _ document.Form1.Dochot.item(document.Form1.Dochot.selectedIndex).text 'handle visibility of parameters params_visibility_handle paramMadad(numDochCur),_ paramTkufot(numDochCur), _ paramKupot(numDochCur), _ paramShanimAhora(numDochCur), _ paramTaagidimSholtim(numDochCur),_ paramHevrotMenahelot(numDochCur), _ paramSugeiTaagidimSholtim(numDochCur), _ paramSugeiKupotGemel(numDochCur) end sub 'get report sub cbBatzea_onclick 'document.Form1.tbDochot.value = "1" 'report has been executed sikumtab.style.visibility = "hidden" document.all.buttonstab.style.visibility="visible" if hipus_mitkadem = true then if oninitSikumParam = true then initSikumParam oninitSikumParam = false end if if document.Form1.oclusiya.length >= 1 then if (document.Form1.oclusiya.item(0).value = "0000" or _ document.Form1.oclusiya.length > 0) and _ document.Form1.oclusiya.fldValue<>"ID_KUPA" or _ one_month_or_many = true and _ document.Form1.oclusiya.fldValue<>"ID_KUPA" then else initSikumParam end if end if document.Form1.tbOldOldDoch.value = document.Form1.tbOldDoch.value document.Form1.tbOldDoch.value = _ document.Form1.Dochot.item(document.Form1.Dochot.selectedIndex).value end if document.Form1.txtSugPeula.value = "1" ' DOCH - to be referenced by server submit_form("tsuot") ' The iframe end sub 'get Excel table sub cbExcel_onclick document.Form1.txtSugPeula.value = "2" ' EXCEL - to be referenced by server submit_form("_blank") ' Open the Excel in a new Window End Sub sub cbExcel1_onclick cbExcel_onclick End Sub 'print sub cbHadpes_onclick document.Form1.txtSugPeula.value = "3" ' Print - to be referenced by server submit_form("_blank") ' Open the the .pdf page to be printed in a new Window ' submit_form("") ' Open the the .pdf page to be printed in a new Window End Sub Sub cbHadpes1_onclick cbHadpes_onclick End Sub 'קובץ XML Sub cbXML_onclick 'no errors on test beginning document.Form1.tbError.value = "" bdikat_tkinut_tkufa(false) bdikat_tkinut_doch bdikat_tkinut_oclusia if document.Form1.tbError.value <> "error" then if hipus_mitkadem = true then document.Form1.hipus.value = 1 else document.Form1.hipus.value = 0 end if dim h,w,str h = 350 'cstr(window.screen.availheight - 250) w = 600 'cstr(window.screen.availwidth - 200) str = "dialogHeight: " & h & "px; dialogWidth: " & w & _ "px; scroll: no; status: no" window.showmodaldialog "horadatXML.aspx",window,cstr(str) end if End Sub 'reset 'sub cbNake_onclick_ ' document.Form1.txtSugPeula.value = "4" ' Reset the form ' oclusiya_clear ' document.Form1.oclusiya.outerhtml="" ' countKupot = 0 ' countTaagidimSholtim = 0 ' countHevrotMenahelot = 0 ' countSugeiTaagidimSholtim = 0 ' countSugeiKupotGemel = 0 ' document.Form1.reset() ' document.Form1.target = "_self" 'end Sub ' Check the parameters on the form and submit if it's right sub submit_form(target) if document.Form1.tbDochot.value = "0" and document.Form1.txtSugPeula.value <> "1" then else dim b_bdikot b_bdikot = false if document.Form1.tbDochot.value = "0" then if document.Form1.txtSugPeula.value = "1" then if tihkur_mitkadem = false then document.Form1.tbDochot.value = "1" else document.Form1.tbDochot.value = "2" end if end if bdikot_tkinut b_bdikot = true if document.Form1.tbError.value = "error" then document.Form1.tbDochot.value = "0" end if end if if b_bdikot = false then bdikot_tkinut if document.Form1.tbError.value <> "error" then if document.Form1.txtSugPeula.value="1" then document.all.iframe_footer.style.top = "-180px" document.all.buttonstab.style.visibility="hidden" document.Form1.clock.style.display="" document.all.tsuot.style.visibility = "hidden" window.scroll 0,400 document.all.tsuot.style.height="0px" end if if hipus_mitkadem = false and tihkur_mitkadem = false then if document.Form1.gemelRadio1.checked then document.Form1.tbDochot.value = "1" 'חיפוש פשוט end if if document.Form1.gemelRadio3.checked then document.Form1.tbDochot.value = "7" 'מדדי אלפא end if 'if document.Form1.gemelRadio2.checked then ' document.Form1.tbDochot.value = "8" 'מדדי שארפ 'end if end if else exit sub end if end if document.Form1.shanimme.disabled=false document.Form1.shanimad.disabled=false document.Form1.hodashme.disabled=false document.Form1.hodashad.disabled=false is_changeValue = false document.Form1.action="gemelTsuot.aspx?aaa=" & now document.Form1.tbsubmit.value="submit" document.Form1.target = target document.Form1.submit end sub Sub cbOpenAll_onclick if document.Form1.cbOpenAll.value = "פתח הכל" then initSikumParamNegdi else initSikumParam end if cbBatzea_onclick end sub Sub initSikumParam document.Form1.tbramaAll.value = "0" document.Form1.tbrama1.value = "" document.Form1.tbrama2.value = "" document.Form1.lasttitle.value = "" document.Form1.cbOpenAll.style.backgroundImage = "url(images\but1_bg.gif)" document.Form1.cbOpenAll.Style.Color = "3d698b" document.Form1.cbOpenAll.value = "פתח הכל" document.Form1.o1.src = "images/but1_left.gif" document.Form1.o2.src = "images/but1_right.gif" end sub Sub initSikumParamNegdi document.Form1.tbramaAll.value = "1" document.Form1.tbrama1.value = "" document.Form1.tbrama2.value = "" document.Form1.lasttitle.value = "" document.Form1.cbOpenAll.style.backgroundImage = "url(images/but2_bg.gif)" document.Form1.cbOpenAll.Style.Color = "purple" document.Form1.o1.src = "images/but2_left.gif" document.Form1.o2.src = "images/but2_right.gif" document.Form1.cbOpenAll.value = "סגור הכל" end sub 'test the parameters Sub bdikat_tkinut_oclusia_sug(oclusia) dim sel_count dim strOclusia dim cnt if hipus_mitkadem = true then sel_count = document.Form1.oclusiya.length if sel_count = 0 then ErrorHandle("נא לבחור " & _ document.Form1.oclusiya.sugEhidatNatun & "/" & _ document.Form1.oclusiya.sugNatun & " - פרמטר מספר 3") else 'form list of codes strOclusia = "" for cnt=0 to document.Form1.oclusiya.length - 1 if cnt > 0 then strOclusia = strOclusia + "," end if strOclusia = strOclusia + document.Form1.oclusiya.item(cnt).value next document.all.tbKupotList.value = strOclusia end if elseif tihkur_mitkadem = true then select case oclusia case "התמחויות" oldValue = document.Form1.tbMaslulimList.value sel_count = document.Form1.maslulim.length if sel_count = 0 then document.Form1.tbMaslulimList.value="0000" else 'form list of codes strOclusia = "" for cnt=0 to document.Form1.maslulim.length - 1 if cnt > 0 then strOclusia = strOclusia + "," end if strOclusia = strOclusia + document.Form1.maslulim.item(cnt).value next document.all.tbMaslulimList.value = strOclusia if oldValue <> document.Form1.tbMaslulimList.value then document.Form1.miunLeTihkur.value = "new" end if end if case "תאגידים שולטים" oldValue = document.Form1.tbTaagidSholetList.value sel_count = document.Form1.taagidSholet.length if sel_count = 0 then document.Form1.tbTaagidSholetList.value="0000" else 'form list of codes strOclusia = "" for cnt=0 to document.Form1.taagidSholet.length - 1 if cnt > 0 then strOclusia = strOclusia + "," end if strOclusia = strOclusia + document.Form1.taagidSholet.item(cnt).value next document.all.tbTaagidSholetList.value = strOclusia if oldValue <> document.Form1.tbTaagidSholetList.value then document.Form1.miunLeTihkur.value = "new" end if end if case "סוגי תאגידים שולטים" oldValue = document.Form1.tbSugTaagidSholetList.value sel_count = document.Form1.sugTaagidSholet.length if sel_count = 0 then document.Form1.tbSugTaagidSholetList.value="0000" else 'form list of codes strOclusia = "" for cnt=0 to document.Form1.sugTaagidSholet.length - 1 if cnt > 0 then strOclusia = strOclusia + "," end if strOclusia = strOclusia + document.Form1.sugTaagidSholet.item(cnt).value next document.all.tbSugTaagidSholetList.value = strOclusia if oldValue <> document.Form1.tbSugTaagidSholetList.value then document.Form1.miunLeTihkur.value = "new" end if end if case "סוגי קופות" oldValue = document.Form1.tbSugKupaList.value sel_count = document.Form1.sugKupa.length if sel_count = 0 then document.Form1.tbSugKupaList.value="0000" else 'form list of codes strOclusia = "" for cnt=0 to document.Form1.sugKupa.length - 1 if cnt > 0 then strOclusia = strOclusia + "," end if strOclusia = strOclusia + document.Form1.sugKupa.item(cnt).value next document.all.tbSugKupaList.value = strOclusia end if if oldValue <> document.Form1.tbSugKupaList.value then document.Form1.miunLeTihkur.value = "new" end if end select else sel_count = document.Form1.input.length if sel_count = 0 then ErrorHandle("נא לבחור " & _ "קופת גמל" & "/" & "קופות גמל") else 'form list of codes strOclusia = "" for cnt=0 to document.Form1.input.length - 1 if cnt > 0 then strOclusia = strOclusia + "," end if strOclusia = strOclusia + document.Form1.input.item(cnt).value next document.all.tbKupotList.value = strOclusia end if end if End sub Sub bdikat_tkinut_tkufa(yesno) 'test: date from 01/1999 to today dim dateme dim datead dateme = document.Form1.hodashme.value + document.Form1.shanimme.value datead = document.Form1.hodashad.value + document.Form1.shanimad.value if (right(datead,4) < right(dateme,4)) or _ ((right(datead,4) = right(dateme,4)) and _ (left(datead,2) < left(dateme,2))) then ErrorHandle("לא ניתן לבחור תאריך סיום דוח המקדים את תאריך תחילת דוח") end if if dateme < "011999" then ErrorHandle("תאריך `מ-` לא יכול להיות קטן מתאריך `ינואר 1999`") end if if (right(datead,4) > right(taarich_max,4)) or _ ((right(datead,4) = right(taarich_max,4)) and _ (left(datead,2) > left(taarich_max,2))) then ErrorHandle("טרם נקלטו נתונים למערכת עבור" & " " & _ document.Form1.hodashad.item(document.Form1.hodashad.selectedIndex).text & " " & _ document.Form1.shanimad.item(document.Form1.shanimad.selectedIndex).text) end if if document.form1.inout.value = "out" and yesno=true then if document.Form1.shanimme.selectedIndex = document.Form1.shanimad.selectedIndex and _ (document.Form1.hodashme.selectedIndex > 0 or document.Form1.hodashad.selectedIndex < 11) or _ document.Form1.shanimme.selectedIndex = document.Form1.shanimad.selectedIndex + 1 and _ (12 - document.Form1.hodashme.selectedIndex + document.Form1.hodashad.selectedIndex + 1 < 12) then ErrorHandle("לא נתן לבחור תקופה קטנה מ-12 חודשים") end if end if end Sub Sub bdikat_tkinut_doch 'test: only one report dim sel_count dim cnt if hipus_mitkadem = true then sel_count = 0 for cnt=0 to document.Form1.Dochot.length-1 if document.Form1.Dochot.item(cnt).selected=true then sel_count = sel_count+1 end if next if sel_count>1 or sel_count=0 then ErrorHandle("נא לבחור דוח אחד לביצוע") end if end if end Sub Sub bdikat_tkinut_oclusia if hipus_mitkadem = true then 'test parameter - kupot if paramKupot(numDochCur) = 1 then bdikat_tkinut_oclusia_sug("קופות") end if 'test parameter - taagidim sholtim if paramTaagidimSholtim(numDochCur) = 1 then bdikat_tkinut_oclusia_sug("תאגידים שולטים") end if 'test parameter - sugei taagidim sholtim if paramSugeiTaagidimSholtim(numDochCur) = 1 then bdikat_tkinut_oclusia_sug("סוגי תאגידים שולטים") end if 'test parameter - sugei kupot if paramSugeiKupotGemel(numDochCur) = 1 then bdikat_tkinut_oclusia_sug("סוגי קופות") end if 'test parameter - hevrot menahelot if paramHevrotMenahelot(numDochCur) = 1 then bdikat_tkinut_oclusia_sug("חברות מנהלות") end if elseif tihkur_mitkadem = true then 'test parameter - התמכויות bdikat_tkinut_oclusia_sug("התמחויות") 'test parameter - taagidim sholtim bdikat_tkinut_oclusia_sug("תאגידים שולטים") 'test parameter - sugei taagidim sholtim bdikat_tkinut_oclusia_sug("סוגי תאגידים שולטים") 'test parameter - sugei kupot bdikat_tkinut_oclusia_sug("סוגי קופות") else 'חיפוש פשוט bdikat_tkinut_oclusia_sug("קופות") end if end Sub Sub bdikot_tkinut if document.Form1.tbDochot.value = "0" then exit sub if is_changeValue then document.Form1.miunLeTihkur.value = "new" else document.Form1.miunLeTihkur.value = "old" end if 'no errors on test beginning document.Form1.tbError.value = "" 'test: only one report bdikat_tkinut_doch 'test parametr - tkufot if paramTkufot(numDochCur) = 1 then bdikat_tkinut_tkufa(true) end if 'test parameter - oclusia bdikat_tkinut_oclusia if hipus_mitkadem = true then ' determine which madad was picked dim sel_count dim sel_count2 dim strIndex dim cnt if paramMadad(numDochCur) = 1 then sel_count = document.Form1.indeksim.length sel_count2 = sel_count + document.Form1.oclusiya.length if sel_count=0 then ErrorHandle("נא לבחור לפחות מדד שוק אחד") elseif sel_count2 > 4 then ErrorHandle("נא לבחור לא יותר מ-4 מדדי שוק ו" & document.Form1.oclusiya.sugNatun & " ביחד") else 'form list of indeksim strIndex = "" for cnt=0 to document.Form1.indeksim.length - 1 if cnt > 0 then strIndex = strIndex + "," end if strIndex = strIndex + document.Form1.indeksim.item(cnt).value next document.all.tbSugMadad.value = strIndex end if end if document.Form1.tbsugtzvira.value = "3" else document.Form1.tbsugtzvira.value = "3" end if if tihkur_mitkadem = true then ' determine which siman Tzvira was picked Dim strSimanTzvira Dim ctrl strSimanTzvira = "" cnt = 0 for each ctrl in document.Form1.RadioGroupZvira if ctrl.checked = true then document.Form1.tbSimanZvira.value = 3 - CStr(cnt) strSimanTzvira = 3 - CStr(cnt) exit for end if cnt = cnt + 1 next if isNumeric(document.form1.NechasimAd,null,"")=1 and _ isNumeric(document.form1.NechasimMi,null,"")=1 then if cDbl(document.form1.NechasimAd.value) < cDbl(document.form1.NechasimMi.value) then ErrorHandle("נא לבחור ערך עליון ותחתון נכון ליתרת נכסים") end if end if isNumeric document.form1.NechasimAd,null,"נא לבחור ערך נכון ליתרת נכסים" isNumeric document.form1.NechasimMi,null,"נא לבחור ערך נכון ליתרת נכסים" isNumeric document.form1.dmeNihulAdSelect,document.form1.dmeNihulAd,"נא לבחור ערך נכון לדמי ניהול" isNumeric document.form1.TsuaMi,null,"נא לבחור ערך נכון לתשואה שנתית ממוצעת" isNumeric document.form1.stiyatTekenAdSelect,document.form1.stiyatTekenAd,"נא לבחור ערך נכון לסטיית תקן" end if end sub 'test if value/text of x-control is numeric 'result 0 - no ' 1 - yes ' 2 - no use as select condition in SQL 'if y is not null - copy from x-control to y-control for the server ' function isNumeric(x,y,message) 'בדיקת מספר-תחום לתקינות dim i dim sim dim point, sign point = false sign = false isNumeric=1 if message <> "" then if y <> null then oldValue = y.value end if end if if instr(1,x.id,"Select")>0 then dim strMax strMax = "מקסימלי" if x.value ="10" and _ (x.item(x.selectedIndex).text = "" or _ instr(x.item(x.selectedIndex).text,strMax) > 0 ) or _ x.value ="0" then isNumeric=2 end if else 'instr(1,x.id,"Select")<=0 if x.value="" then isNumeric=2 else for i=1 to len(x.value) sim = mid(x.value,i,1) if i=1 and (sim = "+" or sim = "-") then sign = true elseif sim="." then if point=false then point=true else isNumeric=0 exit for end if elseif sim>"9" or sim<"0" then isNumeric=0 exit for end if next end if end if select case isNumeric case 0 x.classname="inputerror" if message<>"" then ErrorHandle(message) case 1 if not isnull(y) then if x.value = "10" then y.value = x.item(x.selectedIndex).text else y.value = "&" + x.value end if end if case 2 if not isnull(y) then y.value = "" end if end select if message <> "" then if y <> null then if oldValue <> y.value then document.Form1.miunLeTihkur.value = "new" end if end if end if end function sub inputNumber(obj) dim sug if document.Form1.all(obj).value = 10 then 'document.Form1.all(obj)(document.Form1.all(obj).length -1).text = "" if document.Form1.all(obj).id = "dmeNihulAdSelect" then sug="1" else sug="2" 'stiyatTekenAdSelect end if dim x dim y dim str dim rv x = (window.screen.availwidth - 300) / 2 y = (window.screen.availheight - 150) / 2 str = "dialogHeight: 200px; dialogWidth: 300px; dialogLeft: " & x & "px; dialogTop: " & y & "px; status: No; scroll: no" rv = window.showmodaldialog("inputNumber.aspx?sug=" + sug,sug,cstr(str)) if rv = "" then if sug = "1" then document.Form1.all(obj)(document.Form1.all(obj).length - 1).text = "הזן שיעור מקסימלי" else document.Form1.all(obj)(document.Form1.all(obj).length - 1).text = "הזן סטייה מקסימלית" end if document.Form1.all(obj).selectedIndex = 0 else document.Form1.all(obj)(document.Form1.all(obj).length - 1).text = rv end if end if end sub sub changeClass(x,classname) document.Form1.all(x).classname = classname end sub 'Error Message sub ErrorHandle(error) 'msgbox error,0,"הודעה מספר בפרמטרים" msgbox error,0,"פרמטרים לא חוקיים" document.Form1.tbError.value = "error" end sub sub sizechange dim iframeWindow dim lst dim dtop dim d dim id if instr(window.navigator.appVersion,"MSIE 5")>0 then if document.Form1.tbDochot.value<>"0" then window.document.getelementbyid("tsuot").style.height = "800px" end if else if document.Form1.tbDochot.value<>"0" then set iframeWindow = document.all.tsuot.contentWindow set lst=iframeWindow.document.getElementsByTagName("DIV") dtop = 0 for each d in lst id = d.id if id > "" and d.style.top>"" then dtop = cint(left(d.style.top,len(d.style.top) - 2)) + 200 end if next if dtop > 0 then document.all.buttonstab.style.top="-355px" document.all.tsuot.style.height = dtop & "px" document.all.iframe_footer.style.top = "-335px" else document.all.tsuot.style.height = tsuot.document.body.scrollheight document.all.buttonstab.style.visibility="visible" document.all.buttonstab.style.top="-300px" end if end if end if end sub Sub grpDochot_onchange ' This event filters out the comboBox ' of the names of the dochot Dim ndGrp ndGrp = Document.Form1.grpDochot.value ' The 'Dochot' ComboBox is a function of the main group of dochot Document.Form1.dochot.xmlfiltervalue=ndGrp 'select the first report document.Form1.Dochot.selectedIndex = 0 ' Set up the parameters for the Doch Dochot_onchange 'השוואה לממדי שוק לא מוגדרת לכל קופות if ndGrp = 2 then if document.Form1.oclusiya.length > 0 then if document.Form1.oclusiya.item(0).value = 0000 or _ document.Form1.Dochot.selectedIndex = 0 and _ len(document.Form1.oclusiya.item(0).value) = 2 then oclusiya_clear end if end if if valueKupot(0) = "0000" or len(valueKupot(0))=2 then countKupot = 0 if valueTaagidimSholtim(0) = "0000" then countTaagidimSholtim = 0 if valueHevrotMenahelot(0) = "0000" then countHevrotMenahelot = 0 if valueSugeiTaagidimSholtim(0) = "0000" then countSugeiTaagidimSholtim = 0 if valueSugeiTaagidimSholtim(0) = "0000" then countSugeiKupotGemel = 0 oclusiya_select end if 'Document.Form1.RadioMitz.checked = true 'RadioMitz_onclick End Sub 'test number of rows retrieved from the DB 'if 0 or 1 - error sub testXML(XMLname) dim xmlNetunim dim rowCollection if XMLname = "paramtshlfisug" then exit sub set xmlNetunim = window.document.all(XMLname) set rowCollection= xmlNetunim.XMLDocument.getElementsByTagName("ROWSET") if rowCollection.length <= 1 then document.location = "..\..\gemelerrormessage.aspx?error1=הודעה מספר 3" end if dim strXmlBegin dim strRowset strXmlBegin = "" strRowset = "" dim i dim m dim xmlSingle For i=0 to rowCollection.length - 1 set m = rowCollection.Item(i) select case i case 0 set xmlSingle = window.document.all("paramkgkatzar").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) set xmlSingle = window.document.all("paramkg").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("kg") & Mid(m.xml,9)) set xmlSingle = window.document.all("paramkgsugk").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("kg") & Mid(m.xml,9)) case 1 set xmlSingle = window.document.all("paramhmkatzar").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) set xmlSingle = window.document.all("paramhm").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("hm") & Mid(m.xml,9)) case 2 set xmlSingle = window.document.all("paramtshkatzar").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) set xmlSingle = window.document.all("paramtsh").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("tsh") & Mid(m.xml,9)) case 3 set xmlSingle = window.document.all("paramtshlfisug").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("tshlfisug") & Mid(m.xml,9)) set xmlSingle = window.document.all("copyXML").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("tshlfisug") & Mid(m.xml,9)) case 4 set xmlSingle = window.document.all("paramskpkatzar").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) set xmlSingle = window.document.all("paramskp").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("sk") & Mid(m.xml,9)) case 5 set xmlSingle = window.document.all("paramstshkatzar").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) set xmlSingle = window.document.all("paramstsh").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("stsh") & Mid(m.xml,9)) case 6 set xmlSingle = window.document.all("paramMadad").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) case 7 set xmlSingle = window.document.all("paramhd").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) case 8 set xmlSingle = window.document.all("paramsh").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) case 9 set xmlSingle = window.document.all("paramMM").XMLDocument xmlSingle.LoadXML(strXmlBegin & m.xml) case 10 set xmlSingle = window.document.all("parammaslul").XMLDocument xmlSingle.LoadXML(strXmlBegin & strRowset & strWideXml("msl") & Mid(m.xml,9)) case else end select Next end sub 'open info-window of tsuot kinds sub openHelpWindow(name,h,w,scroll) dim x dim y dim str x = (window.screen.availwidth - w) / 2 y = (window.screen.availheight - h) / 2 str = "dialogHeight: " & h & "px; dialogWidth: " & w & "px; dialogLeft: " & x & "px; dialogTop: " & y & "px; status: No; scroll: " & scroll 'window.showmodaldialog "SugeiTsuot.htm",0,cstr(str) window.showmodaldialog name,0,cstr(str) end sub public sub onloadTsuot shanim_init sizechange dim iframeWindow if instr(window.navigator.appVersion,"MSIE 5")>0 then exit sub dim lst set iframeWindow = document.all.tsuot.contentWindow set lst=iframeWindow.document.getElementsByTagName("DIV") dim dtop dim d 'if (+/-) then scroll if parent.document.all.lasttitle.value <> "" then for each d in lst if d.title=document.all.lasttitle.value then dtop = cint(left(d.style.top,len(d.style.top) - 2)) + 475 parent.window.scroll 0,dtop exit for end if next end if 'test if "קודם דף" needs "sikum" dim sikumold dim cnt dim title dim id dim outerhtml sikumold = false cnt = 0 for each d in lst title = d.title id = d.id if id > "" then if left(id,5) ="Graph" then exit for end if if title > "" then outerhtml = d.outerhtml 'if instr(1,outerhtml,"perut") > 1 then exit for if instr(1,outerhtml,"sikum") > 1 then sikumold = true exit for end if end if next if document.all.sikumtab.style.visibility = "hidden" and sikumold = true then document.all.sikumtab.style.visibility = "visible" end if if document.all.sikumtab.style.visibility = "visible" and sikumold = false then document.all.sikumtab.style.visibility = "hidden" end if end sub 'היפוש פשוט sub cbtab1_onclick hipus_mitkadem = false tihkur_mitkadem = false if document.Form1.tbDochot.value<>"0" then document.Form1.tbDochot.value="1" end if document.Form1.cbXML.style.visibility = "visible" document.Form1.x1.style.visibility = "visible" document.Form1.x2.style.visibility = "visible" document.Form1.cbtab1.className = "selectedtab" document.Form1.cbtab2.className = "tab" document.Form1.cbtab3.className = "tab" divtab1.style.display = "" divtab2.style.display = "none" divtab5.style.display = "none" document.Form1.tabimg1.src = "images/tab1_on.gif" document.Form1.tabimg2.src = "images/tab3.gif" document.Form1.tabimg3.src = "images/tab2.gif" document.Form1.img5.src="images/2.gif" id_dochot = document.Form1.Dochot.selectedIndex id_grp_dochot = document.Form1.grpDochot.selectedIndex document.Form1.Dochot.selectedIndex = 0 document.Form1.grpDochot.selectedIndex = 0 grpDochot_onchange Dochot_onchange end sub 'חיפוש מתקדם sub cbtab2_onclick hipus_mitkadem = true tihkur_mitkadem = false if document.Form1.tbDochot.value<>"0" then document.Form1.tbDochot.value="1" end if document.Form1.cbXML.style.visibility = "visible" document.Form1.x1.style.visibility = "visible" document.Form1.x2.style.visibility = "visible" document.Form1.cbtab1.className = "tab" document.Form1.cbtab2.className = "selectedtab" document.Form1.cbtab3.className = "tab" divtab1.style.display = "none" divtab2.style.display = "" divtab5.style.display = "none" document.Form1.tabimg1.src = "images/tab3.gif" document.Form1.tabimg2.src = "images/tab1.gif" document.Form1.tabimg3.src = "images/tab2_on.gif" 'div7.style.visibility = "visible" document.Form1.img5.src="images/4.gif" document.Form1.grpDochot.selectedIndex = id_grp_dochot grpDochot_onchange document.Form1.Dochot.selectedIndex = id_dochot Dochot_onchange end sub 'תיחקור מתקדם sub cbtab3_onclick hipus_mitkadem = false tihkur_mitkadem = true if document.Form1.tbDochot.value<>"0" then document.Form1.tbDochot.value="2" end if document.Form1.cbXML.style.visibility = "hidden" document.Form1.x1.style.visibility = "hidden" document.Form1.x2.style.visibility = "hidden" document.Form1.cbtab1.className = "tab" document.Form1.cbtab2.className = "tab" document.Form1.cbtab3.className = "selectedtab" divtab1.style.display = "none" divtab2.style.display = "none" divtab5.style.display = "" document.Form1.tabimg1.src = "images/tab1.gif" document.Form1.tabimg2.src = "images/tab1_on.gif" document.Form1.tabimg3.src = "images/tab2.gif" 'div7.style.visibility = "hidden" div1.style.visibility = "hidden" div1a.style.visibility = "hidden" document.Form1.img5.src="images/6.gif" end sub Sub bdikat_mispar_1 if document.Form1.input.length = 1 then select case document.Form1.input.item(0).value case "0000", "10", "20", "30"', "60" document.Form1.input.innerhtml = "" end select end if select case document.Form1.output.item(document.Form1.output.selectedIndex).value case "0000", "10", "20", "30"', "60" document.Form1.input.innerhtml = "" end select End Sub 'Sort kupot list sub btnSort_onclick set opt0000 = document.Form1.output.removeChild(document.Form1.output.childNodes.item(0)) set opt10 = document.Form1.output.removeChild(document.Form1.output.childNodes.item(0)) set opt30 = document.Form1.output.removeChild(document.Form1.output.childNodes.item(0)) set opt20 = document.Form1.output.removeChild(document.Form1.output.childNodes.item(0)) 'set opt60 = document.Form1.output.removeChild(document.Form1.output.childNodes.item(0)) if miun = "0" then document.body.ChosenListXmlvalue = "SHM_KUPA_KATZAR" document.Form1.btnSort.value = "מיין לפי מספר" paramkgsugk.sortfld = "SHM_KUPA_KATZAR" paramkgsugk.flddatatype = "text" miun = "1" else document.body.ChosenListXmlvalue = "ID_KUPA" document.Form1.btnSort.value = "מיין לפי שם" paramkgsugk.sortfld = "ID_KUPA" paramkgsugk.flddatatype = "number" miun = "0" end if paramkgsugk.sort dim inputHTML inputHTML=document.Form1.input.outerHTML document.body.load document.Form1.input.outerHTML=inputHTML dim i for i=0 to document.Form1.output.length - 5 Select case document.Form1.output.item(i).value case "0000", "10", "20", "30"', "60" document.Form1.output.removeChild(document.Form1.output.childNodes.item(i)) i=i-1 end select next 'document.Form1.output.insertBefore opt60,document.Form1.output.childNodes.item(0) document.Form1.output.insertBefore opt20,document.Form1.output.childNodes.item(0) document.Form1.output.insertBefore opt30,document.Form1.output.childNodes.item(0) document.Form1.output.insertBefore opt10,document.Form1.output.childNodes.item(0) document.Form1.output.insertBefore opt0000,document.Form1.output.childNodes.item(0) Set_output_html if document.Form1.input.length>0 then document.Form1.input.selectedIndex=0 end if end sub sub Set_output_html dim outputHTML if instr(window.navigator.appVersion,"MSIE 5")=0 then document.Form1.output.selectedIndex = 0 outputHTML=document.Form1.output.outerHTML if instr(1,outputHTML,"ondblclick") <=0 then outputHTML = "