home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 August / Chip_2004-08_cd1.bin / zkuste / fototools / download / looky / LookyLooky-Ver1_0-Beta.exe / _SETUP.1 / PanOKbilder.js < prev    next >
Text File  |  2001-04-19  |  4KB  |  120 lines

  1. if (document.images) {
  2.  
  3.   var openNewWin=false;
  4.   var onLoadBeforeImage=null;
  5.   var winName='neuwin';
  6.   var ct=0;
  7.   var hbild='';
  8.  
  9.   if (window.onload)
  10.     onLoadBeforeImage=window.onload;
  11.  
  12.   window.onload=BildOeffnenInit;
  13.  
  14. }
  15.  
  16.  
  17.  
  18.  
  19. function BildOeffnenInit()
  20. {
  21.   if (onLoadBeforeImage)
  22.     onLoadBeforeImage();
  23.  
  24.   for (var i=0; i < document.links.length; i++) {
  25.  
  26.     var HREF = document.links[i].href.toLowerCase().split('.');
  27.     if (HREF[HREF.length-1] == 'jpg' || HREF[HREF.length-1] == 'gif' || HREF[HREF.length-1] == 'png')
  28.       document.links[i].onclick = OeffneBild;
  29.  
  30.   }
  31. }
  32.  
  33. function OeffneBild()
  34. {
  35.   var BildName = this.href.split('.');
  36.   var BildGroesse = BildName[BildName.length-2].split('x');
  37.  
  38.   var ModX=0, ModY=0, Dat=this.href.split('/'); Dat=Dat[Dat.length-1];
  39.   if (!document.layers && !document.all) { ModX=20;ModY=30; }
  40.   var breite=parseInt(screen.width)+ModX;
  41.   var hoehe=parseInt(screen.height)+ModY;
  42.   var br=screen.width;
  43.   var dn = this.href.replace("file:","");
  44.   dn = dn.replace("///","");
  45.   dn = dn.replace("//","/");
  46.   dn = dn.replace("//","/");
  47.   dn = dn.replace("//","/");
  48.   dn = dn.slice(2);
  49.   dn = dn.replace("%20"," ");
  50.   dn = dn.replace("%20"," ");
  51.   dn = dn.replace("%20"," ");
  52.   dn = dn.replace("%20"," ");
  53.   dn = dn.replace("%20"," ");
  54.   dn = dn.replace("%20"," ");
  55.   dn = dn.replace("%20"," ");
  56.   var teil = dn.split('/');
  57.   dn = teil[teil.length-1];
  58.  
  59.   var Param = 'width='+breite+',height='+hoehe+',directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0';
  60.   if (document.layers)
  61.     Param += ',screenX='+(screen.width/2-breite/2)+',screenY='+(screen.height/2-hoehe/2);
  62.   else if (document.all)
  63.     Param += ',left='+(screen.width/2-breite/2)+',top='+(screen.height/2-hoehe/2);
  64.  
  65.   if(!openNewWin)
  66.     if (window[winName] && !window[winName].closed)
  67.       window[winName].close();
  68.  
  69.   winName='neuwin'+(ct++);
  70.   window[winName] = window.open('', winName, Param);
  71.  
  72.   with (window[winName].document) {
  73.     open();
  74.     write('<html>\n<head>\n<title>'+ dn +'</title>\n</head>\n');
  75.     write('<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\n');
  76.     write('<applet CODE="pan360.class" width=' + br + ' height=' + screen.height + ' >\n');
  77.     write('<PARAM NAME=URL0 VALUE="' + dn + ',alt.gif,0,0, 113,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">\n');
  78.     write('</applet>\n'); 
  79.     write('</body>\n</html>\n');
  80.     close();
  81.   }
  82.  
  83.   return false;
  84. }
  85.  
  86. function OeffneBildNeu()
  87. {
  88.   var ModX=0, ModY=0
  89.   if (!document.layers && !document.all) { ModX=20;ModY=30; }
  90.   var breite=parseInt(screen.width)+ModX;
  91.   var hoehe=parseInt(screen.height)+ModY;
  92.   var br=screen.width;
  93.   var dn = hbild;
  94.  
  95.   var Param = 'width='+breite+',height='+hoehe+',directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0';
  96.   if (document.layers)
  97.     Param += ',screenX='+(screen.width/2-breite/2)+',screenY='+(screen.height/2-hoehe/2);
  98.   else if (document.all)
  99.     Param += ',left='+(screen.width/2-breite/2)+',top='+(screen.height/2-hoehe/2);
  100.  
  101.   if(!openNewWin)
  102.     if (window[winName] && !window[winName].closed)
  103.       window[winName].close();
  104.  
  105.   winName='neuwin'+(ct++);
  106.   window[winName] = window.open('', winName, Param);
  107.  
  108.   with (window[winName].document) {
  109.     open();
  110.     write('<html>\n<head>\n<title>'+ dn +'</title>\n</head>\n');
  111.     write('<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\n');
  112.     write('<applet CODE="pan360.class" width=' + br + ' height=' + screen.height + ' >\n');
  113.     write('<PARAM NAME=URL0 VALUE="' + dn + ',alt.gif,0,0, 113,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">\n');
  114.     write('</applet>\n'); 
  115.     write('</body>\n</html>\n');
  116.     close();
  117.   }
  118.    
  119. }
  120.