preloadImage("/design/photo-eye.jpg");
preloadImage("/design/photo-ear.jpg");
preloadImage("/design/photo-hand.jpg");
preloadImage("/design/photo-driver.jpg");
preloadImage("/design/photo-driver2.jpg");

var VCtm;
var VCtmStep = 100;
var VCstep = 0;

function setProfImage(src) {
	var I=image("profImage");
	I.setSrc("/design/photo-"+src+".jpg");
	
	VCstep = 0;
	moveBars();
	
	return true;
}

function moveBars() {
	var L=layer("profBarLeft");
	var R=layer("profBarRight");
	var newLleft = 0;
	var newLwidth = 0;
	var newRleft = 0;
	var newRwidth = 0;
	
	// левая шторка
	// расчет
	newLleft = 74;
	newLwidth = 105 - 35 * VCstep;
	if (VCstep == 3) {
		newLleft = 73;
		newLwidth = 1;
	}
	// установка
	L.setLeft(newLleft);
	L.style.width = newLwidth;
	
	// правая шторка
	// расчет
	newRleft = 230 + 35 * VCstep;
	newRwidth = 105 - 35 * VCstep;
	if (VCstep == 3) {
		newRleft = 336;
		newRwidth = 1;
	}
	// установка
	R.setLeft(newRleft);
	R.style.width = newRwidth;
	
	// установка нового таймера
	if (VCstep < 3) {
		VCstep = VCstep + 1;
		VCtm=setTimeout("moveBars()", VCtmStep);
	}
}