/*
 * Меняет высоту iframe
 * th - iframe
 */
function autoHeight(th)
{
	setInterval(
		function() 
		{ 
			var h=null;
			var height=null;
			var ie = 0 /*@cc_on + @_jscript_version @*/;
			
			if (!h) if (location.hash.match(/^#h(\d+)/)){ h=RegExp.$1; ie=1}
			if (!h) for (var i=0; i<5000; i+=30)
			{
				height = Number(i)+60;
				if (top.frames['h'+i] && th.style.height!=height+'px')
				{
					h=i;
					delete top.frames['h'+i]; break; 
				}
			}
			
			height = Number(h)+60;
			
			if (h && th.style.height != height+'px' )
			{
				th.style.height=height+'px';
			}
		}, 10)
}

///////////

function goReg() {
	reg = $('.registration');
	offset = reg.offset().top - 10;
	$('html, body').animate({scrollTop:offset}, 300);
}
function checkPaymentType(inp) {
	pt = $('#paymentType')
	if ($(inp).attr('id') == 'beznal') {
		if (pt.height()!=290) {
			pt.animate({height:290},200)
			pt.find('div.cashlessForm').fadeIn(200);
            $('.reg_accept').show();
			$('.long_text_for_beznal').show();
            $('#wm_wallet').hide();
            $('#ya_wallet').hide();
			
		}
	} else {
		if (pt.height()!=112) {
			pt.animate({height:112},200)
			pt.find('div.cashlessForm').fadeOut(200);
            $('.reg_accept').hide();
			$('.long_text_for_beznal').hide();
            $('#wm_wallet').show();
            $('#ya_wallet').show();
		}
	}
}

