function comment(formId, commentId, depth, subject) {
	var form = document.getElementById(formId);
	form.parent_id.value = commentId;
	if (depth < 3) {
		form.subject.value = "Re: " + subject;
	}
	scrollTo(0, document.body.offsetHeight);
}

function selectText(objId) {
	var obj = document.getElementById(objId);
	if (obj != null) {
		var range = document.body.createTextRange( );
		range.moveToElementText(obj);
		range.select();
	}
}

function windowImage(src, width, height) {
	var imageWin = window.open("window_image.php?src=" + src, "imagewindow" + width + "" + height, "scrollbars=yes");
}

function adImage(src, width, height) {
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	var imageWin = window.open("window_image.php?src=" + src, "imagewindow" + width + "" + height, "left=" + left +",top=" + top + ",width=" + width + ",height=" + height + ",scrollbars=yes");
}


