smallImageActionEnds = [];
function addImage(id , img,width){
	if(img == "") return false;
	var e ={};
	var ta = new Image();
	//キャッシュ制御
	if(img.match(/\?/)){
		img = img + "&" + id;
	}else{
//		img = img + "?"+id;
	}
	ta.src = img;
	ta.id = "vergeqac_"+id;
	ta.alt = width;
	ta.onload = function(){
		changeThumbImage(this);
	}
	if(ta.complete){
		changeThumbImage(ta);
	}
//	addImages.push(e);
}
function changeThumbImage(commonObj){
		var targetId = commonObj.id;
		targetId = targetId.replace("vergeqac_","");
		var elemenet = document.getElementById(targetId);
		if(typeof(elemenet) == undefined || elemenet== null){
			return false;
		}
		
		if(typeof(elemenet.width) ==undefined  || elemenet.width == null){
			return ;
		}
		elemenet.onload = function(){};
		if(commonObj.width <= commonObj.alt){
			elemenet.width=commonObj.width;
			elemenet.height = commonObj.height;
		}
		else{
			elemenet.width=commonObj.alt;
			elemenet.height = commonObj.height*commonObj.alt/commonObj.width;
		}
		elemenet.src = commonObj.src;
}


