var albImg = 0;
function addImage(src, pid) {
	var newImgDiv = document.createElement("div");
	var delstr = '';
	var iptwidth = 160;
	albImg++;
	if (pid != 0) {
		albImg = 'ok' + pid;
		delstr = '<div class="mt-2"><a href="javascript:delAlbPic(' + pid + ')" class="btn btn-danger btn-sm">删除</a></div>';
	} else {
		albImg = 'err' + albImg;
	}
	newImgDiv.className = 'albCt';
	newImgDiv.id = 'albCt' + albImg;
	document.getElementById("thumbnails").appendChild(newImgDiv);
	newImgDiv.innerHTML = '<img src="' + src + '">' + delstr;
	if (typeof arctype != 'undefined' && arctype == 'article') {
		iptwidth = 100;
		if (pid != 0) {
			newImgDiv.innerHTML = '<img src="' + src + '" onClick="addtoEdit(' + pid + ')">' + delstr;
		}
	}
	newImgDiv.innerHTML += '<div class="mt-2">标题：<input type="text" name="picinfo' + albImg+ '" value="" style="width:' + iptwidth + 'px"></div>';
}