home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_03.cab / iihdrhd.asp < prev    next >
Encoding:
Text File  |  1997-09-07  |  16.5 KB  |  637 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <%Option Explicit %>
  3.  
  4. <% 
  5. '    strings for localization
  6. Const L_ACCESSDENIED_TEXT="Access Denied" 
  7. Const L_ENABLEEXPIRE_TEXT="Enable Content Expiration"
  8. Const L_CONTENTSHOULD_TEXT="Content should:"
  9. Const L_EXPIMM_TEXT="Expire Immediately"
  10. Const L_EXPAFT_TEXT="Expire after"
  11. Const L_SECONDS_TEXT="Second(s)"
  12. Const L_MINUTES_TEXT="Minute(s)"
  13. Const L_HOURS_TEXT="Hour(s)"
  14. Const L_DAYS_TEXT="Day(s)"
  15. Const L_EXPON_TEXT="Expire on"
  16. Const L_MIDNIGHT_TEXT="Midnight"
  17. Const L_MONTH_TEXT="Month"
  18. Const L_DAY_TEXT="Day"
  19. Const L_YEAR_TEXT="Year"
  20. Const L_TIME_TEXT="Time"
  21. Const L_CUSTOM_TEXT="Custom Headers"
  22. Const L_ENTERHEADER_TEXT="Enter a custom name and value pair below:"
  23. Const L_SAMPHDR_TEXT="Custom Header:Value"
  24. Const L_SELECTITEM_TEXT="Select a header to delete."
  25.  
  26. On Error Resume Next 
  27.  
  28. Dim path, currentobj, httpexp, timeunit,expireon
  29.  
  30. path=Session("dpath")
  31. Session("path")=path
  32. Set currentobj=GetObject(path)
  33. Session("SpecObj")=path
  34. Session("SpecProps")="HttpExpires"
  35.  
  36.  
  37. httpexp=currentobj.HttpExpires
  38.  
  39. if err <> 0 then
  40.     httpexp="d,-1"
  41. end if
  42. httpexp = UCase(trim(httpexp))
  43.  
  44. timeunit="<OPTION VALUE=0 SELECTED>" & L_SECONDS_TEXT & "<OPTION VALUE=1>" & L_MINUTES_TEXT & "<OPTION VALUE=2>" & L_HOURS_TEXT & "<OPTION VALUE=3 >" & L_DAYS_TEXT
  45.  
  46. function expires()
  47.     httpexp = UCase(Trim(httpexp))
  48.     if len(httpexp)= 0 then
  49.         expires="<INPUT TYPE='checkbox' NAME='hdnchkHttpExpires'  OnClick='SetExp(null);top.head.Global.updated=true;'>"
  50.     elseif httpexp="D,-1" then
  51.         expires="<INPUT TYPE='checkbox' NAME='hdnchkHttpExpires'  OnClick='SetExp(null);top.head.Global.updated=true;'>"
  52.     elseif Left(httpexp,2)="S," then
  53.         expires="<INPUT TYPE='checkbox' NAME='hdnchkHttpExpires' CHECKED OnClick='SetExp(null);top.head.Global.updated=true;'>"
  54.     elseif Left(httpexp,2)="D," then
  55.         expires="<INPUT TYPE='checkbox' NAME='hdnchkHttpExpires' CHECKED OnClick='SetExp(null);top.head.Global.updated=true;'>"        
  56.     else
  57.         expires="<INPUT TYPE='checkbox' NAME='hdnchkHttpExpires' OnClick='SetExp(null);top.head.Global.updated=true;'>"
  58.     end if
  59. end function
  60.  
  61. function expireType(thisbutton)
  62.  
  63.     Dim typestr, etype
  64.     
  65.     typestr=Mid(httpexp,1,4)
  66.     if typestr="" then
  67.         etype=""
  68.     elseif Mid(httpexp,1,2)="D," then
  69.         if len(httpexp) > 4 then
  70.                 etype=1
  71.         else
  72.                 etype=0
  73.         end if
  74.     elseif Mid(httpexp,1,2)="S," then
  75.         etype=2
  76.     else
  77.         etype=""
  78.     end if
  79.  
  80.     if thisbutton=etype then
  81.         expireType="<INPUT TYPE='radio' NAME='hdnrdoHttpExpires' CHECKED OnClick='SetExp(" & thisbutton & ");top.head.Global.updated=true;'>"
  82.     else
  83.         expireType="<INPUT TYPE='radio' NAME='hdnrdoHttpExpires' OnClick='SetExp(" & thisbutton & ");top.head.Global.updated=true;'>"
  84.     end if
  85.  
  86. end function
  87.  
  88. function hexToDec(hexstr)
  89.     hexToDec = CLng("&H" & hexstr)
  90. end function
  91.  
  92. function writeExpires(fieldname,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
  93.  
  94.     On Error Resume Next 
  95.     Dim SetLocale, strExpires, numsecs, timeelapse, thisdate
  96.     
  97.     SetLocale = False
  98.     strExpires=httpexp
  99.  
  100.     'global
  101.     expireon=""
  102.  
  103.     'httpexp is global
  104.     if Mid(httpexp,1,2) = "D," then
  105.         numsecs = Trim(Mid(strExpires,Instr(strExpires,",")+1))
  106.         if fieldname="Seconds" then
  107.             if instr(numsecs,"X") then
  108.                 numsecs=hexToDec(Trim(Mid(numsecs, Instr(numsecs,"X")+1)))        
  109.             end if
  110.             timeelapse=numsecs
  111.             if numsecs mod 86400=0 then
  112.                 timeelapse=numsecs/86400
  113.                 'timeunit is global
  114.                 timeunit="<OPTION VALUE=0 >" & L_SECONDS_TEXT & "<OPTION VALUE=1>" & L_MINUTES_TEXT & "<OPTION VALUE=2>" & L_HOURS_TEXT & "<OPTION SELECTED VALUE=3>" & L_DAYS_TEXT
  115.  
  116.             elseif numsecs mod 3600=0 then
  117.                 timeelapse=numsecs/3600
  118.                 'timeunit is global                
  119.                 timeunit="<OPTION VALUE=0 >" & L_SECONDS_TEXT & "<OPTION VALUE=1>" & L_MINUTES_TEXT & "<OPTION SELECTED  VALUE=2 >" & L_HOURS_TEXT & "<OPTION VALUE=3>" & L_DAYS_TEXT
  120.  
  121.             elseif numsecs mod 60=0 then
  122.                 timeelapse=numsecs/60
  123.                 'timeunit is global                
  124.                 timeunit="<OPTION VALUE=0 >" & L_SECONDS_TEXT & "<OPTION SELECTED VALUE=1>" & L_MINUTES_TEXT & "<OPTION VALUE=2>" & L_HOURS_TEXT & "<OPTION VALUE=3>" & L_DAYS_TEXT
  125.             end if
  126.  
  127.             if timeelapse > 0 then
  128.                 expireon=timeelapse
  129.             else
  130.                 expireon=""
  131.             end if
  132.         end if
  133.  
  134.     elseif Mid(httpexp,1,2) = "S,"  then 
  135.     
  136.         SetLocale = True
  137.         
  138.         'trim off the "S,"
  139.         strExpires = Mid(strExpires,Instr(strExpires,",")+1)
  140.         'trim off the "Day," 
  141.         strExpires = Mid(strExpires,Instr(strExpires,",")+1)
  142.         
  143.         'trim off the GMT... plus any spaces...
  144.         strExpires=Trim(Mid(strExpires,1, len(strExpires)-3))
  145.  
  146.         if isDate(strExpires) then
  147.             thisdate=CDate(strExpires)        
  148.         end if
  149.         
  150.         Select Case fieldname 
  151.         Case "Day" 
  152.             expireon=Day(thisdate)
  153.         Case "Month" 
  154.             expireon=Month(thisdate)
  155.         Case "Year" 
  156.             expireon=Year(thisdate)
  157.         Case "Hours" 
  158.             expireon=Hour(thisdate) 
  159.         Case "Minutes" 
  160.             expireon=Minute(thisdate)
  161.         End Select        
  162.     else
  163.         expireon=""
  164.     end if
  165.     writeExpires=inputbox(err,"TEXT", ("hdn" & "HttpExpires" & fieldname), expireon ,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
  166.  
  167. end function
  168.  
  169. %>
  170.  
  171. <!--#include file="iiset.inc"-->
  172.  
  173. <HTML>
  174. <HEAD>
  175. <TITLE></TITLE>
  176. <SCRIPT LANGUAGE="JavaScript">
  177.  
  178. top.head.Global.helpFileName="iipy_9";
  179. userSet=true;
  180.  
  181. EXP_NONE = 0
  182. EXP_DYNAMIC = 1
  183. EXP_STATIC = 2
  184.  
  185. function isNum(txtcntrl,min) {
  186.     str=txtcntrl.value;
  187.     for (var i=0; i < str.length; i++) {
  188.               num = parseInt(str);
  189.         if (isNaN(num)){
  190.                alert("Please enter an integer.");
  191.             return false;
  192.               }
  193.         if (num < min) {
  194.             alert("Please enter an integer greater than " + (min-1) + ".");
  195.             return false;
  196.         }
  197.      }
  198.     return true;
  199. }
  200.  
  201. function SetRdo(rdo,fromCntrl, toCntrl){
  202.     if (!rdo){
  203.         if (fromCntrl.value !=""){
  204.             toCntrl.value=fromCntrl.value;
  205.             fromCntrl.value="";
  206.         }
  207.     }
  208.     else{
  209.         if (toCntrl.value !=""){
  210.             fromCntrl.value=toCntrl.value;
  211.             toCntrl.value="";
  212.         }
  213.     }
  214. }
  215.  
  216.     function SetExp(expType){
  217.         if (expType==null){
  218.             if (document.userform.hdnchkHttpExpires.checked){
  219.                 //bugbug this breaks in some installs of IE3.02
  220.                 //document.userform.hdnrdoHttpExpires[0].checked=true;            
  221.                 document.userform.HttpExpires.value=document.userform.hdnHttpExpires.value;
  222.             }
  223.             else{        
  224.                 document.userform.hdnHttpExpires.value=document.userform.HttpExpires.value;
  225.                 document.userform.HttpExpires.value="d,-1";
  226.                 clearSeconds();
  227.                 clearGMT();
  228.             }
  229.         }
  230.  
  231.         else{
  232.             document.userform.hdnchkHttpExpires.checked=true;
  233.  
  234.             if (expType == EXP_NONE){
  235.                 document.userform.HttpExpires.value="D,0";
  236.                 clearSeconds();
  237.                 clearGMT();
  238.             }
  239.             if (expType == EXP_DYNAMIC){
  240.                 clearGMT();
  241.                 expsecs=document.userform.hdnhdnHttpExpiresSeconds.value
  242.                 if (parseInt(expsecs) != parseInt("")){
  243.                     document.userform.hdnHttpExpiresSeconds.value=document.userform.hdnhdnHttpExpiresSeconds.value;
  244.                 }
  245.                 secval = parseInt(document.userform.hdnHttpSeconds.value);
  246.                 if (isNaN(secval)){
  247.                     secval = 0
  248.                 }
  249.                 
  250.                 secstr = secval.toString(16);
  251.                                 
  252.                 <% ' Netscape's toString is broken... this hack should fix it... %>
  253.                 <% if not Session("IsIE") then %>
  254.                     while (secstr.indexOf(":") > -1){
  255.                         secstr = secstr.substring(0,secstr.indexOf(":")) + "a" + secstr.substring(secstr.indexOf(":")+1,secstr.length);
  256.                     }
  257.                     
  258.                 <% end if %>
  259.                 document.userform.HttpExpires.value="D,0X"+secstr;
  260.                 
  261.                 
  262.             }
  263.             if (expType == EXP_STATIC){
  264.                 clearSeconds();
  265.                 expdate=new Date();
  266.                 SetDateCntrls(expdate)
  267.             }
  268.         }
  269.     }
  270.  
  271.     function clearSeconds(){
  272.         if (document.userform.hdnHttpExpiresSeconds.value !=""){
  273.             userSet=false;
  274.             document.userform.hdnhdnHttpExpiresSeconds.value=document.userform.hdnHttpExpiresSeconds.value ;
  275.             document.userform.hdnHttpExpiresSeconds.value="";
  276.             userSet=true;
  277.         }
  278.     }
  279.  
  280.     function clearGMT(){
  281.         document.userform.hdnHttpExpiresYear.value="";
  282.         document.userform.hdnHttpExpiresMonth.value="";
  283.         document.userform.hdnHttpExpiresDay.value="";
  284.         document.userform.hdnHttpExpiresHours.value="";
  285.         document.userform.hdnHttpExpiresMinutes.value="";
  286.     }
  287.  
  288.     function SetSeconds(){
  289.         
  290.             tp=document.userform.hdnHttpExpiresTimeUnit.selectedIndex;
  291.             
  292.             if (document.userform.hdnHttpExpiresSeconds.value==""){
  293.                  expsecval=0;                
  294.             }
  295.             else{
  296.                 expsecval=parseInt(document.userform.hdnHttpExpiresSeconds.value);
  297.             }
  298.             
  299.             
  300.             if (tp==0){
  301.                 document.userform.hdnHttpSeconds.value=expsecval ;
  302.             }
  303.             if (tp==1){
  304.                 document.userform.hdnHttpSeconds.value=expsecval * 60;
  305.             }
  306.             if (tp==2){
  307.                 document.userform.hdnHttpSeconds.value=expsecval * 3600;
  308.             }
  309.             if (tp==3){
  310.                 document.userform.hdnHttpSeconds.value=expsecval * 86400;
  311.             }
  312.             document.userform.hdnrdoHttpExpires[1].checked=true;
  313.             document.userform.hdnhdnHttpExpiresSeconds.value=document.userform.hdnHttpExpiresSeconds.value;            
  314.             SetExp(EXP_DYNAMIC);
  315.     }
  316.  
  317.  
  318.     function SetLocale(){
  319.  
  320.         expdate=new Date();
  321.         
  322.         if (document.userform.hdnHttpExpiresYear.value != ""){
  323.             expdate.setYear(document.userform.hdnHttpExpiresYear.value);        
  324.             expdate.setMonth(document.userform.hdnHttpExpiresMonth.value-1);    
  325.             expdate.setDate(document.userform.hdnHttpExpiresDay.value);
  326.  
  327.             tzdiff=expdate.getTimezoneOffset()
  328.             hrsdiff=parseInt(tzdiff/60)
  329.             mindiff=tzdiff%(hrsdiff*60)
  330.  
  331.             expdate.setHours(document.userform.hdnHttpExpiresHours.value - hrsdiff);
  332.             expdate.setMinutes(document.userform.hdnHttpExpiresMinutes.value -mindiff);
  333.  
  334.             SetDateCntrls(expdate)
  335.         }
  336.     }
  337.  
  338.     function SetGMT(dateCntrl){
  339.         if (userSet){
  340.             if (dateCntrl.value != ""){
  341.                 if (isNum(dateCntrl,0)){
  342.                     expdate=new Date();
  343.     
  344.                     expdate.setYear(document.userform.hdnHttpExpiresYear.value);    
  345.                     expdate.setMonth(document.userform.hdnHttpExpiresMonth.value-1);    
  346.                     expdate.setDate(document.userform.hdnHttpExpiresDay.value);
  347.                     expdate.setHours(document.userform.hdnHttpExpiresHours.value);
  348.                     expdate.setMinutes(document.userform.hdnHttpExpiresMinutes.value);
  349.             
  350.                     SetDateCntrls(expdate)
  351.                 }
  352.             }
  353.         }
  354.                 
  355.     }
  356.  
  357.     function SetDateCntrls(dateObj){
  358.         year=dateObj.getYear();
  359.  
  360.         if (year < 100){
  361.             year="19" + year;    
  362.         }
  363.         document.userform.hdnHttpExpiresYear.value=year;
  364.         document.userform.hdnHttpExpiresMonth.value=dateObj.getMonth()+1;
  365.         document.userform.hdnHttpExpiresDay.value=dateObj.getDate();
  366.         document.userform.hdnHttpExpiresHours.value=dateObj.getHours();
  367.         document.userform.hdnHttpExpiresMinutes.value=dateObj.getMinutes();
  368.  
  369.         if (document.userform.hdnHttpExpiresMinutes.value < 10){
  370.             document.userform.hdnHttpExpiresMinutes.value="0" + document.userform.hdnHttpExpiresMinutes.value;
  371.         }
  372.  
  373.         document.userform.hdnHttpGMTDate.value=expdate.toGMTString();
  374.         document.userform.HttpExpires.value="s," + expdate.toGMTString();
  375.  
  376.  
  377.     }
  378.  
  379.  
  380.     function popBox(title, width, height, filename){
  381.         thefile=(filename + ".asp");
  382.         thefile="iipop.asp?pg="+thefile;
  383.         <% if Session("Browser") <> "IE3" then %>
  384.             width=width +25;
  385.             height=height + 50;                
  386.         <% end if %>
  387.  
  388.         popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  389.         if(popbox !=null){
  390.             if (popbox.opener==null){
  391.                 popbox.opener=self;
  392.             }
  393.         }
  394.     }
  395.  
  396. </SCRIPT>
  397. </HEAD>
  398.  
  399.  
  400. <BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" LINK="#FFFFFF" onLoad="loadList();" STYLE="font-face: Helv; font-size: 8pt;">
  401. <FONT SIZE=1 FACE="Helv">
  402.  
  403. <FORM NAME="userform">
  404.  
  405. <B>
  406.     <%= expires %>
  407.     <%= L_ENABLEEXPIRE_TEXT %>
  408. </B>
  409. <P>
  410.  
  411. <TABLE BORDER=0 CELLPADDING=0>
  412. <TR>
  413.     <TD VALIGN="top" WIDTH = 100>
  414.         <FONT SIZE=1 FACE="Helv">
  415.             <%= L_CONTENTSHOULD_TEXT %>
  416.         </FONT>
  417.     </TD>
  418.     <TD VALIGN="top">
  419.         <FONT SIZE=1 FACE="Helv">    
  420.             <%= expireType(0) %> 
  421.         </FONT>
  422.     </TD>
  423.     <TD>
  424.         <FONT SIZE=1 FACE="Helv">    
  425.             <%= L_EXPIMM_TEXT %>
  426.         </FONT>
  427.     </TD>
  428. </TR>
  429.  
  430. <TR>
  431.     <TD VALIGN="top">
  432.     </TD>
  433.     <TD VALIGN="top">
  434.         <FONT SIZE=1 FACE="Helv">    
  435.             <%= expireType(1) %>
  436.         </FONT>
  437.     </TD>
  438.     <TD>
  439.         <FONT SIZE=1 FACE="Helv">    
  440.              <%= L_EXPAFT_TEXT %> 
  441.             <%= writeExpires("Seconds",5,"isNum(this,0);SetSeconds();","","",true,false) %>
  442.             <INPUT TYPE="hidden" NAME="hdnHttpSeconds">
  443.             <SELECT NAME="hdnHttpExpiresTimeUnit" OnChange="SetSeconds();top.head.Global.updated=true;">
  444.                 <%= timeunit %>
  445.             </SELECT>
  446.         </FONT>
  447.     </TD>
  448. </TR>
  449.  
  450. <TR>
  451.     <TD VALIGN="top">
  452.     </TD>
  453.     <TD VALIGN="top">
  454.         <FONT SIZE=1 FACE="Helv">    
  455.             <%= expireType(2) %>
  456.         </FONT>
  457.     </TD>
  458.     <TD>
  459.         <FONT SIZE=1 FACE="Helv">    
  460.             <%= L_EXPON_TEXT %> 
  461.         </FONT>
  462.     </TD>
  463. </TR>
  464. <TR>
  465.     <TD COLSPAN=2>
  466.     </TD>
  467.     <TD>
  468.             <TABLE>
  469.                 <TR>
  470.                     <TD><FONT SIZE=1 FACE="Helv"><%= writeExpires("Month",2,"","","SetGMT(this);",false,false) %></FONT></TD>
  471.                     <TD> </TD>
  472.                     <TD><FONT SIZE=1 FACE="Helv"><%= writeExpires("Day",2,"","","SetGMT(this);",false,false) %></FONT></TD>
  473.                     <TD> </TD>
  474.                     <TD><FONT SIZE=1 FACE="Helv"><%= writeExpires("Year",4,"","","SetGMT(this);",false,false) %></FONT></TD>
  475.                     <TD>  </TD>
  476.                     <TD><FONT SIZE=1 FACE="Helv"><%= writeExpires("Hours",2,"","","SetGMT(this);",false,false) %>: <%= writeExpires("Minutes",2,"SetGMT(this)","","",false,false) %></FONT></TD>
  477.                 </TR>
  478.                 <TR>
  479.                     <TD ALIGN="center"><FONT SIZE=1 FACE="Helv"><%= L_MONTH_TEXT %></FONT></TD>
  480.                     <TD> </TD>
  481.                     <TD ALIGN="center"><FONT SIZE=1 FACE="Helv"><%= L_DAY_TEXT %></FONT></TD>
  482.                     <TD> </TD>
  483.                     <TD ALIGN="center"><FONT SIZE=1 FACE="Helv"><%= L_YEAR_TEXT %></FONT></TD>
  484.                     <TD>  </TD>
  485.                     <TD ALIGN="center"><FONT SIZE=1 FACE="Helv"><%= L_TIME_TEXT %></FONT></TD>
  486.                 </TR>
  487.             </TABLE>
  488.             </TD>
  489.             </TR>
  490.         </TABLE>                        
  491.         </FONT>
  492.     </TD>
  493. </TR>
  494.  
  495. </TABLE>
  496. <INPUT TYPE="hidden" NAME="hdnHttpGMTDate">
  497. <INPUT TYPE="hidden" NAME="HttpExpires" VALUE="<%= currentobj.HttpExpires %>">
  498. <INPUT TYPE="hidden" NAME="hdnHttpExpires" VALUE="<%= currentobj.HttpExpires %>">
  499.  
  500. </FORM>
  501. <HR>
  502. <FONT SIZE=1 FACE="Helv">
  503. <B>
  504.     <%= L_CUSTOM_TEXT %>
  505. </B>
  506. </FONT>
  507.  
  508. <SCRIPT LANGUAGE="JavaScript">
  509.  
  510.     function loadList(){
  511.         <% if SetLocale then %>
  512.             SetLocale();
  513.         <% end if %>
  514.         
  515.         <% if Session("IsIE") then %>
  516.             parent.list.location.href = "iihdrls.asp";
  517.         <% else %>
  518.             parent.frames[1].location.href="iihdrls.asp";
  519.         <% end if %>
  520.     }
  521.  
  522.     function addItem(){
  523.         header=prompt("<%= L_ENTERHEADER_TEXT %>","<%= L_SAMPHDR_TEXT %>");
  524.  
  525.         <% if Session("IsIE") then %>
  526.             if (header != ""){    
  527.         <% else %>
  528.             if (header != null){    
  529.         <% end if %>
  530.             
  531.             i=cachedList.length;    
  532.             cachedList[i]=new listObj(header);
  533.             cachedList[i].updated=true;    
  534.             cachedList[i].newitem=true;
  535.             loadList();
  536.         }
  537.     }
  538.  
  539.     function delItem(){
  540.         ndxnum=parent.list.document.userform.selHttpCustomHeader.options.selectedIndex;
  541.         if (ndxnum != -1){
  542.         var i=parent.list.document.userform.selHttpCustomHeader.options[ndxnum].value;
  543.             if (i !=""){
  544.                 cachedList[i].deleted=true;
  545.                 cachedList[i].updated=true;    
  546.                 loadList();
  547.             }
  548.         }
  549.         else{
  550.             alert("<%= L_SELECTITEM_TEXT %>");
  551.         }
  552.     }
  553.  
  554.     function buildListForm(){
  555.         numrows=0;
  556.         for (var i=0; i < cachedList.length; i++) {
  557.             if ((!cachedList[i].deleted) && (cachedList[i].header !="")){
  558.                 numrows=numrows + 1;
  559.             }
  560.         }
  561.         qstr="numrows="+numrows;
  562.         qstr=qstr+"&cols=HttpCustomHeaders"
  563.  
  564.         top.body.hlist.location.href="iihdn.asp?"+qstr;
  565.         <% 'the list values will be grabbed by the hiddenlistform script... %>
  566.     }
  567.  
  568.     function SetListVals(){
  569.         listForm=parent.parent.hlist.document.hiddenlistform;    
  570.         j=0;
  571.         for (var i=0; i < cachedList.length; i++) {
  572.             if ((!cachedList[i].deleted) && (cachedList[i].header !="")){
  573.                 listForm.elements[j++].value=cachedList[i].header;
  574.                 //cachedList[i].updated=false;
  575.             }
  576.         }
  577.     }
  578.  
  579.     function popBox(title, width, height, filename){
  580.         thefile=(filename + ".asp");
  581.         thefile="iipop.asp?pg="+thefile;
  582.         <% if not Session("IsIE") then %>
  583.             width=width +25;
  584.             height=height + 50;
  585.         <% end if %>
  586.  
  587.         popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  588.         if(popbox !=null){
  589.             if (popbox.opener==null){
  590.                 popbox.opener=self;
  591.             }
  592.         }
  593.     }
  594.  
  595.     function listFuncs(){
  596.         this.loadList=loadList;
  597.         this.addItem=addItem;
  598.         this.delItem=delItem;
  599.         this.writeList=buildListForm;
  600.         this.popBox=popBox;
  601.         this.SetListVals=SetListVals;
  602.         this.ndx=0;
  603.     }
  604.  
  605.  
  606.  
  607.     function listObj(header){
  608.         this.header=header;
  609.         this.deleted=false;
  610.         this.updated=false;
  611.         this.newitem=false;
  612.     }
  613.  
  614.     cachedList=new Array()
  615.  
  616. listFunc=new listFuncs();
  617.  
  618. <%  
  619.  
  620. Dim aHdrs,arraybound, i
  621.  
  622. aHdrs=currentobj.HttpCustomHeaders
  623. arraybound=UBound(aHdrs)
  624. if aHdrs(arraybound) <> "" then
  625. for i=0 to arraybound
  626.      %>cachedList[<%= i %>]=new listObj("<%= aHdrs(i) %>");<% 
  627. Next
  628. end if 
  629.  %>
  630.  
  631. </SCRIPT>
  632.  
  633. </FONT>
  634. </BODY>
  635.  
  636. </HTML>
  637.