- Lots of markup corrections, in scripts and templates, for XHTML compliance
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-add.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Serials</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5
6 <script type="text/javascript">
7 <!--
8 function _(s) { return s } // dummy function for gettext
9
10 // the english words used in display purposes
11 var text = new Array(_('Number'),_('Volume'),_('Issue'),_('Month'),_('Week'),_('Starting with:'),_('Rollover at:'),_('Choose Hemisphere:'),_('Northern'),_('Southern'),
12 _('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'),_('Season'),_('Year'));
13 var is_season = 0;
14 var is_hemisphere = 1;
15
16 // common pre defined number patterns
17 function num_pattern() {
18 var patternchoice = document.getElementById("numberpattern").value;
19     switch(patternchoice){
20     case "2":
21         document.f.add1.value=1;
22         document.f.add2.value=1;
23         document.f.add3.value=1;
24         document.f.every1.value=12;
25         document.f.every2.value=1;
26         document.f.every3.value=1;
27         document.f.whenmorethan1.value=9999999;
28         document.f.whenmorethan2.value=12;
29         document.f.whenmorethan3.value=4;
30         document.f.setto1.value=0;
31         document.f.setto2.value=1;
32         document.f.setto3.value=1;
33         document.f.lastvalue1.value=1;
34         document.f.lastvalue2.value=1;
35         document.f.lastvalue3.value=1;
36         document.f.numberingmethod.value=_('Vol {X}, No {Y}, Issue {Z}');
37         moreoptions(text[1],text[0],text[2]);
38         display_table(0); // toggle info box on (1) or off (0)
39         break;
40     case "3":
41         document.f.add1.value=1;
42         document.f.add2.value=1;
43         document.f.add3.value='';
44         document.f.every1.value=12;
45         document.f.every2.value=1;
46         document.f.every3.value='';
47         document.f.whenmorethan1.value=9999999;
48         document.f.whenmorethan2.value=12;
49         document.f.whenmorethan3.value='';
50         document.f.setto1.value=0;
51         document.f.setto2.value=1;
52         document.f.setto3.value='';
53         document.f.lastvalue1.value=1;
54         document.f.lastvalue2.value=1;
55         document.f.lastvalue3.value='';
56         document.f.numberingmethod.value=_('Vol {X}, No {Y}');
57         moreoptions(text[1],text[0]);
58         display_table(0);
59         break;
60     case "4":
61         document.f.add1.value=1;
62         document.f.add2.value=1;
63         document.f.add3.value='';
64         document.f.every1.value=12;
65         document.f.every2.value=1;
66         document.f.every3.value='';
67         document.f.whenmorethan1.value=9999999;
68         document.f.whenmorethan2.value=12;
69         document.f.whenmorethan3.value='';
70         document.f.setto1.value=0;
71         document.f.setto2.value=1;
72         document.f.setto3.value='';
73         document.f.lastvalue1.value=1;
74         document.f.lastvalue2.value=1;
75         document.f.lastvalue3.value='';
76         document.f.numberingmethod.value=_('Vol {X}, Issue {Y}');
77         moreoptions(text[1],text[2]);
78         display_table(0);
79         break;
80     case "5":
81         document.f.add1.value=1;
82         document.f.add2.value=1;
83         document.f.add3.value='';
84         document.f.every1.value=12;
85         document.f.every2.value=1;
86         document.f.every3.value='';
87         document.f.whenmorethan1.value=9999999;
88         document.f.whenmorethan2.value=12;
89         document.f.whenmorethan3.value='';
90         document.f.setto1.value=0;
91         document.f.setto2.value=1;
92         document.f.setto3.value='';
93         document.f.lastvalue1.value=1;
94         document.f.lastvalue2.value=1;
95         document.f.lastvalue3.value='';
96         document.f.numberingmethod.value=_('No {X}, Issue {Y}');
97         moreoptions(text[0],text[2]);
98         display_table(0);
99         break;
100     case "6":
101         var d = new Date();
102         var sYear = d.getFullYear();
103         document.f.add1.value=1;
104         document.f.add2.value='1';
105         document.f.add3.value='';
106         document.f.every1.value=4;
107         document.f.every2.value='1';
108         document.f.every3.value='';
109         document.f.whenmorethan1.value=9999999;
110         document.f.whenmorethan2.value='4';
111         document.f.whenmorethan3.value='';
112         document.f.setto1.value=0;
113         document.f.setto2.value='1';
114         document.f.setto3.value='';
115         document.f.lastvalue1.value=sYear;
116         document.f.lastvalue2.value='1';
117         document.f.lastvalue3.value='';
118         document.f.periodicity.value='8';
119         document.f.numberingmethod.value=_('{Y} {X}');
120         moreoptions_seasons(text[15],sYear);
121         display_table(0);
122         is_season = 1;
123         break;
124     case "7":
125         display_table(1);
126         document.getElementById("more_options").innerHTML = '';
127         document.f.irreg_check.value=1; 
128         break;
129     case "8":
130         var d = new Date();
131         var sYear = d.getFullYear();
132         document.f.add1.value=1;
133         document.f.add2.value=1;
134         document.f.add3.value='';
135         document.f.every1.value=12;
136         document.f.every2.value=1;
137         document.f.every3.value='';
138         document.f.whenmorethan1.value=9999999;
139         document.f.whenmorethan2.value=12;
140         document.f.whenmorethan3.value='';
141         document.f.setto1.value=0;
142         document.f.setto2.value=1;
143         document.f.setto3.value='';
144         document.f.lastvalue1.value=sYear;
145         document.f.lastvalue2.value='1';
146         document.f.lastvalue3.value='';
147         document.f.periodicity.value=1;
148         document.f.numberingmethod.value=_('{X}/{Y}');
149         moreoptions(text[16],text[0]);
150         display_table(0);
151         break;
152     default:
153         document.f.add1.value=1;
154         document.f.add2.value='';
155         document.f.add3.value='';
156         document.f.every1.value=1;
157         document.f.every2.value='';
158         document.f.every3.value='';
159         document.f.whenmorethan1.value=9999999;
160         document.f.whenmorethan2.value='';
161         document.f.whenmorethan3.value='';
162         document.f.setto1.value=0;
163         document.f.setto2.value='';
164         document.f.setto3.value='';
165         document.f.lastvalue1.value=1;
166         document.f.lastvalue2.value='';
167         document.f.lastvalue3.value='';
168         document.f.numberingmethod.value='{X}';
169         moreoptions_daily_check(text[0]);
170         document.f.irreg_check.value=1;
171         display_table(0);
172         break;
173     }
174 }
175
176 function display_table(n) {
177     if(n==1){
178         document.getElementById("basetable").style.display = 'block';
179     } else {
180         document.getElementById("basetable").style.display = 'none';
181     }
182 }
183
184 function modify_num_pattern() {
185     document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
186     num_pattern();
187     
188     document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
189     document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
190     document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
191     document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
192     document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
193     document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
194     document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
195     document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
196     document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
197     document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
198     document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
199     document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
200     document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
201     document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
202     document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
203     document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
204
205     var more_strY;
206     var more_strZ;
207     <!-- TMPL_IF NAME="add2" -->
208     if(<!-- TMPL_VAR NAME="add2" --> > 0){
209         more_strY="Y";
210     }
211     <!-- /TMPL_IF -->
212     <!-- TMPL_IF NAME="add3" -->
213     if(<!-- TMPL_VAR NAME="add3" --> > 0){
214         more_strZ="Z";
215     }
216     <!-- /TMPL_IF -->
217
218     document.f.lastvaluetemp1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
219     if(more_strY){
220         document.f.lastvaluetemp2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
221     document.f.whenmorethantemp2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
222     }
223     if(more_strZ){
224         document.f.lastvaluetemp3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
225     document.f.whenmorethantemp3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
226     }
227 }
228
229 // a pre check with more options to see if 'number' and '1/day' are chosen
230 function moreoptions_daily_check(x) {
231     var periodicity = document.f.periodicity.value;
232     var errortext='';
233     if(periodicity == 1){
234         document.getElementById("irregularity").innerHTML = '';
235         var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
236         errortext =_("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
237         for(var j=0;j<daynames.length;j++){
238             errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
239         }
240         var error = errortext;
241         moreoptions(x);
242         document.getElementById("irregularity").innerHTML = error;
243     } else {
244         document.getElementById("irregularity").innerHTML = '';
245         document.getElementById("more_options").innerHTML = '';
246         moreoptions(x);
247     }
248 }
249
250 // to dispaly the more options section
251 function moreoptions(x,y,z){
252 document.getElementById("irregularity").innerHTML = '';
253 document.getElementById("more_options").innerHTML = '';
254 var textbox = '';
255     // alert("X: "+x+"Y: "+y+"Z: "+z);
256     if(x){
257         textbox +="<table>\n<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
258         if(y){
259             textbox +="<td>"+y+"<\/td>";
260             if(z){
261                 textbox +="<td>"+z+"<\/td>";
262             }
263         }
264         textbox +="<\/tr>\n";
265         textbox +="<tr><td>"+text[5]+"<\/td><td><input type='text' name='lastvaluetemp1' size='4' onkeyup='moreoptionsupdate(\"lastvalue1\")'><\/td>\n";
266         if(y){
267             textbox +="<td><input type='text' name='lastvaluetemp2' size='4' onkeyup='moreoptionsupdate(\"lastvalue2\")'><\/td>\n";
268             if(z){
269                 textbox +="<td><input type='text' name='lastvaluetemp3' size='4' onkeyup='moreoptionsupdate(\"lastvalue3\")'><\/td>\n";
270             }
271         }
272         textbox +="<\/tr>\n";
273         if(y){
274             textbox +="<tr><td>"+text[6]+"<\/td>";
275             textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
276             textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
277             if(z){
278                 textbox +="<td><input type='text' name='whenmorethantemp3' size='4' onkeyup='moreoptionsupdate(\"whenmorethan3\",1)'><\/td>\n";
279             }
280             textbox +="<\/tr>";
281         } else {
282           textbox +="<tr> <td>"+_('issues expected')+"</td><td><input type='text' name='issuesexpectedtemp1' size='4' onkeyup='moreoptionsupdate(\"issuesexpected1\",0)'><br/><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"</a></td></tr>";
283         }
284         textbox +="<\/table>\n";
285     }
286     document.getElementById("more_options").innerHTML = textbox;
287 }
288
289 function hemispheres(chosen){
290 var selbox = document.getElementById("season1");
291     if(selbox){
292     var selboxselected = selbox.options[selbox.selectedIndex].value;
293     selbox.options.length = 0;
294
295     if (chosen == "1") {
296         selbox.options[selbox.options.length] = new Option(text[11],'1');
297         selbox.options[selbox.options.length] = new Option(text[12],'2');
298         selbox.options[selbox.options.length] = new Option(text[13],'3');
299         selbox.options[selbox.options.length] = new Option(text[14],'4');
300         is_hemisphere = 1;
301         selbox.options[selboxselected-1].selected = true;
302     }
303
304     if (chosen == "2") {
305         selbox.options[selbox.options.length] = new Option(text[13],'1');
306         selbox.options[selbox.options.length] = new Option(text[10],'2');
307         selbox.options[selbox.options.length] = new Option(text[11],'3');
308         selbox.options[selbox.options.length] = new Option(text[12],'4');
309         is_hemisphere = 2;
310         selbox.options[selboxselected-1].selected = true;
311     }
312     }
313 }
314
315 // to dispaly the more options section for seasons
316 function moreoptions_seasons(x,y){
317 document.getElementById("irregularity").innerHTML = '';
318 document.getElementById("more_options").innerHTML = '';
319 var textbox = '';
320     // alert("X: "+x+"Year: "+y);
321     if(x){
322         var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
323         textbox +="<table>\n<tr><td>"+ text[7]  +"<\/td><td colspan='2'><select name='hemisphere' onchange='hemispheres(this.options[this.selectedIndex].value)'>";
324         for(var i = 1; i <= 2; i++){
325             textbox +="<option value='"+i+"'";
326             if(i == hemi_select){
327                 textbox += " selected "
328             }
329             textbox +=">"+text[i+7]+"<\/option>";
330         }
331         textbox +="<\/select><\/td><\/tr>\n";
332         textbox +="<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
333         textbox +="<td>"+text[16]+"<\/td>";
334         textbox +="<\/tr>\n";
335         textbox +="<tr><td>"+text[5]+"<\/td><td><select name='lastvaluetemp2' id='season1' onchange='moreoptionsupdate(\"lastvalue2\")'>";
336         for(var j = 1; j <= 4; j++){
337             textbox +="<option value='"+j+"'>"+text[j+10]+"<\/option>";
338         }
339         textbox +="<\/select><\/td><td><select name='lastvaluetemp1' onchange='moreoptionsupdate(\"lastvalue1\")'>";
340         for(var k = parseInt(y); k <= parseInt(y)+15; k++){
341             textbox +="<option value='"+k+"'>"+k+"<\/option>";
342         }
343         textbox +="<\/select><\/td><\/tr>\n";
344         textbox +="<tr><td>"+text[6]+"<\/td>";
345         textbox +="<td><a href='javascript:irregularity_check()'>"+_('Irregularity?')+"<\/a><\/td>\n";
346         textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
347                 textbox +="<\/tr><\/table>\n";
348     }
349     document.getElementById("more_options").innerHTML = textbox;
350 }
351
352 function irregularity_check(){
353     document.f.irreg_check.value = 1; // Irregularity button now pushed
354     var periodicity = document.f.periodicity.value;
355     var rollover = document.f.issuesexpected1.value;
356     if(document.f.whenmorethantemp2){
357       rollover = document.f.whenmorethantemp2.value;
358     }
359     if(document.f.whenmorethantemp3){
360         rollover = document.f.whenmorethantemp3.value;
361     }
362     var error='';
363     var toobig;
364     var expected; 
365     var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
366     switch(periodicity){
367     case "12":
368         if(rollover < 730) expected =730;
369         if(rollover > 730) {
370             expectedover=730;
371             toobig=1;
372         }
373         break;
374     case "1":
375         if(rollover < 365) expected =365;
376         if(rollover > 365) {
377             expectedover=365;
378             toobig=1;
379         }
380         break;
381     case "13":
382         if(rollover < 156) expected =156;
383         if(rollover > 156) {
384             expectedover=156;
385             toobig=1;
386         }
387         break;
388     case "2":
389         if(rollover < 52) expected =52;
390         if(rollover > 52){
391             expectedover=52;
392             toobig=1;
393         }
394         break;
395     case "3":
396         if(rollover < 26) expected =26;
397         if(rollover > 26){
398             expectedover=26;
399             toobig=1;
400         }
401         break;
402     case "4":
403         if(rollover < 17) expected =17;
404         if(rollover > 17){
405             expectedover=17;
406             toobig=1;
407         }
408         break;
409     case "5":
410         if(rollover < 12) expected =12;
411         if(rollover > 12){
412             expectedover=12;
413             toobig=1;
414         }
415         break;
416     case "6":
417         if(rollover < 6) expected =6;
418         if(rollover > 6){
419             expectedover=6;
420             toobig=1;
421         }
422         break;
423     case "7":
424         if(rollover < 4) expected =4;
425         if(rollover > 4){
426             expectedover=4;
427             toobig=1;
428         }
429         break;
430     case "8":
431         if(rollover < 4) expected =4;
432         if(rollover > 4){
433             expectedover=4;
434             toobig=1;
435         }
436         break;
437     case "9":
438         if(rollover < 2) expected =2;
439         if(rollover > 2){
440             expectedover=2;
441             toobig=1;
442         }
443         break;
444     case "10":
445         if(rollover < 1) expected =1;
446         if(rollover > 1){
447             expectedover=1;
448             toobig=1;
449         }
450         break;
451     default:
452         break;
453     }
454     if(expected){
455         if(expected == 365 || expected==730){
456             var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
457             errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
458             for(var j=0;j<daynames.length;j++){
459                 errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
460             }
461             error=errortext;
462         } else {
463             errortext +=expected+_(" issues expected ")+rollover+_(" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>");
464             var count=0;
465             for(var i=rollover;i<expected;i++){
466                 errortext +="<select name='irregular' id='irregular"+count+"' onchange='display_example(expected)'>\n";
467                 errortext +=irregular_options(periodicity);
468                 errortext +="<\/select>\n";
469                 count++;
470             }
471             error=errortext;
472         }
473     }
474     if(toobig){
475         errortext +=expectedover+_(" issues expected ")+rollover+_(" were entered.<br \/> You seem to have indicated more issues per year than expected.");
476         error=errortext;
477     }
478     if(error.length ==0){
479         error=_('No irregularities noticed');
480     }
481     display_example(expected);
482     document.getElementById("irregularity").innerHTML = error;
483 }
484
485 function irregular_options(periodicity){
486     var titles;
487     var count;
488 <!-- TMPL_IF NAME="weekarrayjs" -->
489     var weeks = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
490 <!-- /TMPL_IF -->
491     var months = new Array(_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),_('July'),_('August'),_('September'),_('October'),_('November'),_('December'));
492     var seasons = new Array(_('Autumn'),_('Winter'),_('Spring'),_('Summer'),_('Fall'));
493     var errortext='';
494     if(periodicity == 1) {
495         expected = 366;
496         titles = "Day";
497         count = 1;
498     }
499     if(periodicity == 2 || periodicity == 3 || periodicity == 4) { 
500         expected = 52;
501     <!-- TMPL_IF NAME="weekarrayjs" -->
502         titles = weeks;
503         count = <!-- TMPL_VAR NAME="weekno" -->;
504     <!-- TMPL_ELSE -->
505         titles = "Week";
506         count = 1;
507     <!-- /TMPL_IF -->
508     }
509     if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
510         if(periodicity == 8) {
511             is_season = 1; // setting up from edit page
512         } 
513         if(is_season){
514             titles = seasons;
515             expected = 4;
516             if(is_hemisphere == 2){
517                 count = 2;
518             } else {
519                 count = 1;
520             }
521         } else {
522             titles = months;
523             expected = 12;
524             count = 1;
525         }
526     }
527     for(var j=1;j<=expected;j++){
528         if(isArray(titles)){
529             if(count>expected){
530                 count = count-expected;
531             }
532             if(is_season && is_hemisphere == 1){
533                 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
534 // alert("value: "+((count*3)-2)+" title: "+titles[j]);
535             } else if(is_season && is_hemisphere == 2){
536                 errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
537 // alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
538             } else {
539                 errortext +="<option value='"+count+"'>"+titles[j-1]+"<\/option>\n";
540             }
541             count++;
542         } else {
543             errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
544         }
545     }
546     return errortext;
547 }
548
549 function irregular_order(){
550     var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
551     var periodicity = document.f.periodicity.value;
552     var irregarray = irregular.split(',');
553     if(periodicity ==1){
554         for(j=0;j<irregarray.length;j++){
555         document.getElementById("irregular"+irregarray[j]).checked = true; 
556         }
557     } else {
558         for(i=0;i<irregarray.length;i++){    
559             document.getElementById("irregular"+i).value = irregarray[i];
560         }
561     }
562 }
563
564 function display_example(expected){
565     var startfrom1 = parseInt(document.f.lastvalue1.value);
566     var startfrom2 = parseInt(document.f.lastvalue2.value);
567     var startfrom3 = parseInt(document.f.lastvalue3.value);
568     var every1 = parseInt(document.f.every1.value);
569     var every2 = parseInt(document.f.every2.value);
570     var every3 = parseInt(document.f.every3.value);
571     var numberpattern = document.f.numberingmethod.value;
572     var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
573     var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
574     var setto2 = parseInt(document.f.setto2.value);
575     var setto3 = parseInt(document.f.setto3.value);
576     var displaytext = _('Based on the information<br \/>entered the Numbering Pattern<br \/>will look like this<br \/>\n');
577     if(startfrom3>0){
578         var count=startfrom3-1;
579         var count2=startfrom2;
580         for(var i=0;i<12;i++){
581             if(count>=whenmorethan3){
582                 count=setto3;
583                 if(count2>=whenmorethan2){
584                     startfrom1++;
585                     count2=setto2;
586                 } else {
587                     count2++;
588                 }
589             } else {
590                 count++;
591             }
592             displaytext += numberpattern.replace(/{Z}/,count)+'\n';
593             displaytext = displaytext.replace(/{Y}/,count2)+'<br \/>\n';
594             displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
595
596         }
597     }
598     if(startfrom2>0 && !startfrom3){
599         var count=startfrom2-1;
600         for(var i=0;i<12;i++){
601             if(count>=whenmorethan2){
602                 startfrom1++;
603                 count=setto2;
604             } else {
605                 count++;
606             }
607
608             if(is_season){
609                 if(is_hemisphere == 2){
610                     if(count == 1) {
611                         displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
612                     } else {
613                         displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
614                     }
615                 } else {
616                 displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
617                 }
618             } else {
619                 displaytext += numberpattern.replace(/{Y}/,count)+'\n';
620             }
621             displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
622         }
623     }
624     if(startfrom1>0 && !startfrom2 && !startfrom3){
625         var offset=eval(document.f.issuesexpected1.value);
626         if (!offset){
627             offset = 12 
628         }
629         for(var i=startfrom1;i<(startfrom1+offset);i+=every1){
630             displaytext += numberpattern.replace(/{X}/,i)+'<br \/>\n';
631         }
632     }
633     displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
634     document.getElementById("displayexample").innerHTML = displaytext;
635 }
636
637 function isArray(obj) {
638 if (obj.constructor.toString().indexOf("Array") == -1)
639     return false;
640 else
641     return true;
642 }
643
644 function moreoptionsupdate(fieldnames,rollover){
645     fieldname = fieldnames;
646     fld = fieldname.length;
647     fld = fld-1;
648     fieldnametempnumber = fieldname.substr(fld);
649     //alert(fieldnametempnumber);
650     fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
651     // alert(fieldnametemp);
652     eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
653 //     alert (fieldname+" : "+eval("document.f."+fieldname+".value") +' '+fieldnametemp+' : ' +eval("document.f."+fieldnametemp+".value"));
654     if(rollover){
655         eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
656     }
657 }
658
659
660 function check_input(e){
661     var unicode=e.charCode? e.charCode : e.keyCode
662     if (unicode!=8 && unicode !=46 && unicode!=9 && unicode !=13){ // if key isn't backspace or delete
663         if (unicode<48||unicode>57) { // if not a number
664             alert(_("Needs to be entered in digit form -eg 10"));
665             return false // disable key press
666         }
667     }
668 }
669
670 function Create_biblio(f)
671 {
672    window.open('/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup','FindABibIndex','width=1024,height=768,toolbar=no,scrollbars=yes');
673 }
674
675 function Plugin(f)
676 {
677          window.open('subscription-bib-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
678 }
679
680 function FindAcqui(f)
681 {
682          window.open('acqui-search.pl','FindASupplier','width=800,height=400,toolbar=no,scrollbars=yes');
683 }
684
685 function Find_ISSN(f)
686 {
687          window.open('issn-search.pl','FindABibIndex','width=800,height=400,toolbar=no,scrollbars=yes');
688 }
689
690
691 function Check(f) {
692     if (f.startdate.value.length != 0 && f.sublength.value > 0) {
693         if (f.irreg_check.value == 1) {
694             document.f.submit();
695         } else {
696             if(f.numbering_pattern.value == ''){
697                 alert(_("need to choose a numbering pattern"));
698             } else {
699                 alert(_("need to check for irregularity by clicking 'Irregularity?'"));
700             }
701         }
702     } else {
703         alert(_('field marked with * are mandatory'));
704     }
705     return false;
706 }
707 <!-- TMPL_IF name="mod" -->
708 window.onload = modify_num_pattern();
709     <!-- TMPL_IF name="hemisphere" -->
710     window.onload = hemispheres(<!-- TMPL_VAR NAME="hemisphere" -->);
711     <!-- /TMPL_IF -->
712 <!-- /TMPL_IF -->
713 <!-- TMPL_IF name="irregularity" -->
714 window.onload = irregularity_check();
715 window.onload = irregular_order();
716 <!-- /TMPL_IF -->
717 -->
718 </script>
719 </head>
720 <body>
721 <!-- TMPL_INCLUDE NAME="header.inc" -->
722 <!-- TMPL_INCLUDE NAME="serials-search.inc" -->
723
724
725 <div id="doc3" class="yui-t2">
726    
727    <div id="bd">
728         <div id="yui-main">
729         <div class="yui-b">
730
731
732
733 <!-- TMPL_IF name="mod" -->
734     <h1>Modify a subscription</h1>
735     <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl">
736         <input type="hidden" name="op" value="modsubscription" />
737         <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
738 <!-- TMPL_ELSE -->
739     <h1>Add a subscription (Serial Holdings Record)</h1>
740     <form method="post" action="/cgi-bin/koha/serials/subscription-add.pl" name="f">
741         <input type="hidden" name="op" value="addsubscription" />
742 <!-- /TMPL_IF -->
743 <input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->" />
744 <input type="hidden" name="irreg_check" value="0" />
745 <input type="hidden" name="issuesexpected1" value="0" />
746
747     <h2>Subscription information for subscription #<!--TMPL_VAR name="subscriptionid"--></h2>
748     <table>
749         <tr>
750             <td>Librarian:</td>
751             <td><!-- TMPL_VAR name="loggedinusername" --></td>
752         </tr>
753         <tr>
754             <td><label>Supplier:</label></td>
755             <td><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size="8" /> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a Supplier</a></td>
756         </tr>
757         <tr>
758             <td><label>Biblio</label></td>
759             <td>
760                 <input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="8" /> 
761                 (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled="disabled" readonly="readonly" />)
762                 <a href="#" onclick="Plugin(f)">Search for Biblio</a> <!--TMPL_UNLESS Name="mod"--> |
763                 <a href="#" onclick="Create_biblio(f)">Create Biblio</a><!--/TMPL_UNLESS-->
764             </td>
765         </tr>
766         <tr>
767             <td><label>Call Number</label></td>
768             <td><input type="text" name="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20" /></td>
769         </tr>
770         <tr>
771             <td>Branch</td>
772             <td>
773                 <select name="branchcode">
774                     <option value="">Any branch</option>
775                     <!-- TMPL_LOOP name="branchloop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
776                                 <!-- TMPL_ELSE -->
777                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
778                                 <!-- /TMPL_IF -->
779                     <!-- /TMPL_LOOP -->
780                 </select> (select a branch)
781             </td>
782         </tr>
783         <tr>
784             <td><label>Notes</label></td>
785             <td><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></td>
786         </tr>
787         <tr>
788             <td><label>Management Notes</label></td>
789             <td><textarea name="internalnotes" cols="30" rows="2"><!-- TMPL_VAR name="internalnotes" --></textarea></td>
790         </tr>
791         <tr>
792             <td>Patron alert with </td>
793             <td>
794                 <select name="letter">
795                     <option value="">un-activated</option>
796                 <!-- TMPL_LOOP name="letterloop" -->
797                                 <!-- TMPL_IF name="selected" -->
798                     <option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="lettername" --></option>
799 <!-- TMPL_ELSE -->
800                     <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="lettername" --></option>
801 <!-- /TMPL_IF -->
802                 <!-- /TMPL_LOOP -->
803                 </select> (select a letter &amp; patrons will be able to "follow" this subscription and recieve a mail on every new issue)
804             </td>
805         </tr>
806         <tr>
807             <td><b>Warning:</b></td>
808             <td>
809                 <ul>
810                     <li>Remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
811                     <li>You also must have selected a supplier if you want to ask for late issues</li>
812                 </ul>
813             </td>
814         </tr>
815     </table>
816 <div id="subscription_form_planning">
817     <h2>Planning</h2>
818     <table>
819         <tr>
820             <td>First Issue ETA:</td>
821             <td>
822                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button2" style="cursor: pointer;" alt="" />
823                 <input type="text" name="firstacquidate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="acqui_date" />
824                 <!-- both scripts for calendar must follow the input field --> 
825                 <script type="text/javascript">
826                     Calendar.setup({
827                         inputField:"acqui_date",
828                         ifFormat       :   "%d/%m/%Y",
829                         button         :   "button2",
830                         align          :   "Tl"
831                     });
832                 </script>
833                 <script type="text/javascript">
834                     Calendar.setup({
835                         inputField     :   "acqui_date",
836                         ifFormat       :   "%d/%m/%Y",
837                         button         :   "acqui_date",
838                         align          :   "Tl"
839                     });
840                 </script>
841             </td>
842             <td rowspan="5">
843                 <div id="displayexample"></div>
844             </td>
845         </tr>
846         <tr>
847             <td>Frequency: (*)</td>
848             <td>
849                 <select name="periodicity" size="1" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1);num_pattern;">
850                 <option value="" selected="selected">-- please choose --</option>
851                 <!-- TMPL_IF name="periodicity16" -->
852                 <option value="16" selected="selected">Without Periodicity</option>
853                 <!-- TMPL_ELSE -->
854                     <option value="16">Without Periodicity</option>
855                 <!-- /TMPL_IF -->
856                 <!-- TMPL_IF name="periodicity48" -->
857                 <option value="48" selected="selected">Unknown</option>
858                 <!-- TMPL_ELSE -->
859                 <option value="48">Unknown</option>
860                 <!-- /TMPL_IF -->
861                 <!-- TMPL_IF name="periodicity32" -->
862                 <option value="32" selected="selected">Irregular</option>
863                 <!-- TMPL_ELSE -->
864                     <option value="32">Irregular</option>
865                 <!-- /TMPL_IF -->
866
867                 <!-- TMPL_IF name="periodicity12" -->
868                     <option value="12" selected="selected">2/day</option>
869                 <!-- TMPL_ELSE -->
870                     <option value="12">2/day</option>
871                 <!-- /TMPL_IF -->
872                 <!-- TMPL_IF name="periodicity1" -->
873                     <option value="1" selected="selected">1/day</option>
874                 <!-- TMPL_ELSE -->
875                     <option value="1">1/day</option>
876                 <!-- /TMPL_IF -->
877                 <!-- TMPL_IF name="periodicity13" -->
878                     <option value="13" selected="selected">3/week</option>
879                 <!-- TMPL_ELSE -->
880                     <option value="13">3/week</option>
881                 <!-- /TMPL_IF -->
882                 <!-- TMPL_IF name="periodicity2" -->
883                     <option value="2" selected="selected">1/week</option>
884                 <!-- TMPL_ELSE -->
885                     <option value="2">1/week</option>
886                 <!-- /TMPL_IF -->
887                 <!-- TMPL_IF name="periodicity3" -->
888                     <option value="3" selected="selected">1/2 weeks (2/month)</option>
889                 <!-- TMPL_ELSE -->
890                     <option value="3">1/2 weeks (2/months)</option>
891                 <!-- /TMPL_IF -->
892                 <!-- TMPL_IF name="periodicity4" -->
893                     <option value="4" selected="selected">1/3 weeks</option>
894                 <!-- TMPL_ELSE -->
895                     <option value="4">1/3 weeks</option>
896                 <!-- /TMPL_IF -->
897                 <!-- TMPL_IF name="periodicity5" -->
898                     <option value="5" selected="selected">1/month</option>
899                 <!-- TMPL_ELSE -->
900                     <option value="5">1/month</option>
901                 <!-- /TMPL_IF -->
902                 <!-- TMPL_IF name="periodicity6" -->
903                     <option value="6" selected="selected">1/2 months (6/year)</option>
904                 <!-- TMPL_ELSE -->
905                     <option value="6">1/2 months (6/year)</option>
906                 <!-- /TMPL_IF -->
907                 <!-- TMPL_IF name="periodicity7" -->
908                     <option value="7" selected="selected">1/3 months (1/quarter)</option>
909                 <!-- TMPL_ELSE -->
910                     <option value="7">1/3 months (1/quarter)</option>
911                 <!-- /TMPL_IF -->
912                 <!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
913                 <!-- TMPL_IF name="periodicity8" -->
914                     <option value="8" selected="selected">1/quarter (seasonal)</option>
915                 <!-- TMPL_ELSE -->
916                     <option value="8">1/quarter (seasonal)</option>
917                 <!-- /TMPL_IF -->
918
919                 <!-- TMPL_IF name="periodicity9" -->
920                     <option value="9" selected="selected">2/years</option>
921                 <!-- TMPL_ELSE -->
922                     <option value="9">2/year</option>
923                 <!-- /TMPL_IF -->
924                 <!-- TMPL_IF name="periodicity10" -->
925                     <option value="10" selected="selected">1/year</option>
926                 <!-- TMPL_ELSE -->
927                     <option value="10">1/year</option>
928                 <!-- /TMPL_IF -->
929                 <!-- TMPL_IF name="periodicity11" -->
930                     <option value="11" selected="selected">1/2 years</option>
931                 <!-- TMPL_ELSE -->
932                     <option value="11">1/2 years</option>
933                 <!-- /TMPL_IF -->
934                 </select>
935                 Manual History :<input type="checkbox" name="manualhist" value="1" />
936             </td>
937         </tr>
938         <tr>
939             <td>Numbering Pattern:</td>
940             <td>
941                 <select name="numbering_pattern" size="1" id="numberpattern" onchange="num_pattern()">
942                     <option value="" selected="selected">-- please choose --</option>
943                     <!-- TMPL_IF name="numberpattern1" -->
944                         <option value="1" selected="selected">Number</option>
945                     <!-- TMPL_ELSE -->
946                         <option value="1">Number</option>
947                     <!-- /TMPL_IF -->
948                     <!-- TMPL_IF name="numberpattern2" -->
949                         <option value="2" selected="selected">Volume, Number, Issue</option>
950                     <!-- TMPL_ELSE -->
951                         <option value="2">Volume, Number, Issue</option>
952                     <!-- /TMPL_IF -->
953                     <!-- TMPL_IF name="numberpattern3" -->
954                         <option value="3" selected="selected">Volume, Number</option>
955                     <!-- TMPL_ELSE -->
956                         <option value="3">Volume, Number</option>
957                     <!-- /TMPL_IF -->
958                     <!-- TMPL_IF name="numberpattern4" -->
959                         <option value="4" selected="selected">Volume, Issue</option>
960                     <!-- TMPL_ELSE -->
961                         <option value="4">Volume, Issue</option>
962                     <!-- /TMPL_IF -->
963                     <!-- TMPL_IF name="numberpattern5" -->
964                         <option value="5" selected="selected">Number, Issue</option>
965                     <!-- TMPL_ELSE -->
966                         <option value="5">Number, Issue</option>
967                     <!-- /TMPL_IF -->
968                     <!-- TMPL_IF name="numberpattern6" -->
969                         <option value="6" selected="selected">Seasonal only</option>
970                     <!-- TMPL_ELSE -->
971                         <option value="6">Seasonal only</option>
972                     <!-- /TMPL_IF -->
973                     <!-- TMPL_IF name="numberpattern8" -->
974                         <option value="8" selected="selected">Year/Number</option>
975                     <!-- TMPL_ELSE -->
976                         <option value="8">Year/Number</option>
977                     <!-- /TMPL_IF -->          
978                     <!-- TMPL_IF name="numberpattern7" -->
979                         <option value="7" selected="selected">None of the above</option>
980                     <!-- TMPL_ELSE -->
981                         <option value="7">None of the above</option>
982                     <!-- /TMPL_IF -->
983                 </select>
984                 <div id="more_options"></div>
985                 <div id="irregularity"></div>
986             </td>
987         </tr>
988         <tr>
989             <td>Begins On: (*)</td>
990             <td>
991                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt=""  />
992                 <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size="13" maxlength="10" id="beginning_date" />
993                 <!-- both scripts for calendar must follow the input field --> 
994                 <script type="text/javascript">
995                     Calendar.setup({
996                         inputField   : "beginning_date",
997                         ifFormat     : "%d/%m/%Y",
998                         button       : "button1",
999                         align        : "Tl"
1000                     });
1001                 </script>
1002                 <script type="text/javascript">
1003                     Calendar.setup({
1004                         inputField   : "beginning_date",
1005                         ifFormat     : "%d/%m/%Y",
1006                         button       : "beginning_date",
1007                         align        : "Tl"
1008                     });
1009                 </script>
1010             </td>
1011         </tr>
1012         <tr>
1013             <td>Subscription length</td>
1014             <td>
1015                 <select name="subtype">
1016                     <!-- TMPL_LOOP NAME="subtype" -->
1017                         <!-- TMPL_IF NAME="selected" -->
1018                         <option value="<!-- TMPL_VAR NAME="name" -->" selected="selected">
1019                         <!-- TMPL_ELSE -->
1020                         <option value="<!-- TMPL_VAR NAME="name" -->">
1021                         <!-- /TMPL_IF -->
1022                         <!-- TMPL_VAR NAME="name" -->
1023                         </option>
1024                     <!-- /TMPL_LOOP -->
1025                 </select>
1026                 <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)" /> (*) (enter amount in numerals)
1027             </td>
1028         </tr>
1029     <tr>
1030         <td>Numbering calculation</td>
1031         <td>Numbering formula: <input type="text" name="numberingmethod" id="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->" /></td>
1032     </tr>
1033     <tr>
1034     <td colspan="3">
1035         <div id="basetable" style="display: none;">
1036             <table class="small">
1037                 <tr>
1038                     <th>&nbsp;</th>
1039                     <th>X</th>
1040                     <th>Y</th>
1041                     <th>Z</th>
1042                 </tr>
1043                 <tr>
1044                     <td>Add</td>
1045                     <td>
1046                         <input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->" />
1047                     </td>
1048                     <td>
1049                         <input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->" />
1050                     </td>
1051                     <td>
1052                         <input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->" />
1053                     </td>
1054                 </tr>
1055                 <tr>
1056                     <td>once every</td>
1057                     <td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
1058                     <td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
1059                     <td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
1060                 </tr>
1061                 <tr>
1062                     <td>When more than</td>
1063                     <td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
1064                     <td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
1065                     <td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
1066                 </tr>
1067                 <!-- TMPL_IF name="mod" -->
1068                 <tr>
1069                     <td>The loop is for instance</td>
1070                     <td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
1071                     <td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
1072                     <td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
1073                 </tr>
1074                 <!-- /TMPL_IF -->
1075                 <tr>
1076                     <td>Set back to</td>
1077                     <td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
1078                     <td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
1079                     <td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
1080                 </tr>
1081                 <tr>
1082                     <td>
1083                         <!-- TMPL_IF name="mod" -->
1084                             Last value
1085                         <!-- TMPL_ELSE -->
1086                             Begins with
1087                         <!-- /TMPL_IF -->
1088                     </td>
1089                     <td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
1090                     <td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
1091                     <td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
1092                 </tr>
1093             </table>
1094         </div>
1095         </td></tr>
1096     </table>
1097 </div>
1098 <!--TMPL_IF Name="history"-->
1099 <div id="subscription_form_history">
1100     <h2>History</h2>
1101     <table>
1102         <tr>
1103           <td>Starting date:</td>
1104           <td><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->" /> (the date of the 1st subscription)</td>
1105         </tr>
1106         <tr>
1107           <td>Ending date:</td>
1108           <td><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->" />(if empty : subscription still active)</td>
1109         </tr>
1110         <tr>
1111             <td>Recieved issues</td>
1112             <td><textarea name="recievedlist" cols="60" rows="5"><!-- TMPL_VAR name="recievedlist" --></textarea></td>
1113         </tr>
1114         <tr>
1115             <td>Missing issues</td>
1116             <td><textarea name="missinglist" cols="60" rows="5"><!-- TMPL_VAR name="missinglist" --></textarea></td>
1117         </tr>
1118         <tr>
1119             <td>Opac's notes</td>
1120             <td><textarea name="opacnote" cols="60" rows="5"><!-- TMPL_VAR name="opacnote" --></textarea></td>
1121         </tr>
1122         <tr>
1123             <td>Librarian notes</td>
1124             <td><textarea name="librariannote" cols="60" rows="5"><!-- TMPL_VAR name="librariannote" --></textarea></td>
1125         </tr>
1126     </table>
1127 </div>
1128 <!--/TMPL_IF-->
1129 <!-- TMPL_IF name="mod" -->
1130     <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
1131 <!-- TMPL_ELSE -->
1132     <input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" />
1133 <!-- /TMPL_IF -->
1134 </form>
1135
1136 </div>
1137 </div>
1138
1139 <div class="yui-b">
1140 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
1141 </div>
1142 </div>
1143 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->