Page Components JavaScript DHTML




Image Zoom Out

.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#003399; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#0099FF; font-weight:normal}
.header{font-family:arial,verdana,helvetica; font-size:20pt; color:#DD0000; font-weight:bold}



Image Zoom Out





In this Script when you move you click on the following image, the image size will decrease
gradually (i.e the image will zoom out) and will finally disappear.


The script is very easy to customise. Here the event that calls the function is onclick. You can change it to
onmouseover, onmouseout or onmousedown.


To see the script in action again, refresh this page.






© 2002 Premshree Pillai. All rights reserved.


// (c) 2002 Premshree Pillai
// http://www.qiksearch.com
// premshree@hotmail.com
// Loaction of this script :
// http://www.qiksearch.com/javascripts/image_zoom_out.htm
// Visit http://www.qiksearch.com/javascripts.htm for more FREE scripts
document.write('
');
img_act_width = izo.width;
img_act_height = izo.height;
i=1;
function zoom_out()
{
 if(izo.width==0)
  {
   izo.border=0;
  }
 if(izo.width!=0)
  {
   izo.width-=i;
   izo.height=Math.round(izo.width*((img_act_height)/(img_act_width)));
   setTimeout("zoom_out()",1);
   i+=1;
  }