function makeSmallThumbs(){
	if (screen.width<1024){
		for(n=0;n<document.images.length;n++){
			if(document.images[n].className=="smthumb"){
				if(document.images[n].width>100 || document.images[n].height>100){
					document.images[n].width=document.images[n].width*(100/150);
					document.images[n].height=document.images[n].height*(100/150);
				}
			}
		}
	}
}
function makeSmallThumbs2(){
	if (screen.width<1024){
		image_reg_w = new RegExp("width=[\"']*([0-9]+)[\"']*", "i");
		image_reg_h = new RegExp("height=[\"']*([0-9]+)[\"']*", "i");

		alert("making small thumbs ("+document.images.length+")");
	
		for(n=0;n<document.images.length;n++){
			if(document.images[n].className=="smthumb"){
				alert("found one");
				var img_width_m=document.images[n].outerHTML.match(image_reg_w);
				var img_height_m=document.images[n].outerHTML.match(image_reg_h);
			
				var img_width = parseInt(img_width_m[1]);
				var img_height = parseInt(img_height_m[1]);
			
				if(img_width>100 || img_height>100){
					document.images[n].width=img_width*(100/150);
					document.images[n].height=img_height*(100/150);
				}
			}
		}
	}
}
makeSmallThumbs();