import repository from arizona
[raven.git] / apps / mprepo / etc / gacks_footer.stemp
1 </table>
2          </td>
3       </tr>
4
5        </table>
6        </td>
7
8      </tr>
9      <tr>
10         <td></td>
11
12 <td>
13            <a href="http://www.planet-lab.org"><img style="border: 0px; border-style: none;" src="/static/powered_by_pl_grey.png" alt="powered by planetlab"></a>
14
15            <a href="http://www.cs.arizona.edu"><img style="position:relative; left: 20px; border: 0px; border-style: none;" src="/static/template_logo_small_grey.png" alt="University of Arizona, Computer Science logo"></a>
16         </td>
17      </tr>
18
19 </table>
20
21 </div>
22 </form>
23
24
25 <!-- Start javascript stuff -->
26
27 <script>
28 var fileinputs=0;
29
30 function goTo(loc){
31    document.location=loc;
32 }
33
34 function removeFile(row){
35    form = document.getElementById("uploadform");
36    num  = parseInt(form.numfiles.value);
37    form.numfiles.value = (num - 1);
38
39    var number = row.rowIndex;
40
41    //alert("about to delete: "+number+"\nnum files before del: "+num+"\nnum files after del: "+form.numfiles.value);
42
43    table  = document.getElementById("content");
44    table.deleteRow(number);
45
46    //numberrows(table);
47
48    document.getElementById("add").style["visibility"]="visible";
49    if(parseInt(form.numfiles.value) == 1)
50       document.getElementById('uploadbutton').value="Upload File";
51
52 }
53
54 function numberrows(table){
55    rows = table.rows;
56    for(var i=0; i<rows.length; i++){
57       var cell = rows[i].insertCell(1);
58       cell.innerHTML=rows[i].rowIndex;
59    }
60
61 }
62
63 function addFile(){
64    table = document.getElementById("content");
65    form  = document.getElementById("uploadform");
66    num = form.numfiles.value;
67
68    //numberrows(table);
69
70    //alert("num files before add: "+num)
71
72    if(parseInt(num) >=5){
73       document.getElementById("add").style["visibility"]="hidden";
74    }
75    if(parseInt(num) >=6){
76       return;
77    }
78
79    form.numfiles.value = parseInt(form.numfiles.value) + 1;
80    //alert("num files after add: " + form.numfiles.value)
81
82    row   = table.insertRow(table.rows.length-1);
83    row.setAttribute("num",num);
84    cell1 = row.insertCell(0);
85
86    cell1 = row.insertCell(0);
87    cell1.setAttribute("colspan",3);
88    html  = "<input name='file_"+num+"' size='50' type='file' onSelectStart='addFile();'>";
89    html += "&nbsp;&nbsp;<a href='#' onClick='removeFile(this.parentNode.parentNode);' class='normal'>remove</a>";
90    cell1.innerHTML=html;
91    //alert("new file html: \n" +html);
92
93    document.getElementById('uploadbutton').value="Upload Files";
94
95 }
96 </script>
97
98
99 </body>
100 </html>