[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/modules/pages/popup_image/ -> jscript_main.php (source)

   1  <?php
   2  /**

   3   * jscript_main

   4   *

   5   * @package page

   6   * @copyright Copyright 2003-2006 Zen Cart Development Team

   7   * @copyright Portions Copyright 2003 osCommerce

   8   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

   9   * @version $Id: jscript_main.php 3126 2006-03-07 03:09:40Z drbyte $

  10   */
  11  ?>
  12  <script language="javascript" type="text/javascript"><!--
  13  var i=0;
  14  function resize() {
  15    i=0;
  16  //  if (navigator.appName == 'Netscape') i=20;

  17    if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) {
  18        i=30; //This browser is Internet Explorer 6.x on Windows XP SP2

  19    } else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) {
  20        i=0; //This browser is Internet Explorer 6.x

  21    } else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
  22        i=25; //This browser is Firefox on Windows

  23    } else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
  24        i=45; //This browser is Mozilla on Windows

  25    } else {
  26        i=80; //This is all other browsers including Mozilla on Linux

  27    }
  28    if (document.documentElement && document.documentElement.clientWidth) {
  29  //    frameWidth = document.documentElement.clientWidth;

  30  //    frameHeight = document.documentElement.clientHeight;

  31  
  32    imgHeight = document.images[0].height+40-i;
  33    imgWidth = document.images[0].width+20;
  34  
  35    var height = screen.height;
  36    var width = screen.width;
  37    var leftpos = width / 2 - imgWidth / 2;
  38    var toppos = height / 2 - imgHeight / 2;
  39  
  40      frameWidth = imgWidth;
  41      frameHeight = imgHeight+i;
  42  
  43    window.moveTo(leftpos, toppos);
  44  
  45  
  46  //  window.resizeTo(imgWidth, imgHeight);

  47    window.resizeTo(frameWidth,frameHeight+i);
  48      }
  49    else if (document.body) {
  50      window.resizeTo(document.body.clientWidth, document.body.clientHeight-i);
  51    }
  52    self.focus();
  53  }
  54  //--></script>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics