window.onload = initall;

function expend(id,myflag){
	var obj = document.getElementById(id);
	if (myflag){
		obj.style.display = "block";
	}else{
		obj.style.display = "none";
	}
	
	return false;
}

function initall() {
	var formlist = document.getElementById("allphoto").getElementsByTagName("img");
	for (var i=0; i <formlist.length; i++ ) {
		var currentObj = formlist[i];

		var a = new Image();
		a.src = currentObj.src;

		if ( (a.width > 200) || (a.height > 150) ){
			var x = 0.99;

			while ( (a.width * x > 200 ) || (a.height * x > 150) ){
				x = x - 0.01;
			}
			currentObj.width= a.width * x;
			currentObj.height = a.height * x;
		}else{
			currentObj.width = a.width;
			currentObj.height = a.height;
		}
	}

}