Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
imgfadezoom2.js
Package: Generateur_v13.rar [view]
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 3k
Category:
WEB Mail
Development Platform:
PHP
- var imgpreload=new Array()
- for (i=0;i<=zoomimages.length;i++) {
- imgpreload[i]=new Image()
- imgpreload[i].src=zoomimages[i]
- }
- var zoomfactor=8
- var positionleft=0
- var positiontop=0
- var timer
- var marginright=0
- var i_fadestrength=5
- var i_images=0
- var step=1
- var content
- var imageboxwidthriginal=0
- var imageboxwidth=0
- var imageboxheight=0
- var bodywidth=0
- var bodyheight=0
- function setimage() {
- document.all.imagebox.style.visibility="hidden"
- bodywidth=document.body.clientWidth
- bodyheight=document.body.clientHeight
- if (i_images>=zoomimages.length) {i_images=0}
- content="<img name='newpic' src='"+zoomimages[i_images]+"'>"
- imagebox.innerHTML=content
- imageboxwidthoriginal=document.newpic.width
- content="<img name='newpic' src='"+zoomimages[i_images]+"' width=1>"
- imagebox.innerHTML=content
- document.all.imagebox.style.visibility="visible"
- imagebox.filters.alpha.opacity=100
- zoomin()
- }
- function zoomin() {
- if (imageboxwidth<(imageboxwidthoriginal/1.3)) {
- imageboxwidth+=zoomfactor
- content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+imageboxwidth+"'>"
- imagebox.innerHTML=content
- imageboxwidth=document.newpic.width
- imageboxheight=document.newpic.height
- document.all.imagebox.style.posLeft=bodywidth/2-imageboxwidth/2
- document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2
- document.all.imagebox.style.overflowX="hidden"
- document.all.imagebox.style.visibility="visible"
- step+=1.1
- imageboxwidth+=step
- timer=setTimeout("zoomin()",50)
- }
- else {
- clearTimeout(timer)
- content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+imageboxwidthoriginal+"'>"
- imagebox.innerHTML=content
- imageboxwidth=document.newpic.width
- imageboxheight=document.newpic.height
- document.all.imagebox.style.posLeft=bodywidth/2-imageboxwidth/2
- document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2
- document.all.imagebox.style.overflowX="hidden"
- document.all.imagebox.style.visibility="visible"
- i_fadestrength=0;
- timer=setTimeout("zoomout()",2000)
- }
- }
- function zoomout() {
- if (i_fadestrength<120) {
- imageboxwidth+=zoomfactor
- content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+imageboxwidth+"'>"
- imagebox.innerHTML=content
- imageboxwidth=document.newpic.width
- imageboxheight=document.newpic.height
- imagebox.filters.alpha.opacity=Math.floor(100-i_fadestrength)
- document.all.imagebox.style.posLeft=bodywidth/2-imageboxwidth/2
- document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2
- document.all.imagebox.style.overflowX="hidden"
- document.all.imagebox.style.visibility="visible"
- step+=1.5
- i_fadestrength+=step
- timer=setTimeout("zoomout()",50)
- }
- else {
- clearTimeout(timer)
- i_fadestrength=0;
- step=1;
- i_images++
- imageboxwidth=0
- setimage()
- }
- }
- if (document.all) {
- document.write("<DIV id='imagebox' style='position:absolute;filter:alpha(opacity=0);'></DIV>")
- }
- if (document.all) {
- onload=setimage
- }