function doc_init(img_width, img_height) {
	var scale = 300/img_width;
	var smallWidth = Math.floor(img_width * scale);
	var smallHeight = Math.floor(img_height * scale);
	var imgPadding = (700 - img_width) / 2
	 
	$("div#comments").hide();
	$("a.showComments").click(function(){
		if ($("div#comments").css("display") == "none") {
			$("div#comments").slideDown("slow");
			$("#mainImg").animate({width: smallWidth, height: smallHeight, marginRight: 0}, "slow");
			$(".mainBody").animate({minHeight: smallHeight}, "slow");
			$("#prev_link").click(function(){ $("a.showComments").trigger("click"); return false; });
			$("#ie-fix").css("display", "none");
		} else {
			$("div#comments").slideUp("slow");
			$("#mainImg").animate({width: img_width, height: img_height, marginRight: imgPadding}, "slow");
			$(".mainBody").animate({minHeight: img_height}, "slow");
			$("#prev_link").unbind('click');
			$("#ie-fix").css("display", "block");
			}
		$("div#details").slideUp("slow");
		return false;
	});

	$("#mainImg").css("margin-right", imgPadding)
}

function clearBox(box) {
	if(box.value==box.defaultValue) {
		box.value = "";
	}
}
