function save_options () { for (var i = 0; i < self.document.Formopts.elements.length; i++) { if(document.Formopts.elements[i].name.indexOf ("checktag") != (-1)) { var check = 0; if(document.Formopts.elements[i].checked) check = 1; var tag = document.Formopts.elements[i].value; var width = eval('document.Formopts.'+tag+'.value'); var val = check + ':' + width; change_optval(tag,val,0); } } var expdate = new Date(); expdate.setTime (expdate.getTime() + (24*60*60*1000*365)); SetCookie('options', options, expdate); self.location.href = self.location.href; } function def_options () { var expdate = new Date(); expdate.setTime (expdate.getTime() + (24*60*60*1000*365)); SetCookie('options', '', expdate); self.location.href = self.location.href; } function change_optval (name,value,cookieset) { if (options.length > 0) { if (options.indexOf(name) != -1) { var indx = options.indexOf(name)+name.length+1; var before = options.substring(0,indx); var next = options.substring(indx); var val = next.substring(0,next.indexOf(',')); if (next.indexOf(',') != -1) next = next.substring(next.indexOf(',')); else next = ''; options = before + value + next; } else options = options + ',' + name + '=' + value; } else options = name + '=' + value; if (cookieset == '1') { var expdate = new Date(); expdate.setTime (expdate.getTime() + (24*60*60*1000*365)); SetCookie('options', options, expdate); } } function option_page (name) { var url = '/cgi-bin/' + name + '/options.cgi'; var specs='width=500,height=600,resizable=yes,scrollbars=yes,status=0'; var remote = window.open (url,'options',specs); }