var ResizeImageWidthMax=200
function resizeImagesByWidth(){
	var imgs=document.images
	for(var i=0;i<imgs.length;i++){
		if(imgs[i].getAttribute("resize",false)!="1"){continue;}
		if(imgs[i].width<=ResizeImageWidthMax){continue;}
		imgs[i].width=ResizeImageWidthMax
		imgs[i].outerHTML = "<a href='"+imgs[i].src+"' target=_blank>" +imgs[i].outerHTML+"</a>"
	}
}
window.onload = resizeImagesByWidth