


function cl(link)
{
 img = new Image();
 img.src = 'http://www.liveinternet.ru/click?*' + link;
}




function try_to_subscribe()
{
	var email = document.all.subscribe_form.mail.value;

	emailTest = "^[_\\.0-9A-z-]+@([0-9a-z][0-9a-z_-]+\\.)+[a-z]{2,4}$"; 
	var regex = new RegExp(emailTest); 
	if (!regex.test(email) || !(email.length > 0) || email=='ваш e-mail')
	{
		alert('Необходимо указать корректный e-mail!');
		return false;
	}
	else
	{
		window.open('','zoom','width=300,height=250');
	}

}









function OpenDiv(block_id)
{
	var now_style = document.getElementById(block_id).style.display;
	if(now_style == 'none')
	{
		document.getElementById(block_id).style.display = 'block'; 
	}
	else
	{
		document.getElementById(block_id).style.display = 'none'; 
	}
	return false;
}




function CheckOpenDiv(block_id, check_id)
{
	var now_block_style = document.getElementById(block_id).style.display;
	var now_chek = document.getElementById(check_id);
	
	if (now_chek.checked == true)
	{
		document.getElementById(block_id).style.display = 'block'; 
	}
	if (now_chek.checked == false)
	{
		document.getElementById(block_id).style.display = 'none';
	}
	return false;
}





function openFaq(target_var, id_var){
	var target = target_var;
	var id = id_var;
	//alert(target);
	if($('.'+target).css('display')!='block'){
		$('.'+target).animate({height:'show',opacity: 1}, "slow");
		$('#'+id+' .strikBlock .arrow').css('display', 'none');
		$('#'+id+' .strikBlock .arrowC').css('display', 'block');
		$('#'+id+' .t1').css('display', 'none');
		$('#'+id+' .t2').css('display', 'inline');
	}
	else{
		$('.'+target).animate({height:'hide',opacity: 0}, "slow");
		$('#'+id+' .strikBlock .arrowC').hide();
		$('#'+id+' .strikBlock .arrow').show();
		$('#'+id+' .t1').css('display', 'inline');
		$('#'+id+' .t2').css('display', 'none');
		}
		return false;
}



$(function(){

	$('#openLentaNews').click(function(){openFaq($(this).attr('rel'), 'open_more_news'); return false;});
	$('#openLentaNewsArrow').click(function(){openFaq($(this).attr('rel'), 'open_more_news'); return false;});
	$('#closeLentaNewsArrow').click(function(){openFaq($(this).attr('rel'), 'open_more_news'); return false;});

	$('#openMainNews').click(function(){openFaq($(this).attr('rel'), 'open_more_main_news'); return false;});
	$('#openMainNewsArrow').click(function(){openFaq($(this).attr('rel'), 'open_more_main_news'); return false;});
	$('#closeMainNewsArrow').click(function(){openFaq($(this).attr('rel'), 'open_more_main_news'); return false;});

	$('#openArticles').click(function(){openFaq($(this).attr('rel'), 'open_more_art'); return false;});
	$('#openArticlesArrow').click(function(){openFaq($(this).attr('rel'), 'open_more_art'); return false;});
	$('#closeArticlesArrow').click(function(){openFaq($(this).attr('rel'), 'open_more_art'); return false;});

	$('#openfeedback').click(function(){openFaq($(this).attr('rel'), 'openfeedback'); return false;});


/*
	$("#fancy").tooltip({
		track: true,
		delay: 50,
		showURL: false,
		fade: false,
		fixPNG: true,
		showBody: " - ",
		extraClass: "pretty fancy",
		top: -15,
		left: 5
	});


	$('#pretty, .tool').tooltip({
		track: true,
		delay: 50,
		showURL: false,
		fade: false,
		showBody: " - ",
		extraClass: "pretty",
		fixPNG: true,
		left: -120
	});
	*/


 });
   


