function change_menu_cat(id, id2)	{
	if ($("#"+id).attr("class") != 'vkl_activ')	{
		$("#"+id2).attr("class", 'vkl');
		$("#"+id).attr("class", 'vkl_activ');
		$("#div_"+id2).css("display", "none");
		$("#div_"+id).css("display", "block");
	}
}

function change_text(id, text)	{
	if ($("#"+id).val() == text)
		$("#"+id).attr("value", '');
	else if ($("#"+id).val() == '')
		$("#"+id).attr("value", text);
}

//window.onresize();
//window.onload = window.onresize;
//window.onresize = fontSize;


function fontSize()
 {
 	if (document.body.clientWidth < 1050)	{
		$("BODY").css("font-size", '90%');
		$("#m1").css("height", "26px");
		$("#m1").css("min-height", "30px");
		$("#m5 LI").css("height", "26px");
		$('#m5 LI H1').css("font-size", '110%');
		$("LI.activ H1 DIV").css("margin-top", "30em");
		$("LI.activ H1").css("min-height", "31px");
		}
	else	{
		$("BODY").css("font-size", '90%');
		$("#m1").css("height", "40px");
		$("#m1").css("min-height", "44px");
		$("#m5 LI").css("height", "40px");
		$('#m5 LI H1').css("font-size", '160%');
		$("LI.activ H1 DIV").css("margin-top", "55em");
		$("LI.activ H1").css("min-height", "43px");
		}
 }

function change_ico (id, left)	{
	$("#"+id).css("background-position", left +"px 0px");
}

function show_vac(id) {
	if ($("#div_"+id).css("display") == 'none') {
		$("#"+id).attr("class", "");
		$("#div_"+id).animate({height: "show"}, 300);

	} else {
		$("#"+id).attr("class", "link");
		$("#div_"+id).animate({height: "hide"}, 300);
	}
}

function insert_comment_form(id, module, module_id) {
	s = '<form method="post" name="form_comment_'+id+'" id="form_comment_'+id+'">';
	s += '<textarea name="description" id="dc_'+id+'" style="border: 2px solid rgb(221, 221, 221); height: 150px; width: 450px;"></textarea>';
	s += '<br/>';
	s += ' <img src="/_img/w_bold.gif" alt="Полужирный" onclick="javascript:insert_tag(\'dc_'+id+'\', \'b\')" style="cursor: pointer;"/>';
	s += ' <img src="/_img/w_italic.gif" alt="Курсив" onclick="javascript:insert_tag(\'dc_'+id+'\', \'i\')" style="cursor: pointer;"/>';
	s += ' <img src="/_img/w_strike.gif" alt="Перечеркнутый" onclick="javascript:insert_tag(\'dc_'+id+'\', \'s\')" style="cursor: pointer;"/>';
	s += ' <img src="/_img/w_hyperlink.gif" alt="Ссылка" onclick="javascript:insert_href(\'dc_'+id+'\')" style="cursor: pointer;"/>';
	s += ' <br/><br/>';
	s += '<input type="hidden" name="comment_parent_id" value="'+id+'"/>';

	s += '<input type="hidden" name="module" value="'+module+'"/>';
	s += '<input type="hidden" name="module_id" value="'+module_id+'"/>';

	s += '<div id="comment_error_message_'+id+'"/>';
	s += '<input type="button" name="comment_save_button" value="Сохранить" onclick="ajax_send_comment('+id+')"/>';
	s += ' <input type="button" name="comment_save_button" value="Отменить" onclick="clear_comment_form('+id+')"/>';
	s += '</form><br/><br/>';
	$("#comment_insert_"+id).html(s);

	$("#ins_href_"+id).hide();

	s = '<a style="border-bottom: 1px dashed #006699; cursor: pointer; text-decoration: none;" onclick="clear_comment_form('+id+')">Скрыть</a>';
	$("#comment_clear_"+id).html(s);
}

function show_form_edit_comment(id, type) {
	if (type == 1) {
		$("#frame_comment_"+id).css("display", "none");
		$("#frame_edit_comment_"+id).css("display", "block");
		$("#ins_href_"+id).hide();
		$("#edit_href_"+id).hide();
	} else {
		$("#frame_comment_"+id).css("display", "block");
		$("#frame_edit_comment_"+id).css("display", "none");
		$("#ins_href_"+id).show();
		$("#edit_href_"+id).show();
	}
}

function clear_comment_form(id) {
	s = '';
	$("#comment_insert_"+id).html(s);
	$("#comment_clear_"+id).html(s);
	$("#ins_href_"+id).show();
}

function show_block_form_sent_pass() {
	$("#block_form_sent_pass").css("display", "block");
	$("#block_form_authorization").css("display", "none");
}

function show_block_form_authorization() {
	$("#block_form_sent_pass").css("display", "none");
	$("#block_form_authorization").css("display", "block");
}



