source: trunk/template-common/scripts.js @ 2242

Last change on this file since 2242 was 1900, checked in by rub, 17 years ago

Apply property svn:eol-style Value: LF

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1function SelectAll( formulaire )
2{
3var len = formulaire.elements.length;
4var i=0;
5for( i = 0; i < len; i++)
6{
7  if ( formulaire.elements[i].type=='checkbox'
8           && formulaire.elements[i].name != 'copie')
9  {
10        formulaire.elements[i].checked = true;
11  }
12}
13}
14
15function DeselectAll( formulaire )
16{
17var len = formulaire.elements.length;
18var i=0;
19for( i = 0; i < len; i++)
20{
21  if ( formulaire.elements[i].type=='checkbox'
22           && formulaire.elements[i].name != 'copie')
23  {
24        formulaire.elements[i].checked = false;
25  }
26}
27}
28
29function Inverser( formulaire )
30{
31var len = formulaire.elements.length;
32var i=0;
33for( i=0; i<len; i++)
34{
35  if ( formulaire.elements[i].type=='checkbox'
36           && formulaire.elements[i].name != 'copie')
37  {
38        formulaire.elements[i].checked = !formulaire.elements[i].checked;
39  }
40}
41}
42
43function phpWGOpenWindow(theURL,winName,features)
44{
45  img = new Image();
46  img.src = theURL;
47  if (img.complete)
48  {
49    var width=img.width +40;
50    var height=img.height +40;
51  }
52  else
53  {
54    var width=640;
55    var height=480;
56    img.onload = resizeWindowToFit;
57  }
58  newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height);
59}
60
61function resizeWindowToFit()
62{
63  newWin.resizeTo( img.width+50, img.height+100);
64}
65
66function popuphelp(url)
67{
68  window.open(
69    url,
70    'dc_popup',
71    'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no'
72  );
73}
74
Note: See TracBrowser for help on using the repository browser.