var $vl_time = 0;
var id;
function loading(){
	$vl_time++;
	window.status=img.complete+" loading: "+$vl_time;
	if(img.complete){
		document.images['target'].src=img.src;
		window.status=img.src;
		clearInterval(id);
	};
};
function cambiar($vt_img) {
	//setTimeout('loading()',50); 
	img_preload = new Image();
	img_preload.src='img/preloader.gif'
	img=new Image;
	img.src=$vt_img;
	document.images['target'].src=img_preload.src;
	if(img.complete){
		document.images['target'].src=img.src;
		window.status=img.src;
	}else{
		id = setInterval("loading()",100);
	};
};
