PageSourceSearch

https://bike-port.ch/popcal_js/j/functions.js

js bike-port.ch collected 2026-10-07 04:02:46 UTC 3,174 bytes, 123 lines download raw bytes

1
2function aggiornatendina(nomeinput,valore){
3  input=eval("opener.document."+nomeinput);
4  for (i=0;i<input.length;i++)
5    if (input[i].value==valore)
6      input.selectedIndex=i;
7}
8
9function tendinaaggiornabile(nomeinput,valore){
10  out=false;
11  input=eval("opener.document."+nomeinput);
12  for (i=0;i<input.length;i++)
13    if (input[i].value==valore)
14      out=true;
15  return out;
16}
17
18function piglia(idc,y,m,d){
19  ts=new String(idc);
20
21  if (ts.substr(0,7)=="_data3_"){
22    chiudi=true;
23    prename=ts.substr(7,100);
24    if ((tendinaaggiornabile(prename+"_day",d)) &&
25        (tendinaaggiornabile(prename+"_month",m)) &&
26        (tendinaaggiornabile(prename+"_year",y))){
27      aggiornatendina(prename+"_day",d);
28      aggiornatendina(prename+"_month",m);
29      aggiornatendina(prename+"_year",y);
30    }
31    else
32      chiudi=false;
33  }
34  else{
35    chiudi=true;
36    y=y%100;
37    str=new String(d);
38    if (d<10)
39      str='0'+str;
40    str+='.';
41    if (m<10)
42      str+='0';
43    str+=m;
44    str+='.';
45    if (y<10)
46      str+='0';
47    str+=y;
48    eval("opener.document."+idc).value=str;
49  }
50  if (chiudi)
51    window.close();
52}
53
54
55function showcalendar(page,pwidth,pheight) {
56createPopUp(page,"ActiveCalendarWindow",pwidth,pheight,"no","no");
57}
58function createPopUp(theURL, Name, popW, popH, scroll, resize) {
59var winleft = (screen.width - popW) / 2;
60var winUp = (screen.height - popH) / 2;
61winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable='+resize+'';
62Win = window.open(theURL, Name, winProp);
63Win.window.focus();
64}
65function getStartDate(year,month,day) {
66self.close();
67opener.setStartDates(day,month,year);
68}
69function getEndDate(year,month,day) {
70self.close();
71opener.setEndDates(day,month,year);
72}
73function getEUDate(year,month,day){
74self.close();
75opener.setEUDates(day,month,year);
76}
77function getUSDate(year,month,day){
78self.close();
79opener.setUSDates(day,month,year);
80}
81function setStartDates(day,month,year) {
82for (i=0; i<document.calform.StartDay.length; i++) {
83if (document.calform.StartDay.options[i].value == day){
84document.calform.StartDay.selectedIndex = i;
85}
86}
87for (i=0; i<document.calform.StartMonth.length; i++) {
88if (document.calform.StartMonth.options[i].value == month){
89document.calform.StartMonth.selectedIndex = i;
90}
91}
92for (i=0; i<document.calform.StartYear.length; i++) {
93if (document.calform.StartYear.options[i].value == year){
94document.calform.StartYear.selectedIndex = i;
95}
96}
97}
98function setEndDates(day,month,year) {
99for (i=0; i<document.calform.EndDay.length; i++) {
100if (document.calform.EndDay.options[i].value == day){
101document.calform.EndDay.selectedIndex = i;
102}
103}
104for (i=0; i<document.calform.EndMonth.length; i++) {
105if (document.calform.EndMonth.options[i].value == month){
106document.calform.EndMonth.selectedIndex = i;
107}
108}
109for (i=0; i<document.calform.EndYear.length; i++) {
110if (document.calform.EndYear.options[i].value == year){
111document.calform.EndYear.selectedIndex = i;
112}
113}
114}
115function setEUDates(day,month,year) {
116date=day+'-'+month+'-'+year;
117document.calform.eu.value = date;
118}
119function setUSDates(day,month,year) {
120date=month+'/'+day+'/'+year;
121document.calform.us.value = date;
122}
123

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.