[ PHPXref.com ] [ Generated: Sun Jul 20 17:05:41 2008 ] [ Coppermine 1.4.5 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> scripts.js (source)

   1  /*************************

   2    Coppermine Photo Gallery

   3    ************************

   4    Copyright (c) 2003-2006 Coppermine Dev Team

   5    v1.1 originally written by Gregory DEMAR

   6  

   7    This program is free software; you can redistribute it and/or modify

   8    it under the terms of the GNU General Public License as published by

   9    the Free Software Foundation; either version 2 of the License, or

  10    (at your option) any later version.

  11    ********************************************

  12    Coppermine version: 1.4.5

  13    $Source: /cvsroot/coppermine/stable/scripts.js,v $

  14    $Revision: 1.6 $

  15    $Author: gaugau $

  16    $Date: 2006/03/02 08:17:40 $

  17  **********************************************/
  18  
  19  function MM_openBrWindow(theURL,winName,features) { //v2.0
  20    window.open(theURL,winName,features);
  21  }
  22  
  23  function writeCookie(name, data, noDays){
  24    var cookieStr = name + "="+ data
  25    if (writeCookie.arguments.length > 2){
  26      cookieStr += "; expires=" + getCookieExpireDate(noDays)
  27      }
  28    document.cookie = cookieStr
  29  }
  30  
  31  function readCookie(cookieName){
  32     var searchName = cookieName + "="
  33     var cookies = document.cookie
  34     var start = cookies.indexOf(cookieName)
  35     if (start == -1){ // cookie not found
  36       return ""
  37       }
  38     start += searchName.length //start of the cookie data
  39     var end = cookies.indexOf(";", start)
  40     if (end == -1){
  41       end = cookies.length
  42       }
  43     return cookies.substring(start, end)
  44  }
  45  
  46  function blocking(nr, cookie, vis_state)
  47  {
  48          if (document.layers)
  49          {
  50                  current = (document.layers[nr].display == 'none') ? vis_state : 'none';
  51                  if (cookie != '')
  52                          writeCookie(nr, current);
  53                  document.layers[nr].display = current;
  54          }
  55          else if (document.all)
  56          {
  57                  current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
  58                  if (cookie != '')
  59                          writeCookie(nr, current);
  60                  document.all[nr].style.display = current;
  61          }
  62          else if (document.getElementById)
  63          {
  64                  display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
  65                  if (cookie != '')
  66                          writeCookie(nr, display);
  67                  document.getElementById(nr).style.display = display;
  68          }
  69  }
  70  
  71  
  72  function adjust_popup()
  73  {
  74          var w, h, fixedW, fixedH, diffW, diffH;
  75          if (document.documentElement && document.body.clientHeight==0) {     // Catches IE6 and FF in DOCMODE
  76                  fixedW = document.documentElement.clientWidth;
  77                  fixedH = document.documentElement.clientHeight;
  78                  window.resizeTo(fixedW, fixedH);
  79                  diffW = fixedW - document.documentElement.clientWidth;
  80                  diffH = fixedH - document.documentElement.clientHeight;
  81                  w = fixedW + diffW + 16; // Vert Scrollbar Always On in DOCMODE.

  82                  h = fixedH + diffH;
  83                  if (w >= screen.availWidth) h += 16;
  84          } else if (document.all) {
  85                  fixedW = document.body.clientWidth;
  86                  fixedH = document.body.clientHeight;
  87                  window.resizeTo(fixedW, fixedH);
  88                  diffW = fixedW - document.body.clientWidth;
  89                  diffH = fixedH - document.body.clientHeight;
  90                  w = fixedW + diffW;
  91                  h = fixedH + diffH;
  92                  if (h >= screen.availHeight) w += 16;
  93                  if (w >= screen.availWidth)  h += 16;
  94          } else {
  95                  fixedW = window.innerWidth;
  96                  fixedH = window.innerHeight;
  97                  window.resizeTo(fixedW, fixedH);
  98                  diffW = fixedW - window.innerWidth;
  99                  diffH = fixedH - window.innerHeight;
 100                  w = fixedW + diffW;
 101                  h = fixedH + diffH;
 102                  if (w >= screen.availWidth)  h += 16;
 103                  if (h >= screen.availHeight) w += 16;
 104          }
 105          w = Math.min(w,screen.availWidth);
 106          h = Math.min(h,screen.availHeight);
 107          window.resizeTo(w,h);
 108          window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
 109  }
 110  
 111  function show_section(e) {
 112      if (document.getElementById(e).style.display == 'none') {
 113          document.getElementById(e).style.display = 'block';
 114      } else {
 115          document.getElementById(e).style.display = 'none';
 116      }
 117  }
 118  
 119  
 120  function expand()
 121  {
 122          var Nodes = document.getElementsByTagName("table")
 123          var max = Nodes.length
 124          for(var i = 0;i < max;i++) {
 125                  var nodeObj = Nodes.item(i)
 126                  var str = nodeObj.id
 127                  if (str.match("section")) {
 128                          nodeObj.style.display = 'block';
 129                  }
 130          }
 131  }
 132  
 133  function hideall()
 134  {
 135          var Nodes = document.getElementsByTagName("table")
 136          var max = Nodes.length
 137          for(var i = 0;i < max;i++) {
 138                  var nodeObj = Nodes.item(i)
 139                  var str = nodeObj.id
 140                  if (str.match("section")) {
 141                          nodeObj.style.display = 'none';
 142                  }
 143          }
 144  }


[ Powered by PHPXref - Served by Debian GNU/Linux ]