var xx;
//var growthByStep = new Array(50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100);
var growthByStep = new Array(50, 60, 70, 80, 90, 100);
var stepCount = growthByStep.length;
var realWidth = 135;
var realHeight = 185;
var realLeft = 17;
var realTop = 48;
var stepNo = 0;
var dLeft=0;
var dTop=0;

function over(id){
	document.getElementById(id+'_div').style.display='block';
  showImage(id);
}

function showImage(id){
	img=document.getElementById(id+'_b');
	if ((stepCount > stepNo + 1)){
	document.getElementById(id+'_b').style.display='block';
		stepNo++;
    img.width = realWidth * growthByStep[stepNo] / 100;
    dLeft=realWidth*growthByStep[stepNo]/200-realWidth*growthByStep[stepNo-1]/200;
    dTop=realHeight*growthByStep[stepNo]/100-realHeight*growthByStep[stepNo-1]/100;
    img.height = realHeight * growthByStep[stepNo] / 100;
		img.style.marginLeft=img.style.marginLeft.substring(0, img.style.marginLeft.length-2)-dLeft+'px';
		img.style.marginTop=img.style.marginTop.substring(0, img.style.marginTop.length-2)-dTop+'px';
  	xx=setTimeout('showImage("'+id+'")', 30);
		img.style.opacity = stepNo/10+0.5;
		img.style.filter = 'alpha(opacity=' + ((stepNo+1)*100/stepCount) + ')';
	}
}

function out(id){
	img=document.getElementById(id+'_b');
  clearTimeout(xx);
  img.style.display='none';
  document.getElementById(id+'_div').style.display='none';
  img.style.marginLeft=realLeft+'px';
  img.style.marginTop=realTop+'px';
  stepNo = 0;
  dLeft=0;
  dTop=0;
}
