function __clean_up(obj)
{
	obj.className = "__right_value";
}

function ch_color(obj)
{
	obj.className = "__wrong_value";
}

function is_email(str)
{
	return (str.indexOf(".") > 0) && (str.indexOf("@") > 0);
}
function is_date(val)
{
	if( val == "" ) { return false; } else { return true; }
}

var opened = 1;
function show_hide()
{
  if( opened == 1 ) {
      document.getElementById("nav_block_text").style.display = 'none';
      opened = 2;
      document.getElementById("show_hide_link").innerHTML = "Показать меню";
  } else {
      document.getElementById("nav_block_text").style.display = 'block';
      opened = 1;
      document.getElementById("show_hide_link").innerHTML = "Скрыть меню";
  }
}

function Print_Curent_Page()
{
  var html = "<style>body{font-size:12px;font-family:Tahoma;}#rounded-box-3{display:none;}</style>";
  html += '<link rel="StyleSheet" href="/public/css/root/web.2.0.css">';
  html += document.getElementById("content").innerHTML;
  w = window.open("about:blank", "", "height=500, width=600, status=1, resizable=1, scrollbars=1, scroll=1");
  w.document.write(html);
  w.document.print();
}



function onAccountMenu(obj)
{
	obj.style.background = 'white';
}

function offAccountMenu(obj)
{
	obj.style.background = '#daf0ff';
}



function edit_Mark(obj)
{
	$(obj).style.display = 'block';
}


function close_Mark(obj)
{
	$(obj).style.display = 'none';
}

function WriteFlash(s)
{

	//$("#Flash").hide("slow");
	$("#Flash").html(s);
	$("#Flash").fadeIn("slow", function(){$("#Flash").css("display","block");});
	window.scroll(0,0);
}


var DateOBJ;
function selectDate(obj)
{
	DateOBJ = obj;
	window.open("/jair/resources/javascript/tigra_calendar/calendar.html");
}

function GetCaller()
{
	return DateOBJ;
}


function CloseVideo(index)
{
	document.getElementById("Video_"+index).style.display = "none";
	document.getElementById("Video_"+index).innerHTML = "";
}

function OpenVideo(index)
{
	var  v = '<div style="width:480px;height:320px;position:fixed;top:30px;"><img onclick="CloseVideo(\''+index+'\')" style="cursor:pointer;" src="/public/images/closebox.png" align="right"><br><embed src="/jair/mediaplayer.swf" width="450" height="300" allowscriptaccess="always" allowfullscreen="true" flashvars="height=300&width=450&file=/public/video/'+index+'.flv&image=/public/video/'+index+'.jpg" /></div>';
	document.getElementById("Video_"+index).style.display = "inline";
	document.getElementById("Video_"+index).innerHTML = v;
}