Image1 = new Image();
Image1.src = "/images/loading.gif";

function insert_comment_form(id, type) {
	s = "";
	s += '<form method="post">';
	s += '<textarea name="description" style="width:300px; height: 50px;"></textarea><br/>';
	s += '<input type="hidden" name="comment_parent_id" value="'+id+'"/>';
	if (type == 0)
		s += '<br><em>Вы можете прокомментировать страницу после <a href="javascript:show_registration_window(); clear_comment_form('+id+');" id="show_registration_window">регистрации</a> или входа под своим паролем:</em><br><br>Логин:&nbsp;&nbsp; <input name="login" value=""><div style="margin:6px 0 25px 0;">Пароль: <input type="password" name="password" value=""></div><input type="hidden" name="authorized_flag_comment" value="none">';
	s += '<input type="submit" name="comment_save_button" value="Сохранить"/>';
	s += '</form>';	

	document.all["comment_insert_"+id].innerHTML = s;
	
	s = '<a style="cursor: pointer;" class="bluelink" onclick="clear_comment_form('+id+')">Скрыть</a>';
	document.all["comment_clear_"+id].innerHTML = s;
}

function clear_comment_form(id) {
	document.all["comment_insert_"+id].innerHTML = "";
	document.all["comment_clear_"+id].innerHTML = "";
}