March 28, 2011 8:39 AM

function ZoomImage(zoom){

var image=document.getElementById('image');

if(!image){return};

image.setAttribute('width',parseInt(image.getAttribute('width'))+zoom);

image.setAttribute('height',parseInt(image.getAttribute('height'))+zoom);

if(!image.style.left){image.style.left='0px'};

if(!image.style.top){image.style.top='0px'};

image.style.left=parseInt(image.style.left)-(zoom/2)+'px';

image.style.top=parseInt(image.style.top)-(zoom/2)+'px';

}

window.onload=function(){

var control1=document.getElementById('ZoomIn');

if(!control1){return};

control1.onclick=function(){

ZoomImage(20);

}

var control2=document.getElementById('ZoomOut');

if(!control2){return};

control2.onclick=function(){

ZoomImage(-20);

}

}