source: gs3-extensions/mat/trunk/resources/script/status3.js@ 21917

Last change on this file since 21917 was 17693, checked in by cc108, 15 years ago

new resources folder

File size: 2.9 KB
Line 
1function checkStatus(){
2var x = "";
3var prefix ="";
4var o = document.forms[0];
5
6 for(var i = 0; i<o.length; i++){
7 var a = document.forms[0].elements[i];
8 //alert( i + " "+a.type);
9 if(a.type=="checkbox" && a.checked){
10 x = x+"H";
11 }
12
13 if(a.type=="checkbox" && !a.checked){
14 x = x+"S";
15 }
16 if(a.type=="radio" && a.checked && a.id=="C1"){
17 prefix = "dublin_";
18 }
19 if(a.type=="radio" && a.checked && a.id=="C2"){
20 prefix = "extracted_";
21 }
22 if(a.type=="radio" && a.checked && a.id=="C3"){
23 prefix = "both_";
24 }
25 if(a.type=="radio" && a.checked && a.id=="C4"){
26 prefix = "other_";
27 }
28 if(a.type=="radio" && a.id =="R1" && a.checked){
29 x = x+"_best.html"
30 }
31
32 if(a.type=="radio" && a.id =="R2" && a.checked){
33 x = x+"_worst.html"
34 }
35 }
36 x = prefix+x;
37 window.open(x);
38}
39
40function autoSubmit()
41{
42//alert("autoSubmit1");
43setTimeout('document.collectionForm.submit()',5000);
44}
45
46function autoSubmit2()
47{
48//alert("autoSubmit2");
49setTimeout('document.aForm.submit()',5000);
50}
51
52function hidediv() {
53document.getElementById('hideshow').style.visibility = 'hidden';
54}
55
56
57function showdiv() {
58//alert("test");
59document.getElementById('hideshow').style.visibility = 'visible';
60}
61
62function helpWindow(arg1, arg2){
63
64if(arg1=="Maximum"){
65var msg = "This number is calculated by counting the maximum usage in any records.";
66}
67else if(arg1=="Minimum"){
68var msg = "This number is calculated by counting the minimum usage in any records. For example, there are 100 records and one of them does not have the value for "+arg2+" , the minimum usage is 0.";
69}
70else if(arg1=="Average"){
71var msg = "This number is calculated by dividing the sum of usage by the total number of records containing it. For example, the total usage of this element is 99 and 33 documents use the element at least once. So the average is 3 ( 99 / 33). ";
72}
73else if(arg1=="Mode"){
74var msg = "Mode is the most frequent occurrence values. In this case, we are talking about the usage / record.";
75}
76else if(arg1=="Mode Frequency"){
77var msg = "This is the coverage of the mode value. For example, there are 10 records and 5 records use this element exactly once. Suppose the mode value is 1. So the coverage of the mode value is 50%.";
78}
79newwin("Coverage",msg);
80}
81
82 function newwin(arg1, msg)
83 {
84 var winW = 50;
85 var winH = 50;
86 var newwindo;
87 var htm="<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><title>Metadata Element Detail</title><style type=text/css >body{font-family:arial;}</style></head>";
88 htm+="<body>";
89 htm = htm +"<h3>"+arg1+"</h3>";
90 htm = htm + "<p>"+msg+"</p>";
91 htm+="<p align=center><input type=button onclick=window.close() value=Close /></p></body></html>";
92 newwindo=window.open('','mywindow',winW+','+winH+','+'toolbar=yes,location=yes');
93 newwindo.document.write(htm);
94 newwindo.document.close();
95 }
Note: See TracBrowser for help on using the repository browser.