function seo_sendSEOform() 
{
  form = $('#seo_form');
	// seo_saveColor(form);
	// Сохранить все остальное
	frame = jQuery('#seo_hidden_frame');
	form.attr("target", 'seo_hidden_frame');
	input = document.createElement ('input');
	input.type = 'hidden';
	input.name = 'seo_url';
	jQuery(input).val(escape(seo_url));
	form.append( input );
	form.submit();
}

function loadExistingMetaTags() 
{
  $("#seo_title").val($("title").html());
  $("#seo_meta_keywords").val($('meta[name="keywords"]').attr('content'));
  $("#seo_meta_descrioption").val( $('meta[name="description"]').attr('content'));
}

function makeTagsWithContent() 
{
  form = $('#seo_form');
  	jQuery.ajax({
  	  type: "POST",
  	  url: $(form).attr('action'),
  	  data: "body=" + escape(document.body.innerHTML) + "&seo_url=" + escape(seo_url) + "&ajax=1",
  	  success: function(text) {
  	  	array =  text.split("|||");
  	  	jQuery("#seo_meta_keywords").val(array[0].replace('keywords::', ''))
  	  	jQuery("#seo_meta_descrioption").val(array[1].replace('description::', ''))
  	  }
  	});
  //}
}

function changeSeoLinkText( link )
{
  if( $('#seo_panel_div').css( 'display' ) == 'none' ) $(link).html( 'Показать SEO-панель' );
  else $(link).html( 'Скрыть SEO-панель' );
}