/*$(document).observe('dom:loaded', function() {
    $$('a.showImage').each(function(el) { new FancyZoom(el); });
});*/




var leftSpec = new Array();
var rightSpec = new Array();

window.onload = pageLoad;
window.onresize = allheight;

function pageLoad(){
	
	allheight();
	showCounter();
	formResize();
}
$(window).resize(function(){
	formResize();
});

function formResize(){
	width = $('body').width()	
	result = $('.checked').html();
	if(width == 1300 || width < 1300){
		$('.checked').remove();
		$('.formTablCheck').append('<tr class="del"><td class="checked">'+result+'</td></tr>');
	}
	if(width > 1300){
		if($('.del').length){
			$('.del').remove();
			$('.formTablCheck tr').append('<td class="checked">'+result+'</td>');
		}
	}
}

function showCounter()
{
	document.getElementById('footerCounter').innerHTML = '<a href="http://www.liveinternet.ru/click" '+'target=_blank><img src="http://counter.yadro.ru/hit?t18.7;r'+escape(document.referrer)+((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+';'+Math.random()+'" alt="liveinternet.ru: iieacaii ?enei oeoia ca 24 ?ana, iinaoeoaeae ca 24 ?ana e ca naaiai\y" '+'border=0 width=88 height=31></a>';
}


function toggleParagraph(obj_id){
	var header = $('h'+obj_id);
	if(header.className == 'minH')
	{
		Effect.BlindDown('p'+obj_id, { duration: 0.3 });
		header.className = 'minHCur';
	}
	else
	{
		Effect.BlindUp('p'+obj_id, { duration: 0.3 });
		header.className = 'minH';
	}
}
	
	
function closeParagraph(obj_id){
	Effect.BlindUp('p'+obj_id, { duration: 0.3 });
}

function allheight()
{
	var i = 1;
	for(i=1; leftSpec[i]; i++)
	{
		if(rightSpec[i])
		{
			leftSpec[i].style.height = leftSpec[i].firstChild.offsetHeight;
			rightSpec[i].style.height = rightSpec[i].firstChild.offsetHeight;
			
			if(rightSpec[i].offsetHeight > leftSpec[i].offsetHeight)
				leftSpec[i].style.height = rightSpec[i].offsetHeight;
			else
				rightSpec[i].style.height = leftSpec[i].offsetHeight;
		}
	}
}

